/**
 * Virtual Cellar — Auth pages (login & register)
 * Design system: Cormorant Garamond · Cinzel · DM Sans
 * Palette: warm cream / amber / dark whisky
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600&family=DM+Sans:wght@300;400;500;600&family=Cinzel:wght@400;600;700&display=swap');

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --va-bg:        #faf6ef;
  --va-bg2:       #f5edd8;
  --va-amber:     #b87318;
  --va-amber-dk:  #8a5510;
  --va-amber-lt:  #d4890a;
  --va-gold:      #c8991a;
  --va-copper:    #9a5025;
  --va-dark:      #2a1205;
  --va-text:      #1a1208;
  --va-text-mid:  #4a3820;
  --va-text-dim:  #8a7050;
  --va-border:    rgba(180,110,20,0.18);
  --va-border-md: rgba(180,110,20,0.28);
  --va-shadow:    0 8px 48px rgba(100,60,10,0.12);
  --va-radius:    3px;
  --va-font-d:    'Cormorant Garamond', Georgia, serif;
  --va-font-t:    'Cinzel', 'Times New Roman', serif;
  --va-font-b:    'DM Sans', system-ui, sans-serif;
}

/* ── Page wrapper ────────────────────────────────────────────── */
.vc-auth-page {
  min-height: 78vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3.5rem 1.5rem 6rem;
  background: linear-gradient(145deg, #fff8f0 0%, #faf2e0 45%, #f4e6c4 100%);
  font-family: var(--va-font-b);
  position: relative;
  overflow: hidden;
}

/* Decorative background whisky drops */
.vc-auth-page::before,
.vc-auth-page::after {
  content: '🥃';
  position: absolute;
  pointer-events: none;
  line-height: 1;
}
.vc-auth-page::before {
  font-size: 10rem;
  top: 2rem;
  right: 4%;
  opacity: 0.05;
  transform: rotate(-18deg);
}
.vc-auth-page::after {
  font-size: 7rem;
  bottom: 3rem;
  left: 5%;
  opacity: 0.04;
  transform: rotate(14deg);
}

/* ── Card ────────────────────────────────────────────────────── */
.vc-auth-card {
  background: #fff;
  border: 1px solid var(--va-border);
  border-radius: 4px;
  padding: 2.75rem 2.75rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--va-shadow);
  position: relative;
  margin-top: 1rem;
}

/* Gold accent bar at top */
.vc-auth-card::before {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--va-amber-dk) 0%, var(--va-gold) 50%, var(--va-amber-dk) 100%);
  border-radius: 4px 4px 0 0;
}

.vc-auth-card--wide {
  max-width: 700px;
}

/* ── Brand block ─────────────────────────────────────────────── */
.vc-auth-brand {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--va-border);
}
.vc-auth-brand__logo {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.vc-auth-brand__name {
  font-family: var(--va-font-t);
  font-size: 1rem;
  font-weight: 600;
  color: var(--va-amber-dk);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}
.vc-auth-brand__tagline {
  font-size: 0.76rem;
  color: var(--va-text-dim);
  letter-spacing: 0.1em;
  margin: 0.2rem 0 0;
}

/* ── Title & subtitle ────────────────────────────────────────── */
.vc-auth-card__title {
  font-family: var(--va-font-d);
  font-size: 2.1rem;
  font-weight: 300;
  color: var(--va-dark);
  margin: 0 0 0.3rem;
  line-height: 1.12;
}
.vc-auth-card__sub {
  font-size: 0.9rem;
  color: var(--va-text-dim);
  margin: 0 0 1.8rem;
  line-height: 1.6;
}

/* ── Alerts ──────────────────────────────────────────────────── */
.vc-auth-error,
.vc-auth-notice {
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  border-radius: var(--va-radius);
  line-height: 1.5;
}
.vc-auth-error {
  background: rgba(200,40,40,0.06);
  border: 1px solid rgba(200,40,40,0.22);
  border-left: 3px solid #c82828;
  color: #9a1a1a;
}
.vc-auth-notice {
  background: rgba(40,140,60,0.06);
  border: 1px solid rgba(40,140,60,0.22);
  border-left: 3px solid #288c3c;
  color: #1a6628;
}

/* ── Fieldset sections ───────────────────────────────────────── */
.vc-auth-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.vc-auth-fieldset legend {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--va-amber);
  margin-bottom: 1rem;
  padding-bottom: 0;
}
.vc-auth-fieldset legend::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--va-border);
}

/* ── Two-col grid inside fieldset ────────────────────────────── */
.vc-auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}

/* ── Field ───────────────────────────────────────────────────── */
.vc-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-bottom: 0.85rem;
}
/* No margin inside fieldset — grid handles spacing */
.vc-auth-fieldset .vc-auth-field,
.vc-auth-grid .vc-auth-field { margin-bottom: 0; }

.vc-auth-field label {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--va-text-mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Inline row inside label (e.g. label + "forgot?" link) */
.vc-auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.3rem;
}
.vc-auth-label-row label {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--va-text-mid);
}
.vc-auth-label-row a {
  font-size: 0.79rem;
  font-weight: 400;
  color: var(--va-amber);
  text-decoration: none;
}
.vc-auth-label-row a:hover { text-decoration: underline; }

.vc-auth-optional {
  font-weight: 400;
  color: var(--va-text-dim);
  font-size: 0.75rem;
}
.vc-auth-field__hint {
  font-size: 0.76rem;
  color: var(--va-text-dim);
  margin: 0.2rem 0 0;
  line-height: 1.5;
}

