/* Luna Post dashboard — same paper, fonts, and tokens as landing.css */

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Regular.90a58d69f647.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Italic.f428fcb135d4.ttf") format("truetype");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "CL Antique No 36";
  src: url("../fonts/F00036.1de9e7a0fa6d.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pinyon Script";
  src: url("../fonts/PinyonScript-Regular.0ebcc0c0afb8.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #2c2620;
  --ink-soft: #6b6357;
  --stamp-red: #9d2b2b;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --display: "CL Antique No 36", Georgia, serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --paper: radial-gradient(circle at 50% 20%, #ffffff 0%, rgba(235, 208, 145, 0.34) 100%) fixed;
}

/* ---- Page shell ---------------------------------------------------------- */
body.dashboard,
body.profile {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ---- Nav (matches landing header exactly) -------------------------------- */
body.dashboard > header,
body.profile > header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding: 1rem 1.6rem;
  font-family: var(--display);
  font-size: 0.78rem;
  background: rgba(253, 250, 244, 0.82);
}
body.dashboard > header a, body.profile > header a { color: var(--ink); text-decoration: none; opacity: 0.78; }
body.dashboard > header a:hover, body.profile > header a:hover { opacity: 1; }
body.dashboard > header > a:first-child, body.profile > header > a:first-child { margin-right: auto; font-size: 0.9rem; letter-spacing: 0.18em; opacity: 1; }

body.dashboard > header .nav-logo,
body.profile > header .nav-logo {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  line-height: 0;
  opacity: 1;
}
body.dashboard > header .nav-logo img, body.profile > header .nav-logo img { height: 46px; width: auto; display: block; }

/* Logged-in nav links + the hamburger that reveals them on narrow screens. */
body.dashboard > header .nav-links, body.profile > header .nav-links { display: flex; align-items: center; gap: 0.4rem; }
body.dashboard > header .nav-links > a:not(:first-child)::before, body.profile > header .nav-links > a:not(:first-child)::before,
body.dashboard > header .nav-links > form:not(:first-child)::before, body.profile > header .nav-links > form:not(:first-child)::before {
  content: "· ";
  opacity: 0.6;
}
body.dashboard > header .nav-logout-form, body.profile > header .nav-logout-form { display: inline; }
body.dashboard > header .nav-logout-btn, body.profile > header .nav-logout-btn {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: inherit; opacity: 0.78; cursor: pointer;
  letter-spacing: inherit; text-transform: inherit;
}
body.dashboard > header .nav-logout-btn:hover, body.profile > header .nav-logout-btn:hover { opacity: 1; }
body.dashboard > header .nav-toggle, body.profile > header .nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 30px; height: 30px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
body.dashboard > header .nav-toggle span, body.profile > header .nav-toggle span {
  display: block;
  width: 100%; height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
body.dashboard .nav-scrim, body.profile .nav-scrim { display: none; }

/* Quiet footer link, echoing the nav's typography. */
body.dashboard > footer, body.profile > footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1rem 1.6rem 2.4rem;
  font-family: var(--display);
  font-size: 0.72rem;
}
body.dashboard > footer a, body.profile > footer a { color: var(--ink-soft); text-decoration: none; opacity: 0.78; }
body.dashboard > footer a:hover, body.profile > footer a:hover { opacity: 1; }

/* ---- Main content area --------------------------------------------------- */
body.dashboard > main,
body.profile > main {
  max-width: 52rem;
  margin: 0 auto;
  padding: calc(4.5rem + 56px) 1.5rem 4rem; /* clear fixed nav */
  box-sizing: border-box;
}

/* ---- Page title ---------------------------------------------------------- */
.dash-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  margin: 0 0 2;
  color: var(--ink);
}

/* ---- Price tag (e.g. the Tarot Letter order form) ------------------------ */
.letter-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.letter-header .dash-title {
  flex: 1 1 auto;
  min-width: 0;
}
.price-tag {
  position: relative;
  width: 11rem;
  flex-shrink: 0;
  transform: rotate(20deg);
}
.price-tag img {
  width: 100%;
  display: block;
}
.price-tag-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 1.8rem;
  color: var(--ink);
}

