/* My Trips (/my-trips): guest login, trips and profile. Uses the site's
   colours and buttons from style.css. Inputs are 16px so iPhones don't zoom. */

.mt-main { background: var(--color-surface-muted); }
.mt-wrap { padding-top: 40px; padding-bottom: 72px; }
.mt-shell { max-width: 640px; margin: 0 auto; }

.mt-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
  margin-bottom: 18px;
}
.mt-loading { display: flex; align-items: center; gap: 12px; color: var(--color-text-muted); }
.mt-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid #e6e6df; border-top-color: var(--color-black);
  animation: mt-spin 0.8s linear infinite;
}
@keyframes mt-spin { to { transform: rotate(360deg); } }

.mt-kicker {
  display: inline-block; padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--color-accent); font-size: 12px; font-weight: 800; letter-spacing: 0.03em;
  text-transform: uppercase; margin-bottom: 14px;
}
.mt-card h1 { font-size: clamp(28px, 5vw, 38px); line-height: 1.15; margin: 0 0 10px; }
.mt-card h2 { font-size: 20px; margin: 0 0 6px; }
.mt-lead { color: var(--color-text-muted); margin: 0 0 22px; line-height: 1.6; }
.mt-muted { color: var(--color-text-muted); font-size: 14px; line-height: 1.55; }
.mt-small { font-size: 13px; }

/* Forms */
.mt-form { display: grid; gap: 16px; }
.mt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.mt-field { display: grid; gap: 6px; min-width: 0; }
.mt-field > span { font-size: 13px; font-weight: 700; }
.mt-field input, .mt-field select {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid #d9d9d0;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
  font: inherit;
  font-size: 16px;
}
.mt-field input:focus, .mt-field select:focus { outline: none; border-color: var(--color-black); box-shadow: 0 0 0 3px rgba(214, 255, 63, 0.6); }
.mt-field input[readonly] { background: var(--color-surface-muted); color: var(--color-text-muted); }
.mt-field small { color: var(--color-text-muted); font-size: 12px; }
.mt-code-input {
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 28px !important;
  letter-spacing: 10px;
  text-align: center;
  font-weight: 700;
}
.mt-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; cursor: pointer; }
.mt-check input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--color-black); }

.mt-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.mt-actions .btn { min-height: 48px; }
.mt-link {
  background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 700;
  color: var(--color-black); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.mt-link[disabled] { color: var(--color-text-muted); cursor: default; text-decoration: none; }

.mt-error {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: #fde8eb; color: #9b1c2e; font-size: 14px; line-height: 1.5;
}
.mt-ok {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: #eefcd0; color: #34460a; font-size: 14px; line-height: 1.5;
}
.mt-hidden { display: none !important; }

/* Signed in */
.mt-hello { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.mt-hello h1 { font-size: clamp(26px, 5vw, 34px); margin: 0 0 4px; }
.mt-tabs {
  display: flex; gap: 6px; padding: 5px; margin-bottom: 18px;
  background: #fff; border-radius: var(--radius-pill); box-shadow: var(--shadow-card);
  overflow-x: auto; scrollbar-width: none;
}
.mt-tabs::-webkit-scrollbar { display: none; }
.mt-tab {
  flex: 1 0 auto; border: 0; background: none; cursor: pointer;
  padding: 11px 18px; border-radius: var(--radius-pill);
  font: inherit; font-size: 15px; font-weight: 700; color: var(--color-text-muted);
}
.mt-tab[aria-selected="true"] { background: var(--color-black); color: #fff; }

.mt-empty { text-align: center; padding: 40px 28px; }
.mt-empty-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--color-accent); display: flex; align-items: center; justify-content: center;
}
.mt-empty .mt-actions { justify-content: center; margin-top: 18px; }

.mt-section-title { font-size: 13px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-text-muted); margin: 6px 0 -4px; }
.mt-email-row { display: flex; gap: 10px; align-items: flex-end; }
.mt-email-row .mt-field { flex: 1; }
.mt-email-row .btn { min-height: 48px; padding-inline: 18px; }

.mt-signout { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 8px; }

