/**
 * DealerPro Elite — Thank You / Confirmation page styles
 *
 * Source mockup(s):
 *   - mockups/shared/mockup-1I-thank-you.html
 * Loaded conditionally on page-thank-you.php via wp_enqueue_style.
 *
 * @package DealerPro_Elite
 * @since 2.0.0
 */

/* ─── PAGE-SPECIFIC KEYFRAMES (success-icon draw-in + ring pulse) ── */
@keyframes draw-circle {
  to { stroke-dashoffset: 0; }
}
@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}
@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* ─── TY SECTION (hero gradient backdrop) ──────────────── */
.ty-section {
  padding: var(--s-12) 0 var(--s-7);
  position: relative;
  isolation: isolate;
}
.ty-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 50% 0%, var(--accent-glow), transparent 70%),
    radial-gradient(ellipse 500px 300px at 50% 50%, var(--success-soft), transparent 70%);
  z-index: -1;
}

/* ─── TY CARD (main success card) ──────────────────────── */
.ty-card {
  background: var(--bg-1);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-xl);
  padding: var(--s-12) var(--s-10);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 64px var(--accent-glow);
  animation: fade-in-up 600ms ease-out backwards;
}
.ty-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.ty-card > * { position: relative; }
.ty-card__title {
  font-size: clamp(28px, 4vw, 44px);
  margin: var(--s-3) 0 var(--s-3);
}
.ty-card__title em {
  color: var(--accent);
  font-style: normal;
}
.ty-card__sub {
  font-size: var(--t-md);
  color: var(--text-soft);
  max-width: 580px;
  margin: 0 auto var(--s-8);
  line-height: 1.7;
}

/* ─── TY ICON (animated checkmark) ─────────────────────── */
.ty-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--s-6);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ty-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--success);
  animation: pulse-ring 2.4s ease-out infinite;
}
.ty-icon::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--success-soft);
}
.ty-icon svg {
  position: relative;
  width: 56px;
  height: 56px;
  z-index: 1;
}
.ty-icon svg circle {
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  animation: draw-circle 0.6s ease-out forwards;
}
.ty-icon svg path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw-check 0.4s ease-out 0.5s forwards;
}

/* v2.0.105 — TY COUNTDOWN styles removed: dead CSS (no template ever rendered
   .ty-countdown; the thank-you page has no response-time timer). */

/* ─── TY NEXT STEPS ─────────────────────────────────────── */
.ty-next { margin-bottom: var(--s-8); }
.ty-next__head {
  font-size: var(--t-md);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: var(--s-5);
}
.ty-next__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
@media (max-width: 900px) {
  .ty-next__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .ty-next__grid { grid-template-columns: 1fr; }
}
.ty-next__grid > .ty-step {
  animation: fade-in-up 500ms ease-out backwards;
}
.ty-next__grid > *:nth-child(2) { animation-delay: 80ms; }
.ty-next__grid > *:nth-child(3) { animation-delay: 160ms; }
@media (prefers-reduced-motion: reduce) {
  .ty-next__grid > * { animation-delay: 0ms !important; }
}
.ty-step {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-7) var(--s-5);
  text-align: center;
  transition: var(--transition);
}
.ty-step:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.ty-step__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s-4);
}
.ty-step__icon svg {
  width: 24px;
  height: 24px;
}
.ty-step__title {
  font-size: var(--t-base);
  font-weight: 800;
  margin-bottom: var(--s-2);
}
.ty-step__desc {
  font-size: var(--t-sm);
  color: var(--text-soft);
  line-height: 1.6;
}
@media (max-width: 720px) {
  .ty-next__grid { grid-template-columns: 1fr; }
}

/* ─── TY CONTACT (inline phone/email pills) ───────────── */
.ty-contact { margin-bottom: var(--s-7); }
.ty-contact__lead {
  font-size: var(--t-sm);
  color: var(--text-muted);
  margin-bottom: var(--s-4);
}
.ty-contact__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-4);
}
.ty-contact__item {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 10px var(--s-5);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text);
  transition: var(--transition);
  text-decoration: none;
}
.ty-contact__item:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}
.ty-contact__item svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

