/* =====================================================================
   WTT ACCOUNT SYSTEM STYLES
   Styles the [wtt_register_form] and [wtt_dashboard] shortcode output.
   Extends the existing WTT design tokens from main.css (--wtt-green,
   --wtt-terracotta, etc.) and reuses the [data-animate] reveal pattern
   and day/night language from the homepage flight section.
===================================================================== */

@media (prefers-reduced-motion: reduce) {
  .wtt-dashboard *,
  .wtt-auth-form-wrap * {
    animation: none !important;
    transition: none !important;
  }
}

[data-animate] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.16,.8,.3,1), transform .7s cubic-bezier(.16,.8,.3,1);
}
[data-animate].is-visible { opacity: 1; transform: translateY(0); }
[data-animate="1"].is-visible { transition-delay: .05s; }
[data-animate="2"].is-visible { transition-delay: .15s; }
[data-animate="3"].is-visible { transition-delay: .25s; }
[data-animate="4"].is-visible { transition-delay: .35s; }
[data-animate="5"].is-visible { transition-delay: .45s; }

/* ---------------------------------------------------------------------
   AUTH PAGE (registration / magic-link request)
   Rendered wherever [wtt_register_form] is placed. wtt-auth-page gives
   the page real breathing room since these are plain WordPress Pages
   with no hero section of their own -- without it the card sits
   crammed against the theme's default top padding.
--------------------------------------------------------------------- */
.wtt-auth-page {
  background: var(--wtt-sand);
  padding: 72px 24px 96px;
  min-height: 60vh;
}

.wtt-auth-form-wrap {
  max-width: 460px;
  margin: 0 auto;
  background: var(--wtt-cream);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 24px 50px -20px rgba(26,58,42,0.22);
}
.wtt-auth-form-wrap .wtt-eyebrow {
  font-family: var(--font-body);
  font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--wtt-terracotta);
  display: block; margin-bottom: 10px;
}
.wtt-auth-form-wrap h1 {
  font-family: var(--font-display);
  color: var(--wtt-green);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  margin-bottom: 10px;
}
.wtt-auth-form-wrap h1 em { font-style: italic; color: var(--wtt-terracotta); }
.wtt-auth-intro {
  font-size: 14px; color: var(--wtt-text-mid); line-height: 1.6;
  margin-bottom: 24px;
}
.wtt-auth-switch {
  font-size: 13px; color: var(--wtt-text-mid);
  margin-bottom: 22px; margin-top: -6px;
}
.wtt-auth-switch a { color: var(--wtt-terracotta); font-weight: 600; }

.wtt-field { margin-bottom: 16px; }
.wtt-field label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--wtt-text-mid); margin-bottom: 6px;
}
.wtt-field-optional { font-weight: 400; color: var(--wtt-text-light); }
.wtt-field input,
.wtt-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--wtt-sand-dark);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--wtt-text) !important;
  background: var(--wtt-cream);
  color-scheme: light;
  -webkit-text-fill-color: var(--wtt-text);
  transition: border-color .2s, box-shadow .2s;
}
.wtt-field input:focus,
.wtt-field select:focus {
  outline: none;
  border-color: var(--wtt-green-light);
  box-shadow: 0 0 0 3px rgba(74,140,101,0.18);
}
.wtt-field input::placeholder {
  color: var(--wtt-text-light);
  opacity: 1;
}
/* Chrome/Safari autofill (e.g. a saved email) forces its own yellow
   background and dark text otherwise -- this keeps it on-brand. */
.wtt-field input:-webkit-autofill,
.wtt-field input:-webkit-autofill:hover,
.wtt-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--wtt-text);
  -webkit-box-shadow: 0 0 0px 1000px var(--wtt-cream) inset;
  box-shadow: 0 0 0px 1000px var(--wtt-cream) inset;
  transition: background-color 5000s ease-in-out 0s;
}

.wtt-honeypot { position: absolute; left: -9999px; top: -9999px; opacity: 0; }

.wtt-auth-form .wtt-btn-primary { width: 100%; justify-content: center; }

.wtt-form-footnote {
  font-size: 12px; color: var(--wtt-text-light);
  margin-top: 10px; text-align: center;
}

.wtt-form-notice {
  padding: 12px 14px; border-radius: 8px; font-size: 13.5px;
  margin-bottom: 18px;
}
.wtt-form-notice-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.wtt-form-notice-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }

.wtt-account-msg {
  text-align: center; padding: 40px 24px; color: var(--wtt-text-mid); font-size: 15px;
}
.wtt-account-msg a { color: var(--wtt-terracotta); font-weight: 600; }

/* ---------------------------------------------------------------------
   DASHBOARD ([wtt_dashboard])
--------------------------------------------------------------------- */
.wtt-dashboard-page {
  background: var(--wtt-sand);
  padding: 64px 24px 90px;
  min-height: 60vh;
}
.wtt-dashboard { max-width: 1080px; margin: 0 auto; }

