/**
 * World Cup 2026 - Auth Page Styles
 * Neomorphic Light Design - WCAG Compliant
 */

/* Import design tokens */
@import url('variables.css');

/* ============================================
   AUTH PAGE LAYOUT
   ============================================ */

.wc-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--wc-space-4);
  background: var(--wc-bg-base);
}

.wc-auth__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1000px;
  width: 100%;
  background: var(--wc-bg-surface);
  border-radius: var(--wc-radius-xl);
  overflow: hidden;
  box-shadow: var(--wc-neo-raised-lg);
}

/* ============================================
   HERO SECTION (left side)
   ============================================ */

.wc-auth__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--wc-space-12) var(--wc-space-8) var(--wc-space-8);
  background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
  color: var(--wc-white);
  position: relative;
  overflow: hidden;
}

/* Background accent - golden glow */
.wc-auth__hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    ellipse at 30% 80%,
    rgb(249 168 37 / 25%) 0%,
    transparent 50%
  );
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

.wc-auth__hero::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -30%;
  width: 60%;
  height: 60%;
  background: radial-gradient(
    circle,
    rgb(255 255 255 / 8%) 0%,
    transparent 60%
  );
  pointer-events: none;
}

@keyframes heroGlow {
  0% {
    transform: translate(0, 0);
    opacity: 0.8;
  }
  100% {
    transform: translate(5%, -5%);
    opacity: 1;
  }
}

.wc-auth__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.wc-auth__logo {
  width: 240px;
  height: auto;
  margin-bottom: var(--wc-space-4);
  filter: drop-shadow(0 4px 12px rgb(0 0 0 / 30%));
}

.wc-auth__title {
  font-family: var(--wc-font-heading);
  font-size: var(--wc-text-3xl);
  font-weight: var(--wc-weight-bold);
  margin: 0 0 var(--wc-space-2);
  text-shadow: 0 2px 4px rgb(0 0 0 / 30%);
}

.wc-auth__subtitle {
  font-size: var(--wc-text-lg);
  opacity: 0.9;
  margin: 0 0 var(--wc-space-6);
}

.wc-auth__benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.wc-auth__benefits li {
  display: flex;
  align-items: center;
  gap: var(--wc-space-2);
  padding: var(--wc-space-2) 0;
  font-size: var(--wc-text-base);
}

.wc-auth__benefits li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--wc-gold);
  color: var(--wc-blue-dark);
  border-radius: var(--wc-radius-full);
  font-size: var(--wc-text-sm);
  font-weight: var(--wc-weight-bold);
  flex-shrink: 0;
}

/* ============================================
   FORM CONTAINER (right side)
   ============================================ */

.wc-auth__form-container {
  padding: var(--wc-space-8);
  display: flex;
  flex-direction: column;
}

/* ============================================
   ALERTS
   ============================================ */

.wc-alert {
  padding: var(--wc-space-3) var(--wc-space-4);
  border-radius: var(--wc-radius-md);
  margin-bottom: var(--wc-space-4);
  font-size: var(--wc-text-sm);
  font-weight: var(--wc-weight-medium);
}

.wc-alert--success {
  background: var(--wc-green-pastel);
  color: var(--wc-green-dark);
  border: 1px solid rgb(46 125 50 / 30%);
}

.wc-alert--error {
  background: var(--wc-red-pastel);
  color: var(--wc-red-dark);
  border: 1px solid rgb(198 40 40 / 30%);
}

/* ============================================
   TABS
   ============================================ */

.wc-auth__tabs {
  display: flex;
  gap: var(--wc-space-1);
  margin-bottom: var(--wc-space-6);
  background: var(--wc-bg-base);
  border-radius: var(--wc-radius-md);
  padding: 4px;
}

.wc-auth__tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--wc-space-2) var(--wc-space-3);
  background: transparent;
  border: none;
  border-radius: var(--wc-radius-sm);
  font-family: var(--wc-font-body);
  font-size: var(--wc-text-base);
  font-weight: var(--wc-weight-semibold);
  color: var(--wc-text-secondary);
  cursor: pointer;
  transition: all var(--wc-transition-base);
}

.wc-auth__tab:hover {
  color: var(--wc-text-primary);
}

.wc-auth__tab.is-active {
  background: var(--wc-bg-surface);
  color: var(--wc-gold-dark);
  box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
}

/* ============================================
   TAB PANELS
   ============================================ */

.wc-auth__panel {
  flex: 1;
}

.wc-auth__panel.is-hidden {
  display: none;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.wc-field {
  margin-bottom: var(--wc-space-4);
}

.wc-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--wc-space-4);
  margin-bottom: var(--wc-space-4);
}

.wc-field-row .wc-field {
  margin-bottom: 0;
}

