/* ===============================
   Login/Register/Forgot Password Styling - CourseHub
   =============================== */

.auth-shell {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: center;
}

/* Container */
.login-page {
  width: min(100%, 460px);
  margin: 80px auto;
  padding: 38px 32px;
  background: linear-gradient(160deg, #ffffff 0%, #f7f9ff 100%);
  border-radius: 16px;
  border: 1px solid #e5e9f5;
  box-shadow: 0 16px 44px rgba(19, 39, 97, 0.12);
  text-align: center;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e9efff;
  color: #1c3faa;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 14px;
  margin: 0 auto 16px;
}

/* Title */
.login-page h2 {
  margin-bottom: 10px;
  font-size: 30px;
  color: #102a72;
  font-weight: 800;
}

.auth-subtitle {
  margin: 0 0 24px;
  color: #5b6478;
  font-size: 15px;
  line-height: 1.6;
}

/* Form */
.login-page form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: right;
}

.auth-label {
  color: #21305a;
  font-weight: 600;
  font-size: 14px;
}

/* Inputs + Select */
.login-page input,
.login-page select {
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid #cfd7e8;
  font-size: 15px;
  transition: all 0.25s ease;
  background-color: #ffffff;
}

/* Optional helpers (keep features) */
.login-page select[size] {
  min-height: 220px;
}

.login-page input[type="search"] {
  margin-bottom: 6px;
}

.login-page input:focus,
.login-page select:focus {
  outline: none;
  border-color: #1c3faa;
  box-shadow: 0 0 0 3px rgba(28, 63, 170, 0.14);
}

/* Autofill Fix */
.login-page input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: #000;
  transition: background-color 5000s ease-in-out 0s;
}

/* Buttons */
.login-page button {
  margin-top: 12px;
  background: linear-gradient(135deg, #1c3faa, #2556dd);
  color: #fff;
  padding: 13px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-page button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(37, 86, 221, 0.26);
}

.auth-divider {
  margin: 18px 0 10px;
  color: #7d879d;
  font-weight: 600;
}

/* Google Button */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #4285f4;
  color: #fff;
  font-weight: 600;
  padding: 12px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.google-btn:hover {
  background-color: #357ae8;
}

.google-btn::before {
  content: "";
  display: inline-block;
  background: url("https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg")
    no-repeat center center;
  width: 20px;
  height: 20px;
  margin-left: 8px;
}

/* Links */
.login-links {
  margin-top: 14px;
  font-size: 14px;
  color: #4d5570;
}

.login-links a {
  color: #1c3faa;
  font-weight: 700;
  text-decoration: none;
}

.login-links a:hover {
  text-decoration: underline;
}

.auth-hint {
  display: block;
  margin-top: -2px;
  margin-bottom: 2px;
  color: #64748b;
  font-size: 12px;
  text-align: right;
}

/* Error Message */
.error-msg {
  color: #d9363e;
  font-size: 14px;
  min-height: 20px;
  margin-top: 2px;
}

.success-msg {
  color: #117a3d;
}

/* Responsive */
@media (max-width: 480px) {
  .login-page {
    margin: 40px 12px;
    padding: 28px 18px;
  }

  .login-page h2 {
    font-size: 25px;
  }
}

.register-extended { max-width: 560px; }
.role-switch { display:flex; gap:16px; justify-content:center; margin-bottom:8px; font-weight:600; }
.role-switch label { display:flex; align-items:center; gap:6px; }
.instructor-fields { border:1px solid #dbe3f1; border-radius:10px; padding:12px; background:#f8fbff; display:flex; flex-direction:column; gap:10px; }
.file-label { display:flex; flex-direction:column; gap:6px; font-size:14px; color:#374151; }
.terms-check { font-size:14px; color:#1f2937; display:flex; align-items:flex-start; gap:8px; line-height:1.7; }
.terms-check a { color:#1c3faa; font-weight:700; }
.login-page textarea { padding: 12px 14px; border-radius:8px; border:1px solid #d0d5dd; font-size:15px; }

.country-picker {
  position: relative;
}

.country-picker-trigger {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
}

.country-picker-trigger:focus {
  outline: 2px solid #5b8cff;
  outline-offset: 1px;
}

.country-picker-caret {
  color: #64748b;
  font-size: 14px;
}

.country-picker-menu {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.12);
  z-index: 50;
  padding: 10px;
}

.country-picker-menu input {
  margin-bottom: 8px;
}

.country-options {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.country-options li {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.country-options li:hover,
.country-options li.active {
  background: #eff6ff;
}

.country-options .flag {
  width: 22px;
  text-align: center;
}