/* Trips */
.mt-group-title { font-size: 13px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-text-muted); margin: 26px 4px 10px; }
.mt-trip { padding: 0; overflow: hidden; }
.mt-trip > :not(.mt-trip-photo) { margin-left: 28px; margin-right: 28px; }
.mt-trip > :last-child { margin-bottom: 26px; }
.mt-trip-photo { aspect-ratio: 16 / 7; background: var(--color-surface-muted); }
.mt-trip-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-trip-head { padding-top: 22px; }
.mt-trip-head h2 { font-size: 22px; line-height: 1.25; margin: 10px 0 4px; }
.mt-pill {
  display: inline-block; padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 800; background: var(--color-surface-muted); color: var(--color-text);
}
.mt-pill-confirmed, .mt-pill-active { background: var(--color-accent); }
.mt-pill-tentative, .mt-pill-pending { background: #fff3c4; color: #6b4e00; }
.mt-pill-cancelled, .mt-pill-expired, .mt-pill-refunded { background: #fde8eb; color: #9b1c2e; }
.mt-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0 0; font-size: 14px; }
.mt-facts dt { color: var(--color-text-muted); }
.mt-facts dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.mt-note { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--color-surface-muted); font-size: 14px; line-height: 1.5; }
.mt-money { margin-top: 16px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid #ecece4; display: grid; gap: 8px; font-size: 14px; }
.mt-money > div { display: flex; justify-content: space-between; gap: 12px; }
.mt-money span { color: var(--color-text-muted); }
.mt-money strong { text-align: right; }
.mt-money.is-overdue { border-color: #f3b6bf; }
.mt-details { margin-top: 10px; font-size: 14px; }
.mt-packages { margin-top: 10px; margin-bottom: 0; }
.mt-details summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.mt-details ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.mt-details li { display: flex; justify-content: space-between; gap: 12px; color: var(--color-text-muted); }
.mt-details li strong { color: var(--color-text); }
.mt-doc-actions { margin-top: 18px; gap: 10px; }
.mt-doc-actions .btn { min-height: 42px; }

/* Gifts & more */
.mt-gift-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mt-gift-head h2 { margin: 10px 0 4px; }
.mt-gift-balance { text-align: right; flex-shrink: 0; }
.mt-gift-balance span { display: block; font-size: 12px; color: var(--color-text-muted); }
.mt-gift-balance strong { font-size: 22px; }
.mt-gift-code { font-family: 'Courier New', Courier, monospace; font-size: 20px; font-weight: 700; letter-spacing: 2px; margin: 14px 0 6px; }
.mt-warn { color: #9b1c2e; font-weight: 700; }
.mt-gift .mt-actions { margin-top: 14px; }
.mt-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #f0f0ea; }
.mt-row:first-child { padding-top: 0; }
.mt-row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.mt-row p { margin: 2px 0 0; }
.mt-row .btn { flex-shrink: 0; }

/* Actions on a trip, pop-up sheets */
.mt-trip-actions { margin-top: 12px; gap: 16px; }
.mt-sheet {
  position: fixed; inset: 0; z-index: 1000; background: rgba(20, 20, 15, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.mt-sheet-box {
  background: #fff; border-radius: var(--radius-card); width: min(560px, 100%);
  max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.mt-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px 10px; }
.mt-sheet-head h2 { font-size: 20px; margin: 0; }
.mt-sheet-close { border: 0; background: var(--color-surface-muted); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; }
.mt-sheet-body { padding: 6px 22px 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
html.mt-sheet-open, html.mt-sheet-open body { overflow: hidden; }
.mt-people { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid #f0f0ea; }
.mt-people li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0ea; font-size: 15px; }
.mt-people small { color: var(--color-text-muted); }
.mt-done { color: #3d6b00; font-size: 13px; white-space: nowrap; }
.mt-missing { color: #9b1c2e; font-size: 13px; white-space: nowrap; }
.mt-share { margin-top: 18px; padding-top: 14px; border-top: 1px solid #f0f0ea; }
.mt-choices { display: grid; gap: 10px; }
.mt-field textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid #d9d9d0; border-radius: var(--radius-sm);
  font: inherit; font-size: 16px; resize: vertical;
}
.mt-policy { padding: 12px 14px; border-radius: var(--radius-sm); background: #fff8e1; font-size: 14px; line-height: 1.5; }
.mt-policy ul { margin: 6px 0 8px; padding-left: 18px; list-style: disc; }
.mt-policy li { margin: 2px 0; }
.mt-policy a { font-weight: 700; color: var(--color-black); }
.mt-danger { border: 1.5px solid #f3d2d7; box-shadow: none; }
.mt-danger h2 { color: #9b1c2e; }

@media (max-width: 600px) {
  .mt-wrap { padding-top: 20px; padding-bottom: 48px; }
  .mt-card { padding: 22px 18px; border-radius: 16px; }
  .mt-grid { grid-template-columns: 1fr; }
  .mt-actions .btn { width: 100%; }
  .mt-email-row { flex-direction: column; align-items: stretch; }
  .mt-tab { padding: 10px 14px; font-size: 14px; }
  .mt-trip { padding: 0; }
  .mt-trip > :not(.mt-trip-photo) { margin-left: 18px; margin-right: 18px; }
  .mt-trip > :last-child { margin-bottom: 20px; }
  .mt-doc-actions .btn { width: 100%; }
  .mt-row { flex-wrap: wrap; }
  .mt-row .btn { width: 100%; }
  .mt-sheet { padding: 0; align-items: flex-end; }
  .mt-sheet-box { border-radius: 18px 18px 0 0; max-height: 92dvh; }
  .mt-sheet-head { padding: 16px 18px 8px; }
  .mt-sheet-body { padding: 4px 18px 22px; }
  .mt-trip-actions .btn { width: 100%; }
}