/* ---- Cards --------------------------------------------------------------- */
.dash-card {
  padding: 1.8rem 0 2rem;
}
.dash-card + .dash-card { border-top: 1px solid rgba(44, 38, 32, 0.18); }
.dash-card:last-child { border-bottom: 1px solid rgba(44, 38, 32, 0.18); }

.dash-card-label {
  font-family: var(--display);
  font-size: 0.7rem;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

.dash-card-heading {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  margin: 0 0 0.6rem;
  line-height: 1.2;
}

.dash-card p {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: var(--ink);
}

.dash-card a {
  color: var(--ink);
}

/* ---- Notice (missing shipping address) ----------------------------------- */
.notice {
  display: block;
  margin: 0.8rem 0;
  padding: 0.8rem 1.1rem;
  border-left: 3px solid var(--stamp-red);
  background: rgba(157, 43, 43, 0.05);
  border-radius: 0 3px 3px 0;
  font-size: 0.95rem;
  color: var(--stamp-red);
}
.notice a { color: inherit; font-weight: 700; }

/* ---- Notice (positive variant — e.g. checkout success) -------------------- */
.notice--success {
  border-left-color: var(--ink);
  background: rgba(44, 38, 32, 0.05);
  color: var(--ink);
}

.shipping-notice {
  margin: 1rem 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---- Status line --------------------------------------------------------- */
.dash-status {
  font-family: var(--display);
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0.6rem 0 0;
}
.dash-status.active { color: var(--ink); }

/* ---- Action buttons ------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 1rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: #4a3b30;
  color: #f6efe0 !important;   /* override .dash-card a { color: var(--ink) } */
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.btn:hover { background: transparent; color: var(--ink) !important; }

.dash-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1rem;
}
.dash-actions form { margin: 0; }

/* ---- Radio group (e.g. cancellation reasons) ------------------------------ */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  cursor: pointer;
}

.radio-option input[type="radio"] {
  appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  flex-shrink: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-content: center;
  cursor: pointer;
}

.radio-option input[type="radio"]::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform 0.15s var(--ease);
}

.radio-option input[type="radio"]:checked::before {
  transform: scale(1);
}

/* ---- Link rows ----------------------------------------------------------- */
.dash-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(44, 38, 32, 0.3);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.dash-link:hover { border-color: var(--ink); }

