/* Forgot Password Page Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

:root,
body,
input,
button {
  font-family: 'Poppins', sans-serif;
}

body {
  background: var(--bg, #f5f5f5);
  color: var(--text, #333);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main content wrapper for sticky footer */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 40px 20px;
}

.container {
  background: var(--card-bg, white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 340px;
}

/* ─── ANNOUNCEMENT BANNER ─── */
.announcement-banner {
  width: 100%;
  padding: 12px 20px;
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  animation: slideDown 0.3s ease-out;
}

.announcement-banner.banner-light-text {
  color: #ffffff;
}

.announcement-banner.banner-dark-text {
  color: #000000;
}

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

h2 {
  text-align: center;
  margin-bottom: 8px;
  color: var(--header-text, #333);
}

input {
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  border-radius: 6px;
  border: 1px solid var(--border, #ccc);
  background: var(--card-bg, #fff);
  color: var(--text, #333);
  font-size: 16px;
  box-sizing: border-box;
}

input::placeholder {
  color: var(--text-muted, #888);
}

button {
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  background: var(--primary, #5c67f2);
  color: var(--button-text, white);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  min-height: 48px;
  transition: background 0.2s ease;
}

button:hover {
  background: var(--primary-hover, #4047c0);
}

/* reCAPTCHA centered */
.g-recaptcha {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.message {
  margin-top: 15px;
  font-size: 14px;
  text-align: center;
  color: #22c55e;
}

.error {
  margin-top: 15px;
  font-size: 14px;
  text-align: center;
  color: #ef4444;
}

/* =============================================
   LOADING STATE
   ============================================= */
button.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: var(--button-text, #fff);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* =============================================
   DARK MODE SUPPORT
   ============================================= */
html.dark-mode body,
[data-theme="dark"] body {
  background: var(--dark-bg, #121212);
  color: var(--dark-text, #e0e0e0);
}

html.dark-mode .container,
[data-theme="dark"] .container {
  background: var(--dark-card-bg, #1e1e1e);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

html.dark-mode h2,
[data-theme="dark"] h2 {
  color: var(--dark-header-text, #fff);
}

html.dark-mode input,
[data-theme="dark"] input {
  background: var(--dark-input-bg, #2a2a2a);
  border-color: var(--dark-border, #444);
  color: var(--dark-text, #e0e0e0);
}

html.dark-mode input::placeholder,
[data-theme="dark"] input::placeholder {
  color: var(--dark-text-muted, #888);
}

html.dark-mode .error,
[data-theme="dark"] .error {
  color: #f87171;
}

/* =============================================
   MOBILE RESPONSIVE
   ============================================= */
@media (max-width: 480px) {
  .main-content {
    padding: 20px 16px;
  }
  
  .container {
    padding: 28px 20px;
    width: 100%;
    max-width: none;
    border-radius: 8px;
    box-sizing: border-box;
  }
  
  h2 {
    font-size: 22px;
    margin-bottom: 8px;
  }
  
  input {
    padding: 14px 12px;
    font-size: 16px;
    margin-top: 12px;
    width: 100%;
    box-sizing: border-box;
  }
  
  button {
    padding: 14px;
    font-size: 16px;
    min-height: 48px;
    margin-top: 12px;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Ensure reCAPTCHA fits and stays centered */
  .g-recaptcha {
    transform: scale(0.85);
    transform-origin: center center;
    margin: 12px auto;
  }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */
input:focus,
button:focus {
  outline: 2px solid var(--primary, #5c67f2);
  outline-offset: 2px;
}

.error[role="alert"] {
  animation: shake 0.3s ease-in-out;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
}
