/* Shared styles for auth pages (moved from inline styles) */

/* Background and base typography */
body {
  -webkit-text-size-adjust: 100%;
  /* WebP with PNG fallback for background image - significantly smaller file size */
  background-image: url("../images/leafBg.webp"), url("../images/leafBg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
}

@supports (text-size-adjust: 100%) {
  body {
    text-size-adjust: 100%;
  }
}

.main-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.form-box {
  /* vendor-prefixed properties first */
  -webkit-border-radius: 15px;
  border-radius: 15px;
  -webkit-box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  background-color: rgba(46, 125, 50, 0.6);
  padding: 40px;
  text-align: center;
  max-width: 600px;
  width: 100%;
  color: #fff;
}

.welcome-logo { width:130px; height:130px; object-fit:contain; margin-bottom:25px; }
.form-label { font-weight:600; color:#fff; text-align:left }
.form-control { border-color:#a5d6a7; font-weight:600; color:#000 }

/* Ensure headings and buttons inside the auth form are white */
.form-box h1,
.form-box h2,
.form-box h3,
.form-box .fw-bold { color: #fff !important; }

.btn-green { background-color:#22c55e; color:#fff !important; font-weight:600 }
.btn-green:hover { background-color:#16a34a }

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border: 1px solid #dadce0;
  background-color: #ffffff;
  color: #3c4043 !important;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.btn-google img {
  width: 18px;
  height: 18px;
}

.btn-google:hover,
.btn-google:focus {
  background-color: #f6f9fe;
  border-color: #1a73e8;
  color: #1a73e8 !important;
  text-decoration: none;
}

.btn-google-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #dadce0;
  background-color: #ffffff;
  color: #3c4043 !important;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.btn-google-icon svg {
  width: 20px;
  height: 20px;
}

.btn-google-icon:hover,
.btn-google-icon:focus {
  background-color: #f6f9fe;
  border-color: #1a73e8;
  color: #1a73e8 !important;
  text-decoration: none;
}

.google-caption {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Ensure auth links are visible on the dark/green form box */
.form-box .text-link,
.form-box a.text-link { color: #fff !important; text-decoration: underline; }
.form-box .text-link:hover,
.form-box a.text-link:hover { color: #c8e6c9 !important; }

/* Hide native password reveal/clear icons so only our custom toggles appear */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none; }
input[type="password"]::-webkit-password-reveal-button,
input[type="password"]::-webkit-password-toggle-button,
input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
  -webkit-appearance: none;
}

/* Lint-friendly ordering for text-align vendor value and standard value */
th {
  text-align: -webkit-match-parent;
  text-align: inherit;
}

/* Utilities used in auth views */
.mt-n1 { margin-top: -0.25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }

/* Register page progress bar height */
#passwordStrengthProgress { height: 5px; }

/* Login: Make the remember checkbox use success green and show focus ring */
#remember.form-check-input {
  accent-color: #28a745;
}

#remember.form-check-input:checked {
  background-color: #28a745 !important;
  border-color: #28a745 !important;
}

#remember.form-check-input:focus {
  box-shadow: 0 0 0 0.15rem rgba(40, 167, 69, 0.25);
}
