/* =====================================================
   NEST — Auth, Settings, Offer Detail styles
   ===================================================== */

/* ============ AUTH PAGES ============ */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-side {
  background: linear-gradient(135deg, #b08968 0%, #8a6f56 50%, #1d1d1f 100%);
  position: relative;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: white;
}

.auth-side::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.auth-side::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  border-radius: 50%;
}

.auth-side .logo {
  color: white;
  position: relative;
  z-index: 1;
}

.auth-side .logo-dot { background: white; }

.auth-side-quote {
  position: relative;
  z-index: 1;
}

.auth-side-quote h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.auth-side-quote h2 em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
}

.auth-side-quote p {
  font-size: 15px;
  opacity: 0.7;
  line-height: 1.5;
  max-width: 400px;
}

.auth-form-side {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 56px;
  position: relative;
}

.auth-form-side .back-link {
  position: absolute;
  top: 32px;
  left: 32px;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}
.auth-form-side .back-link:hover { color: var(--ink); }

.auth-form {
  width: 100%;
  max-width: 400px;
}

.auth-form h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.auth-form > p.lead {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 36px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-elev);
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-help {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 6px;
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
  display: none;
}

.form-error.show { display: block; }

.form-group.error input,
.form-group.error select {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.08);
}

.btn-submit {
  width: 100%;
  background: var(--ink);
  color: white;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 12px;
}

.btn-submit:hover {
  background: #2d2d2f;
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}

.auth-footer a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}

.auth-footer a:hover { border-bottom-color: var(--ink); }

.auth-divider {
  margin: 24px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-faint);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Role select on register */
.role-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.role-option {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  cursor: pointer;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-option:hover { background: var(--warm); }

.role-option.selected {
  border-color: var(--accent);
  background: rgba(0, 113, 227, 0.04);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.08);
}

.role-option-icon {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}

.role-option-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.role-option-desc {
  font-size: 12px;
  color: var(--ink-soft);
}

/* ============ SETTINGS PAGE ============ */
.settings-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 32px 80px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
}

.settings-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.settings-sidebar h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.settings-sidebar > p {
  color: var(--ink-soft);
  font-size: 13px;
  margin-bottom: 24px;
}

.settings-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.settings-nav a:hover { background: var(--warm); color: var(--ink); }
.settings-nav a.active {
  background: var(--ink);
  color: white;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.settings-panel {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.settings-panel h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.settings-panel > p.panel-desc {
  color: var(--ink-soft);
  font-size: 14px;
  margin-bottom: 24px;
}

.settings-avatar-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}

.settings-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4c4b0 0%, #b08968 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-size: 36px;
  color: white;
}

/* Mode toggle - guest/host */
.mode-toggle-card {
  background: var(--warm);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.mode-toggle-card-text {
  font-size: 14px;
}

.mode-toggle-card-text strong { font-weight: 600; }
.mode-toggle-card-text p { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }

/* iOS-style switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 30px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--ink-faint);
  border-radius: 980px;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-slider::before {
  content: '';
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.switch input:checked + .switch-slider { background: #34c759; }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* ============ OFFER DETAIL PAGE ============ */
.offer-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 32px 80px;
}

.offer-detail-header {
  margin-bottom: 32px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb svg { width: 12px; height: 12px; }

.offer-detail h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.offer-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ink-soft);
  font-size: 14px;
  flex-wrap: wrap;
}

.offer-detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  margin-top: 8px;
}

.offer-detail-main { display: flex; flex-direction: column; gap: 32px; }

.detail-card {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.detail-card h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

/* Host card on the right */
.host-card-large {
  position: sticky;
  top: 100px;
  align-self: start;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.host-card-large .host-avatar {
  width: 72px;
  height: 72px;
  font-size: 32px;
  margin: 0 auto 16px;
}

.host-card-large .host-meta {
  text-align: center;
  margin-bottom: 20px;
}

.host-card-large .host-meta .host-name {
  font-size: 20px;
  margin-bottom: 6px;
}

.host-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 20px;
}

.host-stat {
  text-align: center;
}

.host-stat-value {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

.host-stat-label {
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.host-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* House rules in detail */
.detail-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--warm);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--ink);
}

.detail-rule svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  flex-shrink: 0;
}

/* Map container */
.map-container {
  height: 360px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  position: relative;
}

#map { width: 100%; height: 100%; }

.map-address {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-address svg { width: 16px; height: 16px; stroke: var(--gold); }

/* Reviews */
.review-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 14px;
}

.review-item:last-child { border-bottom: none; padding-bottom: 0; }

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Instrument Serif', serif;
  font-size: 16px;
  background: linear-gradient(135deg, #c9d6df 0%, #52796f 100%);
}

.review-content { flex: 1; }

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
}

.review-author { font-weight: 600; }
.review-date { color: var(--ink-faint); }

.review-rating {
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 6px;
}

.review-text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Loading state */
.skeleton {
  background: linear-gradient(90deg, var(--warm) 0%, var(--line-soft) 50%, var(--warm) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============ NESTED OPTIONS ============ */
.nested-options {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding: 0 20px;
  background: var(--warm);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid var(--line-soft);
  border-top: none;
  margin-top: -4px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              padding 0.3s ease;
}
.nested-options.open {
  max-height: 300px;
  opacity: 1;
  padding: 14px 20px 18px;
  gap: 12px;
  margin-bottom: 0;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--ink);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #000;
}
.nested-options.open .checkbox-item { opacity: 1; transform: translateY(0); }
.nested-options.open .checkbox-item:nth-child(1) { transition-delay: 0.05s; }
.nested-options.open .checkbox-item:nth-child(2) { transition-delay: 0.10s; }
.nested-options.open .checkbox-item:nth-child(3) { transition-delay: 0.15s; }
.nested-options.open .checkbox-item:nth-child(4) { transition-delay: 0.20s; }

/* Toggle card that has a nested panel below it gets flat bottom corners */
.mode-toggle-card { transition: border-radius 0.3s ease; }
.mode-toggle-card.expanded {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Wrapper that groups the toggle + nested panel as one visual unit */
.toggle-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
/* ============ MODAL ===============*/




/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-form-side { padding: 32px 24px; min-height: 100vh; }

  .settings-wrap { grid-template-columns: 1fr; gap: 24px; padding: 100px 20px 60px; }
  .settings-sidebar { position: static; }
  .settings-nav { flex-direction: row; overflow-x: auto; gap: 6px; }
  .settings-nav a { white-space: nowrap; }

  .offer-detail-grid { grid-template-columns: 1fr; }
  .host-card-large { position: static; }
  .detail-rules { grid-template-columns: 1fr; }
  .offer-detail { padding: 100px 20px 60px; }
}

@media (max-width: 540px) {
  .form-row { grid-template-columns: 1fr; }
  .role-select { grid-template-columns: 1fr; }
  .auth-form h1 { font-size: 36px; }
}