/* ─── TY ACTIONS (CTA buttons row) ─────────────────────── */
.ty-actions {
  display: flex;
  justify-content: center;
  gap: var(--s-3);
  margin-bottom: var(--s-7);
  flex-wrap: wrap;
}

/* ─── TY TRUST PILLS (under CTAs) ──────────────────────── */
.ty-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
  padding-top: var(--s-7);
  border-top: 1px solid var(--border);
}
.ty-trust > .ty-trust__pill {
  animation: fade-in-up 500ms ease-out backwards;
}
.ty-trust > *:nth-child(2) { animation-delay: 80ms; }
.ty-trust > *:nth-child(3) { animation-delay: 160ms; }
.ty-trust > *:nth-child(4) { animation-delay: 240ms; }
@media (prefers-reduced-motion: reduce) {
  .ty-trust > * { animation-delay: 0ms !important; }
}
.ty-trust__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 8px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-full);
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--accent);
}
.ty-trust__pill svg {
  width: 12px;
  height: 12px;
}

/* ─── INVENTORY CARDS (while-you-wait suggestions) ─────── */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
@media (max-width: 1024px) {
  .inv-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
}
@media (max-width: 540px) {
  .inv-grid { grid-template-columns: 1fr; }
}
.inv-grid > .inv-card {
  animation: fade-in-up 500ms ease-out backwards;
}
.inv-grid > *:nth-child(2) { animation-delay: 80ms; }
.inv-grid > *:nth-child(3) { animation-delay: 160ms; }
@media (prefers-reduced-motion: reduce) {
  .inv-grid > * { animation-delay: 0ms !important; }
}
.inv-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.inv-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
}
.inv-card__media {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, var(--accent-soft), transparent 50%),
    linear-gradient(45deg, var(--bg-3), var(--bg-2));
  border-bottom: 1px solid var(--border);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inv-card__media svg {
  width: 48px;
  height: 48px;
  color: var(--accent);
  opacity: 0.6;
}
.inv-card__badge {
  position: absolute;
  top: var(--s-3);
  left: var(--s-3);
  padding: 4px 10px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}
.inv-card__body {
  padding: var(--s-5) var(--s-5) var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.inv-card__type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 700;
}
.inv-card__title {
  font-size: var(--t-md);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.inv-card__price {
  font-family: var(--font-mono);
  font-size: var(--t-xl);
  font-weight: 800;
  color: var(--accent);
  margin-top: var(--s-2);
  letter-spacing: -0.02em;
}
.inv-card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-3);
  padding: 10px var(--s-5);
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--r-full);
  font-size: var(--t-xs);
  font-weight: 800;
  letter-spacing: 0.3px;
  align-self: flex-start;
  transition: var(--transition);
}
.inv-card:hover .inv-card__cta {
  transform: translateX(3px);
  box-shadow: var(--shadow-glow);
}
.inv-card__cta svg {
  width: 12px;
  height: 12px;
}
@media (max-width: 900px) {
  .inv-grid { grid-template-columns: 1fr; }
}

.inv-section__cta {
  text-align: center;
  margin-top: var(--s-7);
}

/* ─── THANK-YOU PAGE (active selectors used by tpl-thank-you.php) ─── */
.thank-you__icon {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--s-5);
  border-radius: 50%;
  background: var(--success-soft, rgba(34, 197, 94, 0.10));
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: rgb(34, 197, 94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thank-you__icon svg {
  width: 48px;
  height: 48px;
}

.next-steps {
  display: grid;
  gap: var(--s-5);
  max-width: 720px;
  margin: 0 auto;
}
.next-step {
  display: flex;
  align-items: flex-start;
  gap: var(--s-5);
  padding: var(--s-5);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-align: left;
  transition: var(--transition);
}
.next-step:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.next-step__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 800;
  font-size: var(--t-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.next-step__title {
  font-size: var(--t-md);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 var(--s-2);
}
.next-step__desc {
  font-size: var(--t-sm);
  color: var(--text-soft, var(--text-2));
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 720px) {
  .next-step { flex-direction: column; align-items: stretch; }
}