/* ---- Full signs grid (mirrors landing .signs, scoped to dashboard card) -- */
.signs--dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.8rem, 3vw, 2.5rem);
  margin: 1.4rem 0 0;
  opacity: 1;
  transform: none;
}
.signs--dashboard .sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}
.signs--dashboard .col-head {
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.signs--dashboard .art {
  height: clamp(64px, 10vw, 100px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.signs--dashboard .art img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.signs--dashboard .art .numeral {
  font-family: var(--display);
  font-size: clamp(2.8rem, 6vw, 4rem);
  line-height: 1;
}
.signs--dashboard .name {
  font-weight: 700;
  font-size: 1rem;
}
.signs--dashboard .trait {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.88rem;
  max-width: 12rem;
}
@media (max-width: 500px) {
  .signs--dashboard { grid-template-columns: 1fr; }
}

/* ---- Signs summary (your zodiac profile) --------------------------------- */
.dash-signs {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 0.8rem 0 0;
}
.dash-sign-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.dash-sign-name {
  font-weight: 700;
  font-size: 1.05rem;
}
.dash-sign-label {
  font-family: var(--display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

/* ---- Decorative clouds --------------------------------------------------- */
.dash-clouds {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.dash-cloud {
  position: absolute;
  opacity: 0.55;
  width: clamp(180px, 20vw, 300px);
}
.dash-cloud--left  { left: 0vw;  top: 18%; }
.dash-cloud--right { right: 3vw; top: 42%; }
.dash-cloud--left2 { left: -2vw;  top: 68%; opacity: 0.35; width: clamp(120px, 14vw, 200px); }

/* Lift content above the fixed clouds */
body.dashboard > main, body.profile > main { position: relative; z-index: 1; }

/* ---- Postcard status row ------------------------------------------------- */
.dash-postcard-status {
  margin-top: 1.1rem;
}
.dash-postcard-heading {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.dash-postcard-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.dash-postcard-edition {
  font-size: 1.1rem;
  color: var(--ink-soft);
}
.dash-postcard-pill {
  font-family: var(--display);
  font-size: 0.9rem;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  border: 1px solid currentColor;
}
.dash-postcard-pill--mailed         { color: #3a6b3a; background: rgba(58, 107, 58, 0.07); }
.dash-postcard-pill--delivered      { color: #3a6b3a; background: rgba(58, 107, 58, 0.07); }
.dash-postcard-pill--rendered       { color: var(--ink-soft); background: rgba(107, 99, 87, 0.08); }
.dash-postcard-pill--generated      { color: var(--ink-soft); background: rgba(107, 99, 87, 0.08); }
.dash-postcard-pill--failed         { color: var(--stamp-red); background: rgba(157, 43, 43, 0.07); }
.dash-postcard-pill--pending        { color: var(--ink-soft); background: rgba(107, 99, 87, 0.08); }
.dash-postcard-pill--paid           { color: var(--ink-soft); background: rgba(107, 99, 87, 0.08); }
.dash-postcard-pill--pending_payment { color: var(--ink-soft); background: rgba(107, 99, 87, 0.08); }

/* ---- Rating (post-delivery feedback) ------------------------------------- */
.dash-rating {
  margin-top: 0.9rem;
}
.dash-rating-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.dash-rating-row.is-hidden {
  display: none;
}
.dash-rating-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  background: var(--ink);
  color: #f6efe0;
  font-family: var(--serif);
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.dash-rating-badge.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.dash-rating-form {
  display: inline-flex;
  margin: 0;
}
.dash-rating-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--ink);
  border-radius: 99px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.dash-rating-btn:hover {
  background: var(--ink);
  color: #f6efe0;
}
.dash-rating-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}
.dash-rating-done {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}
.dash-rating-note-form {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}
.dash-rating-note-input {
  font-family: var(--serif);
  font-size: 0.9rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--ink-soft);
  border-radius: 99px;
  background: transparent;
  color: var(--ink);
  min-width: 200px;
}
.dash-rating-note-input::placeholder {
  color: var(--ink-soft);
  font-style: italic;
}
.dash-rating-send-btn {
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--ink);
  border-radius: 99px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.dash-rating-send-btn:hover {
  background: var(--ink);
  color: #f6efe0;
}

/* ---- Letter orders list (Your tarot readings) ---------------------------- */
.letter-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.letter-order-head .dash-card-label { margin: 0; }

/* ---- Billing note + moon list -------------------------------------------- */
.dash-billing-note {
  margin: 1.2rem 0 0;
  font-size: 1rem;
  color: var(--ink-soft);
  font-style: italic;
}
.dash-moons {
  margin-top: 1.2rem;
}
.dash-moon-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.dash-moon-list li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 1.1rem;
}
.dash-moon-list li::before {
  content: "✦";
  font-size: 1rem;
  color: var(--ink-soft);
  flex-shrink: 0;
  position: relative;
  top: -1px;
}
.dash-moon-name {
  font-weight: 700;
  min-width: 10rem;
}
.dash-moon-date {
  color: var(--ink-soft);
  font-style: italic;
}

/* ---- Profile: read-only info grid ---------------------------------------- */
.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1.2rem 2rem;
  margin: 0.8rem 0 0;
}
.profile-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.profile-info-value {
  font-weight: 700;
  font-size: 1.05rem;
}
.profile-info-empty {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
}
.profile-address-block {
  margin: 0.8rem 0 0;
  font-size: 1rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--ink-soft);
}
.profile-address-block strong {
  font-style: normal;
  color: var(--ink);
}

/* ---- Profile: form ------------------------------------------------------- */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 0.4rem;
}
.gift-fields {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.gift-fields[hidden] {
  display: none;
}
.gift-fields .dash-card-heading:not(:first-child) {
  margin-top: 0.6rem;
}
.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.profile-field label {
  font-family: var(--display);
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.profile-field input,
.profile-field select,
.profile-field textarea {
  font-family: var(--serif);
  font-size: 1rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(44, 38, 32, 0.3);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  max-width: 28rem;
  transition: border-color 0.2s;
}
.profile-field textarea {
  max-width: 100%;
  resize: vertical;
  line-height: 1.5;
}
.profile-field input:focus,
.profile-field select:focus,
.profile-field textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}
.profile-field .helptext {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-style: italic;
}
.profile-field .optional {
  font-style: italic;
  opacity: 0.6;
  letter-spacing: 0;
}
.profile-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.profile-field-row .profile-field input { max-width: 100%; }
.profile-save {
  margin-top: 0.4rem;
}

/* ---- Checkbox field (e.g. "This is a gift") ------------------------------ */
.profile-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.profile-checkbox input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--ink);
}
.profile-checkbox label {
  font-family: var(--serif);
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}

/* ---- Manage Subscription: switch / cancel side by side -------------------- */
.manage-plan-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.2rem;
}
.manage-plan-option p { margin: 0.4rem 0; }

