/**
 * Age Verification Gate Styles
 * Legal compliance modal for 18+ age requirement
 */

.age-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 6, 8, 0.98);
  backdrop-filter: blur(10px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
  padding: 20px;
}

.age-gate-overlay.age-gate--hidden {
  opacity: 0;
  pointer-events: none;
}

.age-gate-content-hidden {
  visibility: hidden !important;
}

body.age-gate-locked {
  overflow: hidden !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.age-gate-modal {
  background: linear-gradient(145deg, rgba(13, 15, 20, 0.95), rgba(18, 21, 33, 0.95));
  border: 2px solid var(--line);
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  padding: 48px 40px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.age-gate-header {
  text-align: center;
  margin-bottom: 32px;
}

.age-gate-logo {
  height: 60px;
  margin-bottom: 24px;
  filter: brightness(1.15) drop-shadow(0 0 10px rgba(127, 173, 92, 0.3));
}

.age-gate-header h2 {
  color: var(--text);
  font-size: 28px;
  margin: 0;
  font-family: var(--font-display);
}

.age-gate-body {
  color: var(--text);
}

.age-gate-notice {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 32px;
  text-align: center;
  font-size: 16px;
}

/* Button-based verification layout */
.age-gate-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.age-gate-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.age-gate-form label {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}

.date-inputs {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 12px;
}

.date-inputs select {
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s ease;
}

.date-inputs select:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
}

.date-inputs select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(158, 230, 191, 0.1);
}

.date-inputs select option {
  background: var(--panel);
  color: var(--text);
}

.age-gate-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

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

.age-gate-checkbox label {
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.btn-verify,
.btn-exit {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.btn-verify {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #060608;
  box-shadow: 0 12px 40px rgba(110, 231, 183, 0.25);
}

.btn-verify:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px rgba(110, 231, 183, 0.35);
}

.btn-verify:active:not(:disabled) {
  transform: translateY(0);
}

.btn-verify:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-exit {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.btn-exit:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
}

.age-gate-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  text-align: center;
  font-size: 14px;
  animation: shake 0.4s ease;
}

.age-gate-success-box {
  color: #10b981;
  padding: 12px;
  background: #d1fae5;
  border-radius: 6px;
  text-align: center;
}

.age-gate-underage-primary {
  font-size: 18px;
  color: #dc2626;
}

.age-gate-underage-secondary {
  font-size: 16px;
}

.age-gate-underage-spinner-wrap {
  text-align: center;
  margin-top: 20px;
}

.age-gate-underage-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.age-gate-privacy {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.age-gate-privacy a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.age-gate-privacy a:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .age-gate-modal {
    padding: 32px 24px;
    max-width: 95%;
  }

  .age-gate-header h2 {
    font-size: 24px;
  }

  .age-gate-logo {
    height: 50px;
  }

  .date-inputs {
    grid-template-columns: 1fr;
  }

  .date-inputs select {
    padding: 16px 12px;
  }

  .btn-verify,
  .btn-exit {
    padding: 18px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .age-gate-overlay,
  .age-gate-modal,
  .age-gate-error {
    animation: none;
  }

  .btn-verify:hover,
  .date-inputs select,
  .btn-exit {
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .age-gate-modal {
    border: 3px solid var(--accent);
  }

  .date-inputs select {
    border: 2px solid var(--text);
  }

  .btn-verify {
    border: 2px solid #060608;
  }
}
