/* ============================================
   Auth Modal Styles
   Add to styles.css or include as separate stylesheet
   ============================================ */

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

.auth-modal-content {
  background: var(--bg);
  border-radius: 12px;
  padding: var(--s5);
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: authModalSlideIn 0.3s ease-out;
}

@keyframes authModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-modal-close {
  position: absolute;
  top: var(--s3);
  right: var(--s3);
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.form-group {
  margin-bottom: var(--s3);
}

.form-group label {
  display: block;
  margin-bottom: var(--s2);
  font-weight: 500;
  color: var(--text);
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.auth-error {
  padding: var(--s2) var(--s3);
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: var(--s2);
}

.btn-primary {
  background-color: var(--accent);
  color: white;
  border: none;
  font-weight: 500;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-primary:disabled {
  background-color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Dark mode adjustments */
[data-theme="dark"] .auth-modal {
  background-color: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .form-input {
  background: var(--panel-bg);
  border-color: var(--border);
}

[data-theme="dark"] .form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Mobile responsive */
@media (max-width: 640px) {
  .auth-modal-content {
    max-width: 95%;
    padding: var(--s4);
  }

  .form-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}
