/* ==========================================
   AUTH (Overlay / Modal / States)
   ========================================== */

.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.auth-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Auth Modal */
.auth-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.auth-overlay.open .auth-modal {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.auth-modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 600;
}

.auth-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo-icon svg {
  width: 22px;
  height: 22px;
  stroke: white;
}

/* Modal Content */
.auth-modal-content {
  padding: 32px 24px;
}

.auth-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 28px;
}

/* Input Group */
.auth-input-group {
  margin-bottom: 20px;
}

.auth-input-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-phone-wrapper {
  position: relative;
}

.auth-phone-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: 14px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.auth-phone-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 4px var(--border-glow);
}

.auth-phone-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.auth-phone-input.error {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.auth-phone-input.valid {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.auth-phone-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border: none;
  border-radius: 14px;
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
}

.auth-submit-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
}

.auth-submit-btn:disabled {
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Spinner */
.auth-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
  display: none;
}

/* Status */
.auth-status {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.auth-status.show {
  display: flex;
  animation: authFadeIn 0.3s ease;
}

.auth-status.error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-status.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.auth-status svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Call Info */
.auth-call-info {
  display: none;
  text-align: center;
  padding: 10px 0;
}

.auth-call-info.show {
  display: block;
  animation: authFadeIn 0.4s ease;
}

.auth-call-icon {
  width: 72px;
  height: 72px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: authPulse 2s ease-in-out infinite;
}

.auth-call-icon svg {
  width: 36px;
  height: 36px;
  color: var(--accent-green);
}

.auth-call-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.auth-call-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.auth-call-phone {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 600;
  color: var(--accent-cyan);
  background: var(--bg-card);
  padding: 18px 24px;
  border-radius: 16px;
  display: inline-block;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  letter-spacing: 1px;
}

/* Timer */
.auth-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-timer svg {
  width: 18px;
  height: 18px;
}

.auth-timer-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--accent-orange);
  font-size: 16px;
}

/* Maintenance */
.auth-maintenance {
  text-align: center;
  padding: 20px 0;
  display: none;
}

.auth-maintenance.show {
  display: block;
  animation: authFadeIn 0.4s ease;
}

.auth-maintenance-icon {
  width: 72px;
  height: 72px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.auth-maintenance-icon svg {
  width: 36px;
  height: 36px;
  color: var(--accent-orange);
}

.auth-maintenance-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.auth-maintenance-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Auth Call phone link styling */
#authCallPhone a:hover {
  text-decoration: underline;
}

#authCallPhone a,
#authCallPhone a:visited,
#authCallPhone a:hover,
#authCallPhone a:active {
  color: inherit;
  text-decoration: none;
}

/* Mobile tweaks for Auth */
@media (max-width: 480px) {
  .auth-modal {
    max-width: 100%;
    border-radius: 20px;
  }

  .auth-modal-header {
    padding: 20px;
  }

  .auth-modal-content {
    padding: 24px 20px;
  }

  .auth-title {
    font-size: 22px;
  }

  .auth-phone-input {
    font-size: 16px;
    padding: 14px 18px 14px 48px;
  }

  .auth-call-phone {
    font-size: 22px;
    padding: 14px 20px;
  }
}