.wc-label {
  display: block;
  font-size: var(--wc-text-sm);
  font-weight: var(--wc-weight-medium);
  color: var(--wc-text-primary);
  margin-bottom: var(--wc-space-1);
}

.wc-optional {
  font-weight: var(--wc-weight-regular);
  color: var(--wc-text-muted);
}

/* Clean minimal input styling */
.wc-input {
  width: 100%;
  padding: var(--wc-space-2) var(--wc-space-3);
  font-family: var(--wc-font-body);
  font-size: var(--wc-text-base);
  color: var(--wc-text-primary);
  background: var(--wc-bg-base);
  border: 1px solid rgb(163 177 198 / 30%);
  border-radius: var(--wc-radius-md);
  transition: all var(--wc-transition-base);
  appearance: none;
}

.wc-input::placeholder {
  color: var(--wc-text-muted);
}

.wc-input:hover {
  border-color: rgb(163 177 198 / 50%);
}

.wc-input:focus {
  outline: none;
  border-color: var(--wc-gold);
  box-shadow: 0 0 0 2px rgb(249 168 37 / 15%);
}

/* Select specific styling */
select.wc-input {
  cursor: pointer;
  background-color: var(--wc-bg-base);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23546e7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--wc-space-2) center;
  background-size: 16px;
  padding-right: var(--wc-space-8);
  /* Zorg dat de native dropdown (opties) leesbaar blijft in dark/themed varianten.
     Sommige browsers gebruiken een light dropdown achtergrond terwijl de option tekstkleur
     mee-erft uit het thema (waardoor tekst “verdwijnt”). */
  color-scheme: light;
}

select.wc-input option,
select.wc-input optgroup {
  color: #111827;
  background-color: #fff;
}

.wc-hint {
  display: block;
  font-size: var(--wc-text-xs);
  color: var(--wc-text-muted);
  margin-top: var(--wc-space-1);
}

.wc-error {
  display: flex;
  align-items: center;
  gap: var(--wc-space-2);
  font-size: var(--wc-text-xs);
  color: #dc2626;
  margin-top: var(--wc-space-2);
  padding: var(--wc-space-2) var(--wc-space-3);
  background: linear-gradient(135deg, rgb(220 38 38 / 12%), rgb(185 28 28 / 8%));
  border-left: 3px solid #dc2626;
  border-radius: var(--wc-radius-sm);
  font-weight: var(--wc-weight-medium);
}

.wc-error::before {
  content: '\f071';
  font-family: 'Font Awesome 6 Free', sans-serif;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
}

/* Server-side errors should also get icon treatment */
.wc-error[id$="-error"] {
  display: flex;
}

/* Hide the error when forms.js creates a client-side error */
.dt-hide {
  display: none !important;
}

/* Client-side validation errors (created by forms.js) - adapt to WC style */
.wc-field .dt-alert--error.dt-alert--sm {
  display: flex;
  align-items: center;
  gap: var(--wc-space-2);
  font-size: var(--wc-text-xs);
  color: #dc2626;
  margin-top: var(--wc-space-2);
  padding: var(--wc-space-2) var(--wc-space-3);
  background: linear-gradient(135deg, rgb(220 38 38 / 12%), rgb(185 28 28 / 8%));
  border-left: 3px solid #dc2626;
  border-radius: var(--wc-radius-sm);
  font-weight: var(--wc-weight-medium);
  border: none;
  box-shadow: none;
}

.wc-field .dt-alert--error.dt-alert--sm .dt-alert__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  gap: var(--wc-space-2);
  background: transparent;
  border: none;
}

.wc-field .dt-alert--error.dt-alert--sm .dt-alert__icon {
  width: auto;
  height: auto;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: #dc2626;
}

.wc-field .dt-alert--error.dt-alert--sm .dt-alert__body {
  font-size: var(--wc-text-xs);
  color: #dc2626;
  padding: 0;
  margin: 0;
}

/* Required field indicator */
.wc-required {
  color: #dc2626;
  margin-left: 2px;
  font-weight: var(--wc-weight-bold);
}

.wc-field-notice {
  font-size: var(--wc-text-xs);
  color: var(--wc-text-muted);
  margin-bottom: var(--wc-space-4);
  padding: var(--wc-space-2) var(--wc-space-3);
  background: var(--wc-bg-base);
  border-radius: var(--wc-radius-sm);
  border-left: 3px solid var(--wc-text-muted);
}

.wc-field-notice .wc-required {
  margin-left: 0;
  margin-right: 4px;
}

/* ============================================
   CHECKBOX
   ============================================ */

.wc-checkbox {
  display: flex;
  align-items: center;
  gap: var(--wc-space-2);
  cursor: pointer;
  font-size: var(--wc-text-sm);
  color: var(--wc-text-secondary);
  margin-bottom: var(--wc-space-4);
}

.wc-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--wc-gold);
}

