/* Text Motion free-trial surfaces: export quality picker + upload/caption coach marks */

/* ---------- Export quality picker (480p / 720p / 1080p) ---------- */
.tm-quality-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.tm-quality-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.7rem 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: #e6e4dd;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.tm-quality-opt:hover {
  border-color: rgba(214, 255, 58, 0.55);
  transform: translateY(-1px);
}

.tm-quality-opt.is-active {
  border-color: #d6ff3a;
  background: rgba(214, 255, 58, 0.14);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(214, 255, 58, 0.4) inset;
}

.tm-quality-opt.is-locked {
  color: #8d8a83;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.4);
}

.tm-quality-opt.is-locked:hover {
  border-color: rgba(245, 158, 11, 0.6);
  transform: none;
}

.tm-quality-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tm-quality-sub {
  font-size: 0.72rem;
  color: #9b988f;
}

.tm-quality-lock {
  display: none;
  font-size: 15px !important;
  line-height: 1;
  color: #f59e0b;
}

.tm-quality-note {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #9b988f;
}

/* ---------- Coach marks (glowing frame + arrow + label) ---------- */
.tm-coach-ring {
  position: fixed;
  z-index: 9200;
  border-radius: 14px;
  border: 2px solid #d6ff3a;
  pointer-events: none;
  box-shadow:
    0 0 0 4px rgba(214, 255, 58, 0.18),
    0 0 26px rgba(214, 255, 58, 0.42);
  animation: tm-coach-ring-pulse 1.75s ease-in-out infinite;
}

@keyframes tm-coach-ring-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(214, 255, 58, 0.14),
      0 0 18px rgba(214, 255, 58, 0.34);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(214, 255, 58, 0.06),
      0 0 34px rgba(214, 255, 58, 0.6);
  }
}

.tm-coach-callout {
  position: fixed;
  z-index: 9210;
  max-width: 250px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(214, 255, 58, 0.5);
  background: linear-gradient(150deg, #241a44 0%, #14102a 100%);
  color: #f4f2ec;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  animation: tm-coach-callout-in 0.34s cubic-bezier(0.2, 1.2, 0.3, 1) both;
}

@keyframes tm-coach-callout-in {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tm-coach-callout small {
  display: block;
  margin-top: 4px;
  font-size: 0.76rem;
  font-weight: 500;
  color: #b9b6ad;
}

.tm-coach-callout .tm-coach-close {
  position: absolute;
  top: 4px;
  right: 6px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: #8d8a83;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
}

.tm-coach-callout .tm-coach-close:hover { color: #f4f2ec; }

/* Arrow points from the callout toward the highlighted button */
.tm-coach-callout::after {
  content: '➜';
  position: absolute;
  color: #d6ff3a;
  font-size: 1.5rem;
  line-height: 1;
  text-shadow: 0 0 12px rgba(214, 255, 58, 0.7);
}

.tm-coach-callout[data-side='left']::after {
  top: 50%;
  right: -26px;
  transform: translateY(-50%);
  animation: tm-coach-arrow-x 1.05s ease-in-out infinite alternate;
}

.tm-coach-callout[data-side='right']::after {
  top: 50%;
  left: -26px;
  transform: translateY(-50%) rotate(180deg);
  animation: tm-coach-arrow-x-rev 1.05s ease-in-out infinite alternate;
}

.tm-coach-callout[data-side='top']::after {
  left: 50%;
  bottom: -25px;
  transform: translateX(-50%) rotate(90deg);
  animation: tm-coach-arrow-y 1.05s ease-in-out infinite alternate;
}

.tm-coach-callout[data-side='bottom']::after {
  left: 50%;
  top: -25px;
  transform: translateX(-50%) rotate(-90deg);
  animation: tm-coach-arrow-y-rev 1.05s ease-in-out infinite alternate;
}

@keyframes tm-coach-arrow-x {
  from { transform: translateY(-50%) translateX(0); }
  to { transform: translateY(-50%) translateX(7px); }
}

@keyframes tm-coach-arrow-x-rev {
  from { transform: translateY(-50%) rotate(180deg) translateX(0); }
  to { transform: translateY(-50%) rotate(180deg) translateX(7px); }
}

@keyframes tm-coach-arrow-y {
  from { transform: translateX(-50%) rotate(90deg) translateX(0); }
  to { transform: translateX(-50%) rotate(90deg) translateX(7px); }
}

@keyframes tm-coach-arrow-y-rev {
  from { transform: translateX(-50%) rotate(-90deg) translateX(0); }
  to { transform: translateX(-50%) rotate(-90deg) translateX(7px); }
}

@media (max-width: 720px) {
  .tm-coach-callout {
    max-width: 190px;
    padding: 10px 12px;
    font-size: 0.82rem;
  }
  .tm-coach-callout::after { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tm-coach-ring,
  .tm-coach-callout,
  .tm-coach-callout::after {
    animation: none;
  }
}
