/**
 * PhonoLogic Login Page Styles
 * Layout: Split hero (value prop left, login form right)
 * Mirrors signup.css visual language
 * REQUIRES: variables.css
 */

/* ==========================================================================
   Base
   ========================================================================== */
body.li-body {
  margin: 0;
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  background: #ffffff;
  color: var(--color-text, #1f2937);
  overflow-x: hidden;
}
*, *::before, *::after { box-sizing: border-box; }

/* Header styles now in shared public-header.css */

/* ==========================================================================
   Hero — Split Layout
   ========================================================================== */
.li-hero {
  background: var(--gradient-hero, linear-gradient(135deg, #FDF5E9 0%, #fff7f2 50%, #F0E6D8 100%));
  padding: 0;
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  margin-bottom: -1px;
}
.li-hero-inner {
  display: grid;
  grid-template-columns: 50% 50%;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  align-items: center;
  min-height: 600px;
}

/* Left Panel — Value Prop */
.li-value {
  padding: 64px 48px;
}
.li-value h1 {
  font-size: var(--font-size-display, 42px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--color-navy, #354B5E);
  letter-spacing: -0.02em;
}
.li-value h1 span {
  color: var(--color-brand, #dc9435);
  display: block;
  margin-top: 4px;
}
.li-value-sub {
  font-size: var(--font-size-lg, 18px);
  color: var(--color-text-muted, #6b7280);
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 460px;
}
.li-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.li-benefit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.li-benefit-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-teal, #5B8F8A);
  display: flex;
  align-items: center;
  justify-content: center;
}
.li-benefit-icon svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.li-benefit h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-navy, #354B5E);
  margin: 0 0 2px;
}
.li-benefit p {
  font-size: 14px;
  color: var(--color-text-muted, #6b7280);
  margin: 0;
  line-height: 1.45;
}
.li-trust-line {
  font-size: 14px;
  color: var(--color-text-muted, #6b7280);
  font-style: italic;
  margin: 0;
}

/* Right Panel — Form */
.li-form-panel {
  padding: 48px 48px 48px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Login Card
   ========================================================================== */
.li-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(53, 75, 94, 0.15), 0 2px 8px rgba(0,0,0,0.06);
  padding: 36px;
  border: 1px solid rgba(53, 75, 94, 0.08);
}
.li-card h1 {
  margin: 0 0 20px;
  color: var(--color-navy, #354B5E);
  font-size: 22px;
  text-align: center;
  font-weight: 700;
}

/* Google Sign-In */
.li-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 2px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary, #374151);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
}
.li-google-btn:hover {
  border-color: var(--color-teal, #5B8F8A);
  background: var(--color-gold-pale, #FDF5E9);
}

/* Divider */
.li-divider {
  display: flex;
  align-items: center;
  margin: 0 0 20px;
  gap: 12px;
}
.li-divider-line {
  flex: 1;
  height: 1px;
  background: var(--color-border, #e5e7eb);
}
.li-divider-text {
  color: var(--color-text-placeholder, #9ca3af);
  font-size: 13px;
}

/* Form fields */
.li-form-group { margin-bottom: 14px; }
.li-card label {
  display: block;
  font-weight: 500;
  color: var(--color-text-secondary, #374151);
  margin-bottom: 6px;
  font-size: 14px;
}
.li-card input[type="email"],
.li-card input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #fff;
  color: var(--color-text, #1f2937);
}
.li-card input:focus {
  outline: none;
  border-color: var(--color-teal, #5B8F8A);
}

/* Remember me + forgot password row */
.li-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 16px;
}
.li-remember {
  display: flex;
  align-items: center;
  gap: 8px;
}
.li-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-teal, #5B8F8A);
}
.li-remember label {
  font-size: 13px;
  color: var(--color-text-muted, #6b7280);
  cursor: pointer;
  margin: 0;
}
.li-forgot {
  color: var(--color-teal, #5B8F8A);
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
}
.li-forgot:hover { color: var(--color-navy, #354B5E); }

/* Submit */
.li-submit {
  width: 100%;
  padding: 13px;
  background: var(--color-brand, #dc9435);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg, 10px);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(220, 148, 53, 0.3);
}
.li-submit:hover:not(:disabled) { background: var(--color-brand-hover, #c4842f); transform: translateY(-1px); }
.li-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Error */
.li-error {
  color: var(--color-error, #dc2626);
  font-size: 14px;
  margin: 12px 0 0;
  text-align: center;
  display: none;
}

/* OAuth error */
.li-oauth-error {
  background: var(--color-error-light, #fef2f2);
  color: var(--color-error, #dc2626);
  padding: 12px;
  border-radius: var(--radius-md, 8px);
  margin-bottom: 16px;
  font-size: 14px;
  display: none;
}

/* Links */
.li-signup-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--color-text-muted, #6b7280);
}
.li-signup-link a {
  color: var(--color-teal, #5B8F8A);
  text-decoration: none;
  font-weight: 600;
}
.li-signup-link a:hover { color: var(--color-navy, #354B5E); }

/* Hide reCAPTCHA badge — allowed by Google when notice text is displayed */
.grecaptcha-badge { visibility: hidden !important; }

.li-recaptcha {
  font-size: 10px;
  color: var(--color-text-placeholder, #9ca3af);
  margin-top: 16px;
  text-align: center;
}

/* Version footer */
.li-version {
  text-align: center;
  margin-top: 16px;
  font-size: 11px;
  color: var(--color-text-placeholder, #9ca3af);
}

/* ==========================================================================
   Responsive — 1024px
   ========================================================================== */
@media (max-width: 1024px) {
  .li-hero-inner { grid-template-columns: 45% 55%; }
  .li-value { padding: 48px 32px; }
  .li-value h1 { font-size: 36px; }
  .li-form-panel { padding: 40px 32px 40px 16px; }
}

/* ==========================================================================
   Responsive — 768px
   ========================================================================== */
@media (max-width: 768px) {
  .li-hero { min-height: auto; }
  .li-hero-inner { grid-template-columns: 1fr; }
  .li-value { padding: 40px 24px 24px; text-align: center; }
  .li-value h1 { font-size: 32px; }
  .li-value-sub { margin-left: auto; margin-right: auto; }
  .li-benefits { align-items: center; max-width: 400px; margin-left: auto; margin-right: auto; }
  .li-benefit { text-align: left; }
  .li-trust-line { text-align: center; }
  .li-form-panel { padding: 0 24px 40px; }
  .li-card { max-width: 100%; }
}

/* ==========================================================================
   Responsive — 480px
   ========================================================================== */
@media (max-width: 480px) {
  .li-value { padding: 32px 16px 16px; }
  .li-value h1 { font-size: 26px; }
  .li-value-sub { font-size: 15px; }
  .li-benefits { gap: 12px; }
  .li-benefit-icon { width: 32px; height: 32px; border-radius: 8px; }
  .li-benefit-icon svg { width: 16px; height: 16px; }
  .li-benefit h3 { font-size: 14px; }
  .li-benefit p { font-size: 13px; }
  .li-form-panel { padding: 0 16px 32px; }
  .li-card { padding: 24px; }
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */
[data-theme="dark"] body.li-body { background: var(--color-bg); color: var(--color-text); }
[data-theme="dark"] .li-hero { background: var(--gradient-hero); }
[data-theme="dark"] .li-value h1 { color: var(--color-text); }
[data-theme="dark"] .li-value-sub { color: var(--color-text-muted); }
[data-theme="dark"] .li-benefit h3 { color: var(--color-text); }
[data-theme="dark"] .li-card { background: var(--color-bg-card); border-color: var(--color-border); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
[data-theme="dark"] .li-card h1 { color: var(--color-text); }
[data-theme="dark"] .li-card input { background: var(--color-bg-subtle); border-color: var(--color-border); color: var(--color-text); }
[data-theme="dark"] .li-card label { color: var(--color-text-secondary); }
[data-theme="dark"] .li-google-btn { background: var(--color-bg-subtle); border-color: var(--color-border); color: var(--color-text); }
[data-theme="dark"] .li-google-btn:hover { background: var(--color-bg-card); }
[data-theme="dark"] .li-divider-line { background: var(--color-border); }

/* ==========================================================================
   High-Contrast Color Blind Mode — Login
   ========================================================================== */

/* Error text: red→magenta */
[data-a11y="high-contrast"] .li-error {
  color: var(--color-error, #be185d);
}

/* OAuth error: red→magenta */
[data-a11y="high-contrast"] .li-oauth-error {
  background: var(--color-error-light, #fce7f3);
  color: var(--color-error, #be185d);
}