/* ---- Manage Subscription: card on file ------------------------------------ */
.payment-method {
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(44, 38, 32, 0.18);
}
.payment-method p { margin: 0.4rem 0; }
.card-on-file {
  font-family: var(--display);
  font-size: 1rem;
  color: var(--ink);
}
.card-brand { font-weight: 700; }
.card-exp { color: var(--ink-soft); }

/* ---- Switch-plan billing preview ------------------------------------------ */
.billing-breakdown {
  margin-top: 1rem;
  border-top: 1px solid rgba(44, 38, 32, 0.18);
}
.billing-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(44, 38, 32, 0.18);
  font-size: 0.98rem;
}
.billing-line--total {
  font-weight: 700;
  font-family: var(--serif);
  font-size: 1.1rem;
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 600px) {
  body.dashboard > main,
  body.profile > main { padding-top: calc(3.5rem + 46px); }
  .dash-title { font-size: 2.4rem; }
  .dash-actions { flex-direction: column; align-items: flex-start; }
  .dash-cloud { display: none; }
  .profile-field-row { grid-template-columns: 1fr; }
  .manage-plan-options { grid-template-columns: 1fr; gap: 1.5rem; }
  .price-tag { width: 6rem; }
  .price-tag-text { font-size: 1.1rem; }

  /* Logged-in nav doesn't fit this narrow — collapse it into a hamburger
     that opens a vertical panel sliding in from the right. */
  body.dashboard > header .nav-toggle, body.profile > header .nav-toggle { display: flex; z-index: 60; }
  body.dashboard > header .nav-links, body.profile > header .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 20rem);
    box-sizing: border-box;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 5.5rem 2rem 2rem;
    background: rgba(253, 250, 244, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: -8px 0 30px rgba(44, 38, 32, 0.18);
    transform: translateX(100%);
    transition: transform 0.28s var(--ease);
    z-index: 55;
    font-size: 1rem;
  }
  body.dashboard > header .nav-links > a:not(:first-child)::before, body.profile > header .nav-links > a:not(:first-child)::before,
  body.dashboard > header .nav-links > form:not(:first-child)::before, body.profile > header .nav-links > form:not(:first-child)::before {
    content: none;
  }
  body.dashboard.nav-open > header .nav-links, body.profile.nav-open > header .nav-links { transform: translateX(0); }
  body.dashboard .nav-scrim, body.profile .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(44, 38, 32, 0.35);
    z-index: 54;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s var(--ease);
  }
  body.dashboard.nav-open .nav-scrim, body.profile.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  body.dashboard.nav-open, body.profile.nav-open { overflow: hidden; }
}