/* ── Inputs ──────────────────────────────────────────────────── */
.vc-auth-field input[type="text"],
.vc-auth-field input[type="email"],
.vc-auth-field input[type="password"],
.vc-auth-field textarea,
.vc-auth-field select {
  width: 100%;
  padding: 0.68rem 1rem;
  border: 1.5px solid #ddd2c0;
  border-radius: var(--va-radius);
  font-family: var(--va-font-b);
  font-size: 0.95rem;
  color: var(--va-text);
  background: var(--va-bg);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
}
.vc-auth-field input:focus,
.vc-auth-field textarea:focus,
.vc-auth-field select:focus {
  border-color: var(--va-amber);
  box-shadow: 0 0 0 3px rgba(184,115,24,0.1);
  background: #fff;
}
.vc-auth-field textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}
.vc-auth-field select option { background: #fff; }

/* Password with toggle button */
.vc-auth-pw-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.vc-auth-pw-wrap input {
  flex: 1;
  padding-right: 3rem;
}
.vc-auth-pw-toggle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2.75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--va-text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.vc-auth-pw-toggle:hover { color: var(--va-amber); }

/* Password strength bar */
.vc-auth-strength {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 0.35rem;
  height: 1.2rem;
}
.vc-auth-strength__bars {
  display: flex;
  gap: 3px;
  flex: 1;
}
.vc-auth-strength__bar {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: #ddd;
  transition: background 0.2s;
}
.vc-auth-strength__bar.active-1 { background: #e04040; }
.vc-auth-strength__bar.active-2 { background: #e07820; }
.vc-auth-strength__bar.active-3 { background: #c8991a; }
.vc-auth-strength__bar.active-4 { background: #4aaa50; }
.vc-auth-strength__bar.active-5 { background: #2a8840; }
.vc-auth-strength__label {
  font-size: 0.72rem;
  font-weight: 600;
  min-width: 60px;
  text-align: right;
  color: var(--va-text-dim);
  transition: color 0.2s;
}

/* ── Checkbox ────────────────────────────────────────────────── */
.vc-auth-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.87rem;
  color: var(--va-text-mid);
  cursor: pointer;
  margin-bottom: 1.5rem;
  line-height: 1.55;
}
.vc-auth-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 0.2rem;
  accent-color: var(--va-amber-dk);
  flex-shrink: 0;
  cursor: pointer;
}
.vc-auth-check--terms {
  background: var(--va-bg);
  border: 1px solid var(--va-border);
  border-radius: var(--va-radius);
  padding: 0.85rem 1rem;
}
.vc-auth-check a { color: var(--va-amber); }

/* ── Submit button ───────────────────────────────────────────── */
.vc-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.9rem 2rem;
  background: var(--va-amber-dk);
  color: #fff;
  border: none;
  border-radius: var(--va-radius);
  font-family: var(--va-font-b);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-bottom: 1.5rem;
}
.vc-auth-btn:hover {
  background: var(--va-amber);
  transform: translateY(-1px);
  box-shadow: 0 5px 22px rgba(184,115,24,0.38);
}
.vc-auth-btn:active { transform: translateY(0); }
.vc-auth-btn svg { flex-shrink: 0; }

/* ── Switch link ─────────────────────────────────────────────── */
.vc-auth-switch {
  text-align: center;
  font-size: 0.9rem;
  color: var(--va-text-dim);
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--va-border);
}
.vc-auth-switch a {
  color: var(--va-amber-dk);
  font-weight: 600;
  text-decoration: none;
}
.vc-auth-switch a:hover { text-decoration: underline; }

/* ── Already logged in ───────────────────────────────────────── */
.vc-auth-already {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--va-text-mid);
}
.vc-auth-already a { color: var(--va-amber); }

/* ── Divider ─────────────────────────────────────────────────── */
.vc-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  color: var(--va-text-dim);
  font-size: 0.78rem;
}
.vc-auth-divider::before,
.vc-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--va-border);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .vc-auth-card { padding: 2rem 1.5rem; }
  .vc-auth-card--wide { padding: 2rem 1.4rem; }
  .vc-auth-grid { grid-template-columns: 1fr; gap: 0; }
  .vc-auth-page::before { font-size: 6rem; }
  .vc-auth-page::after  { display: none; }
}

/* ── Profile form (inside My Cellar) ─────────────────────────── */
.vc-profile-form {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 1rem;
}
.vc-profile-form .vc-auth-fieldset legend {
  color: rgba(255,255,255,0.55);
}
.vc-profile-form .vc-auth-fieldset legend::after {
  background: rgba(255,255,255,0.1);
}
.vc-profile-form .vc-auth-field label,
.vc-profile-form .vc-auth-label-row label {
  color: rgba(255,255,255,0.65);
}
.vc-profile-form input[type="text"],
.vc-profile-form input[type="email"],
.vc-profile-form input[type="password"],
.vc-profile-form textarea,
.vc-profile-form select {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
}
.vc-profile-form input:focus,
.vc-profile-form textarea:focus,
.vc-profile-form select:focus {
  border-color: #c9922a;
  box-shadow: 0 0 0 3px rgba(201,146,42,0.15);
  background: rgba(255,255,255,0.1);
}
.vc-profile-form select option { background: #2a1205; color: #fff; }
.vc-profile-form .vc-auth-field__hint,
.vc-profile-form .vc-auth-optional { color: rgba(255,255,255,0.38); }
.vc-profile-form .vc-auth-pw-toggle { color: rgba(255,255,255,0.4); }
.vc-profile-form .vc-auth-pw-toggle:hover { color: #c9922a; }
.vc-profile-saved {
  background: rgba(80,200,100,0.12);
  border: 1px solid rgba(80,200,100,0.25);
  border-left: 3px solid #50c864;
  color: #5de07a;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.vc-profile-error {
  background: rgba(220,50,50,0.12);
  border: 1px solid rgba(220,50,50,0.25);
  border-left: 3px solid #dc3232;
  color: #ff8080;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