.wtt-dashboard-greeting { margin-bottom: 32px; }
.wtt-dashboard-greeting .wtt-eyebrow {
  font-family: var(--font-body);
  font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--wtt-terracotta);
  display: block; margin-bottom: 8px;
}
.wtt-dashboard-greeting h1 {
  font-family: var(--font-display);
  color: var(--wtt-green);
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 12px;
}
.wtt-dashboard-greeting-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.wtt-dashboard-persona { font-size: 13.5px; color: var(--wtt-text-mid); }

.wtt-pill {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  padding: 4px 12px; border-radius: 20px;
}
.wtt-pill-free { background: var(--wtt-sand-dark); color: var(--wtt-green); }
.wtt-pill-premium {
  background: linear-gradient(120deg, var(--wtt-terracotta), var(--wtt-terracotta-lt));
  color: #fff;
}

.wtt-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: start;
}
.wtt-dash-card-wide { grid-column: 1 / -1; }

.wtt-dash-card {
  background: var(--wtt-cream);
  border: 1px solid var(--wtt-border);
  border-radius: 14px;
  padding: 26px 24px;
  transition: transform .35s cubic-bezier(.16,.8,.3,1), box-shadow .35s;
}
.wtt-dash-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -18px rgba(26,58,42,0.22);
}
.wtt-dash-card h2 {
  font-family: var(--font-display);
  color: var(--wtt-green);
  font-size: 17px;
  margin-bottom: 16px;
}
.wtt-dash-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.wtt-dash-card-header h2 { margin-bottom: 0; }
.wtt-saved-count {
  font-size: 12px; font-weight: 600; color: var(--wtt-text-light);
  background: var(--wtt-sand); padding: 3px 10px; border-radius: 12px;
}

.wtt-empty-state { text-align: center; padding: 12px 0; }
.wtt-empty-state p { font-size: 14px; color: var(--wtt-text-mid); margin-bottom: 4px; }
.wtt-empty-sub { font-size: 12.5px; color: var(--wtt-text-light); margin-bottom: 18px; }

.wtt-btn-ghost-dark {
  display: inline-block;
  border: 1px solid var(--wtt-green);
  color: var(--wtt-green);
  padding: 9px 20px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  transition: background .2s, color .2s;
}
.wtt-btn-ghost-dark:hover { background: var(--wtt-green); color: #fff; }

.wtt-saved-guide-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.wtt-saved-guide-card {
  text-decoration: none;
  display: flex; align-items: center; gap: 12px;
  background: var(--wtt-sand);
  border: 1px solid var(--wtt-border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: background .2s;
}
.wtt-saved-guide-card:hover { background: var(--wtt-sand-dark); }
.wtt-saved-guide-thumb {
  width: 44px; height: 44px; border-radius: 7px;
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.wtt-saved-guide-title { font-size: 13.5px; font-weight: 600; color: var(--wtt-green); }
.wtt-saved-guide-sub { font-size: 12px; color: var(--wtt-text-light); }

.wtt-search-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.wtt-search-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--wtt-sand);
  border: 1px solid var(--wtt-border);
  border-radius: 10px;
  padding: 10px 10px 10px 14px;
}
.wtt-search-link {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.wtt-search-icon { font-size: 15px; flex-shrink: 0; }
.wtt-search-label {
  font-size: 13.5px; font-weight: 600; color: var(--wtt-green);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wtt-search-delete {
  flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  border: none; background: transparent;
  color: var(--wtt-text-light); font-size: 18px; line-height: 1;
  cursor: pointer; transition: background .2s, color .2s;
}
.wtt-search-delete:hover { background: var(--wtt-sand-dark); color: #b91c1c; }
.wtt-search-delete:disabled { opacity: 0.4; cursor: default; }

.wtt-profile-form .wtt-btn-accent { width: 100%; justify-content: center; }

.wtt-dash-card-tier {
  background: linear-gradient(160deg, var(--wtt-green) 0%, var(--wtt-green-mid) 100%);
  border: none;
}
.wtt-dash-card-tier h2 { color: #fff; }
.wtt-tier-current {
  font-family: var(--font-display);
  font-size: 26px; color: #fff; margin-bottom: 10px;
}
.wtt-tier-copy { font-size: 13px; color: rgba(255,255,255,0.72); line-height: 1.6; margin-bottom: 18px; }
.wtt-tier-soon {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.75);
  padding: 6px 14px; border-radius: 20px;
}
.wtt-dash-card-tier .wtt-btn-accent { width: 100%; justify-content: center; }

.wtt-dashboard-footer { margin-top: 32px; text-align: center; }
.wtt-logout-link {
  font-size: 13px; color: var(--wtt-text-light);
  border-bottom: 1px solid var(--wtt-border);
  padding-bottom: 2px;
}
.wtt-logout-link:hover { color: var(--wtt-text-mid); }

@media (max-width: 900px) {
  .wtt-dashboard-grid { grid-template-columns: 1fr; }
  .wtt-auth-form-wrap { padding: 28px 22px; }
  .wtt-auth-page { padding: 48px 16px 64px; }
  .wtt-dashboard-page { padding: 40px 16px 64px; }
}
