/**
 * @file
 * Password reset page styles — matches the login page light theme.
 */

/* Global Cairo font */
* { font-family: "Cairo", -apple-system, BlinkMacSystemFont, sans-serif !important; }

/* ─── Hide Drupal chrome ─── */
body.password-reset-page,
html body.password-reset-page {
  background: #f5f7fa !important;
  min-height: 100vh !important;
}

body.password-reset-page .dialog-off-canvas-main-canvas,
body.password-reset-page .layout-container {
  background: transparent !important;
}

body.password-reset-page .region-header,
body.password-reset-page .top-bar,
body.password-reset-page .region-top-bar,
body.password-reset-page section.region.region-top-bar,
body.password-reset-page header,
body.password-reset-page .toolbar-bar,
body.password-reset-page .toolbar-tray,
body.password-reset-page #toolbar-administration,
body.password-reset-page footer,
body.password-reset-page .region-footer,
body.password-reset-page .page-title,
body.password-reset-page .block-page-title-block,
body.password-reset-page .breadcrumb,
body.password-reset-page .region-breadcrumb,
body.password-reset-page .tabs,
body.password-reset-page .local-tasks {
  display: none !important;
}

body.password-reset-page .dialog-off-canvas-main-canvas {
  padding-top: 0 !important;
}

body.password-reset-page main,
body.password-reset-page .main-content {
  padding: 0 !important;
  margin: 0 !important;
}

/* ─── Page layout ─── */
body.password-reset-page .layout-container,
body.password-reset-page .dialog-off-canvas-main-canvas {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.password-reset-page main {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

/* Subtle background gradient — same as login */
body.password-reset-page::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* ─── Card ─── */
.password-reset-form {
  background: #fff !important;
  border: 1px solid #e0e0e0;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ─── Header ─── */
.password-reset-header {
  text-align: center;
  margin-bottom: 28px;
}

.password-reset-logo {
  height: 60px;
  width: auto;
  margin-bottom: 24px;
}

.password-reset-header h1 {
  color: #1a1a2e !important;
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.password-reset-header p {
  color: #666 !important;
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
}

/* ─── Form fields ─── */
.password-reset-form .form-item {
  margin-bottom: 20px;
}

.password-reset-form .form-item label {
  color: #333 !important;
  font-size: 0.9rem;
  font-weight: 500;
  display: block;
  margin-bottom: 8px;
}

.password-reset-form .form-item .description {
  display: none;
}

.password-reset-form input[type="text"],
.password-reset-form input[type="email"] {
  background: #f8f9fa !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 12px;
  padding: 14px 16px;
  color: #1a1a2e !important;
  font-size: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.password-reset-form input[type="text"]:focus,
.password-reset-form input[type="email"]:focus {
  outline: none;
  border-color: #667eea !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.password-reset-form input::placeholder {
  color: #999 !important;
}

/* ─── Submit button ─── */
.password-reset-form .btn-reset-submit {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #fff !important;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.password-reset-form .btn-reset-submit:hover {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a3f91 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.password-reset-form .btn-reset-submit:active {
  transform: translateY(0);
}

/* ─── Back-to-login link ─── */
.back-to-login-wrapper {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  text-align: center;
}

.back-to-login-link {
  color: #666 !important;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.back-to-login-link:hover {
  color: #667eea !important;
  text-decoration: none;
}

/* ─── Forgot-password link on login form ─── */
.forgot-password-link-wrapper {
  text-align: center;
  margin-top: 4px;
}

.forgot-password-link {
  color: #667eea !important;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: #764ba2 !important;
  text-decoration: underline;
}

/* ─── Status / error messages ─── */
.password-reset-form .messages--status {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  color: #16a34a;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.password-reset-form .messages--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  color: #ef4444;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .password-reset-form {
    padding: 30px 24px;
    border-radius: 18px;
  }

  .password-reset-header h1 {
    font-size: 1.5rem;
  }

  .password-reset-form input[type="text"],
  .password-reset-form input[type="email"] {
    padding: 12px 14px;
  }

  .password-reset-form .btn-reset-submit {
    padding: 14px 20px;
  }
}
