/* ==========================================
   AUTH MODAL STYLES
   Login, Register, Password Reset
   ========================================== */

.auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}

.auth-modal.active {
  display: flex;
}

.auth-modal-content {
  background: var(--bp-surface);
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border: 1px solid var(--bp-border);
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--bp-border);
}

.auth-modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--bp-text-muted);
  padding: 0;
  line-height: 1;
}

.auth-modal-close:hover {
  color: var(--bp-text);
}

.auth-body {
  padding: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form-group label {
  font-size: 13px;
  color: var(--bp-text);
  font-weight: 500;
}

.auth-form-group input {
  padding: 12px 14px;
  border: 1px solid var(--bp-border);
  border-radius: 8px;
  background: var(--bp-surface-elevated);
  color: var(--bp-text);
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.auth-form-group input:focus {
  outline: none;
  border-color: var(--bp-primary);
}

.auth-form-group input::placeholder {
  color: var(--bp-text-muted);
}

.auth-submit-btn {
  padding: 12px 20px;
  background: var(--bp-btn-primary-bg);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.auth-submit-btn:hover {
  background: var(--bp-btn-primary-hover);
}

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

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  color: var(--bp-text-muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bp-border);
}

.auth-social-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--bp-border);
  border-radius: 8px;
  background: var(--bp-surface-elevated);
  color: var(--bp-text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-social-btn:hover {
  border-color: var(--bp-primary);
  background: var(--bp-surface);
}

.auth-social-btn img {
  width: 20px;
  height: 20px;
}

.auth-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--bp-border);
  text-align: center;
  font-size: 13px;
  color: var(--bp-text-muted);
}

.auth-footer a {
  color: var(--bp-primary);
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-error {
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: var(--bp-danger);
  font-size: 13px;
  display: none;
}

.auth-error.active {
  display: block;
}

.auth-success {
  padding: 12px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  color: var(--bp-accent);
  font-size: 13px;
  display: none;
}

.auth-success.active {
  display: block;
}

/* Password strength indicator */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.password-strength-bar {
  flex: 1;
  height: 4px;
  background: var(--bp-border);
  border-radius: 2px;
  transition: background 0.2s ease;
}

.password-strength-bar.weak { background: #ef4444; }
.password-strength-bar.fair { background: #f59e0b; }
.password-strength-bar.good { background: #22c55e; }
.password-strength-bar.strong { background: #0f766e; }

.password-strength-text {
  font-size: 11px;
  color: var(--bp-text-muted);
  margin-top: 4px;
}

/* Light Mode Overrides */
[data-theme="light"] .auth-modal-content {
  background: var(--bp-surface);
  border-color: var(--bp-border);
}

[data-theme="light"] .auth-form-group input {
  background: var(--bp-bg);
  border-color: var(--bp-border);
}

[data-theme="light"] .auth-social-btn {
  background: var(--bp-bg);
}
