/**
 * Age Verification Widget Styles
 */

/* ── Age Verification Container ────────────────────────────────────────── */

.age-verify-container,
.set-password-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
}

.age-verify-header,
.set-password-header {
  text-align: center;
  margin-bottom: 2rem;
}

.age-verify-header h2,
.set-password-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary, #1a1a1a);
}

.age-verify-header p,
.set-password-header p {
  color: var(--text-secondary, #666);
  font-size: 1rem;
}

/* ── Success Banner ───────────────────────────────────────────────────── */

.success-banner {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.success-banner i {
  font-size: 1.5rem;
}

/* ── Loading States ───────────────────────────────────────────────────── */

.age-verify-loading,
.yoti-loading {
  text-align: center;
  padding: 3rem;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ── Error States ─────────────────────────────────────────────────────── */

.age-verify-error,
.set-password-error {
  text-align: center;
  padding: 2rem;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  color: #721c24;
}

.age-verify-error h2,
.set-password-error h2 {
  margin-bottom: 1rem;
  color: #721c24;
}

.error-message {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* ── Set Password Form ────────────────────────────────────────────────── */

.set-password-form {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* ── Password Strength Indicator ──────────────────────────────────────── */

.password-strength {
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.password-strength.strength-weak {
  background: #f8d7da;
  color: #721c24;
}

.password-strength.strength-medium {
  background: #fff3cd;
  color: #856404;
}

.password-strength.strength-strong {
  background: #d4edda;
  color: #155724;
}

/* ── Password Requirements ────────────────────────────────────────────── */

.password-requirements {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.password-requirements p {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
}

.password-requirements ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.password-requirements li {
  padding: 0.25rem 0;
  color: #666;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.password-requirements li.met {
  color: #155724;
}

.password-requirements .req-icon {
  display: inline-block;
  width: 20px;
  text-align: center;
  font-weight: bold;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: #3498db;
  color: white;
  width: 100%;
}

.btn-primary:hover {
  background: #2980b9;
}

.btn-primary:disabled {
  background: #95a5a6;
  cursor: not-allowed;
}

.btn-secondary {
  background: #ecf0f1;
  color: #2c3e50;
  margin-right: 0.5rem;
}

.btn-secondary:hover {
  background: #bdc3c7;
}

/* ── Admin Dashboard ──────────────────────────────────────────────────── */

.admin-age-verify-dashboard {
  padding: 2rem;
}

.dashboard-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #ecf0f1;
}

.dashboard-header h2 {
  margin: 0;
  color: var(--text-primary, #1a1a1a);
}

.dashboard-section {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.dashboard-section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-primary, #1a1a1a);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  border: 2px solid transparent;
}

.stat-card.success {
  background: #d4edda;
  border-color: #c3e6cb;
}

.stat-card.fail {
  background: #f8d7da;
  border-color: #f5c6cb;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #ecf0f1;
}

.data-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
}

.data-table tr:hover {
  background: #f8f9fa;
}

.status-success {
  color: #155724;
  background: #d4edda;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

.status-fail {
  color: #721c24;
  background: #f8d7da;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

.dashboard-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .age-verify-container,
  .set-password-container {
    padding: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-actions {
    flex-direction: column;
  }

  .btn-secondary {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
}