/* ============================================
   BUTTONS
   ============================================ */

.wc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wc-space-2);
  width: 100%;
  padding: var(--wc-space-3) var(--wc-space-6);
  font-family: var(--wc-font-body);
  font-size: var(--wc-text-base);
  font-weight: var(--wc-weight-semibold);
  border: none;
  border-radius: var(--wc-radius-full);
  cursor: pointer;
  transition: all var(--wc-transition-base);
}

.wc-btn--primary {
  color: var(--wc-text-primary);
  background: linear-gradient(135deg, var(--wc-gold) 0%, var(--wc-gold-light) 100%);
  box-shadow: 0 4px 12px rgb(249 168 37 / 40%);
}

.wc-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgb(249 168 37 / 50%);
}

.wc-btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgb(249 168 37 / 40%);
}

.wc-btn--primary:focus-visible {
  outline: 3px solid var(--wc-gold-dark);
  outline-offset: 2px;
}

/* ============================================
   SWITCH LINK
   ============================================ */

.wc-auth__switch {
  margin-top: var(--wc-space-6);
  text-align: center;
  font-size: var(--wc-text-sm);
  color: var(--wc-text-secondary);
}

.wc-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: var(--wc-weight-semibold);
  color: var(--wc-gold-dark);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: all var(--wc-transition-fast);
}

.wc-link:hover {
  color: var(--wc-gold);
  text-decoration-color: var(--wc-gold);
}

.wc-link:focus-visible {
  outline: 2px solid var(--wc-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================
   PASSWORD TOGGLE & STRENGTH
   ============================================ */

.wc-password-toggle {
  position: relative;
  display: flex;
  align-items: center;
}

.wc-password-toggle .wc-input {
  padding-right: 48px;
}

.wc-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #4a5568;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--wc-radius-sm);
  transition: all var(--wc-transition-fast);
}

.wc-toggle-btn:hover {
  color: var(--wc-blue);
  background: rgb(0 0 0 / 5%);
}

.wc-toggle-btn:focus-visible {
  outline: 2px solid var(--wc-gold);
  outline-offset: 2px;
}

.wc-toggle-btn[aria-pressed="true"] {
  color: var(--wc-blue);
}

.wc-toggle-btn .wc-icon {
  font-size: 18px;
  color: inherit;
  display: inline-block;
  line-height: 1;
}

.wc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.wc-password-strength {
  list-style: none;
  padding: var(--wc-space-3);
  margin: var(--wc-space-2) 0 0;
  background: var(--wc-bg-base);
  border-radius: var(--wc-radius-md);
  font-size: var(--wc-text-sm);
}

.wc-password-strength li {
  display: flex;
  align-items: center;
  gap: var(--wc-space-2);
  padding: var(--wc-space-1) 0;
  color: var(--wc-text-muted);
  transition: color var(--wc-transition-fast);
}

.wc-password-strength li .wc-icon-check {
  font-size: 14px;
  opacity: 0.3;
  transition: all var(--wc-transition-fast);
}

.wc-password-strength li.is-ok {
  color: var(--wc-green-dark);
}

.wc-password-strength li.is-ok .wc-icon-check {
  opacity: 1;
  color: var(--wc-green);
}

/* ============================================
   RESPONSIVE - Tablet
   ============================================ */

@media (width <= 900px) {
  .wc-auth__container {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .wc-auth__hero {
    padding: var(--wc-space-6);
  }

  .wc-auth__title {
    font-size: var(--wc-text-2xl);
  }

  .wc-auth__benefits {
    display: none;
  }

  .wc-auth__form-container {
    padding: var(--wc-space-6);
  }
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */

@media (width <= 600px) {
  .wc-auth {
    padding: var(--wc-space-2);
    align-items: flex-start;
    padding-top: var(--wc-space-4);
  }

  .wc-auth__container {
    border-radius: var(--wc-radius-lg);
  }

  .wc-auth__hero {
    padding: var(--wc-space-4);
  }

  .wc-auth__logo {
    width: 120px;
    margin-bottom: var(--wc-space-2);
  }

  .wc-auth__title {
    font-size: var(--wc-text-xl);
  }

  .wc-auth__subtitle {
    font-size: var(--wc-text-sm);
    margin-bottom: var(--wc-space-2);
  }

  .wc-auth__form-container {
    padding: var(--wc-space-4);
  }

  .wc-field-row {
    grid-template-columns: 1fr;
  }

  .wc-field-row .wc-field {
    margin-bottom: var(--wc-space-4);
  }

  .wc-field-row .wc-field:last-child {
    margin-bottom: 0;
  }
}

/* ============================================
   ACCESSIBILITY - Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .wc-btn--primary:hover {
    transform: none;
  }

  .wc-auth__hero::before {
    animation: none;
  }
}
