/* ===========================================
   FamilyRack Auth Styles
   Scoped to .auth-page to prevent leaking
   =========================================== */

/* ===========================================
   Auth Page Layout
   =========================================== */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 24px 40px;
  background: white;
}

/* Auth Card */
.auth-page .auth-card {
  background: white;
  border: 1px solid #E0E0E0;
  border-radius: 16px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
}

/* Auth Header */
.auth-page .auth-header {
  text-align: center;
  margin-bottom: 36px;
}

.auth-page .auth-icon {
  width: 64px;
  height: 64px;
  background: #FEF3E7;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.auth-page .auth-icon .mdi {
  font-size: 32px;
  color: #F5841F;
}

.auth-page .auth-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 8px;
  line-height: 1.2;
}

.auth-page .auth-subtitle {
  font-size: 15px;
  color: #666666;
  line-height: 1.6;
  margin: 0;
}

/* Form Inputs */
.auth-page .input-group {
  margin-bottom: 20px;
}

.auth-page .input-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 8px;
}

.auth-page .input-wrapper {
  display: flex;
  align-items: center;
  background: #F8F6F6;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 0 16px;
  height: 52px;
  transition: all 0.2s ease;
}

.auth-page .input-wrapper:focus-within {
  background: white;
  border-color: #F5841F;
  box-shadow: 0 0 0 4px rgba(245, 132, 31, 0.1);
}

.auth-page .input-icon {
  color: #999999;
  margin-right: 12px;
  font-size: 20px;
  transition: color 0.2s ease;
}

.auth-page .input-wrapper:focus-within .input-icon {
  color: #F5841F;
}

.auth-page .input-field {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: #1A1A1A;
  background: transparent;
  height: 100%;
  font-family: inherit;
}

.auth-page .input-field::placeholder {
  color: #999999;
}

.auth-page .toggle-password {
  background: none;
  border: none;
  color: #999999;
  cursor: pointer;
  padding: 4px;
  font-size: 20px;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-page .toggle-password:hover {
  color: #666666;
}

/* Forgot Password Link */
.auth-page .forgot-password-link {
  display: inline-block;
  margin-top: 8px;
  color: #F5841F;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-page .forgot-password-link:hover {
  color: #D9740A;
  text-decoration: underline;
}

/* Primary Button - Scoped to auth pages */
.auth-page .btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  background: #F5841F;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(245, 132, 31, 0.25);
  transition: all 0.2s ease;
  text-decoration: none;
}

.auth-page .btn-primary:hover {
  background: #D9740A;
  box-shadow: 0 6px 16px rgba(245, 132, 31, 0.35);
  transform: translateY(-1px);
}

.auth-page .btn-primary:active {
  transform: translateY(0);
}

.auth-page .btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auth-page .btn-primary .mdi {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.auth-page .btn-primary:hover .mdi {
  transform: translateX(3px);
}

/* Error Message */
.auth-page .error-message {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  color: #DC3545;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-page .error-message .mdi {
  font-size: 18px;
}

/* Success Message */
.auth-page .success-message {
  background: #D1FAE5;
  border: 1px solid #A7F3D0;
  color: #28A745;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-page .success-message .mdi {
  font-size: 18px;
}

/* Auth Footer */
.auth-page .auth-footer {
  margin-top: 28px;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #EEEEEE;
}

.auth-page .auth-footer-text {
  color: #666666;
  font-size: 14px;
}

.auth-page .auth-footer-link {
  color: #F5841F;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-page .auth-footer-link:hover {
  color: #D9740A;
  text-decoration: underline;
}

/* Terms Container */
.auth-page .terms-container {
  margin-bottom: 8px;
}

.auth-page .terms-text {
  font-size: 13px;
  color: #666666;
  line-height: 1.6;
  text-align: center;
}

.auth-page .terms-link {
  color: #F5841F;
  text-decoration: none;
  font-weight: 600;
}

.auth-page .terms-link:hover {
  text-decoration: underline;
}

/* ===========================================
   OAuth Buttons
   =========================================== */
.auth-page .auth-divider {
  display: flex;
  align-items: center;
  margin: 28px 0;
}

.auth-page .auth-divider::before,
.auth-page .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #E0E0E0;
}

.auth-page .auth-divider span {
  padding: 0 16px;
  font-size: 13px;
  color: #999999;
  white-space: nowrap;
}

.auth-page .oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-page .btn-oauth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  border: 2px solid #E0E0E0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #1A1A1A;
  transition: all 0.2s ease;
  text-decoration: none;
}

.auth-page .btn-oauth:hover {
  border-color: #CCCCCC;
  background: #FAFAFA;
}

.auth-page .btn-oauth:active {
  transform: scale(0.98);
}

.auth-page .btn-oauth .oauth-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Google button */
.auth-page .btn-google:hover {
  border-color: #4285F4;
  background: #F8FAFF;
}

/* Apple button */
.auth-page .btn-apple {
  color: #000000;
}

.auth-page .btn-apple:hover {
  border-color: #000000;
  background: #F5F5F5;
}

.auth-page .btn-apple .oauth-icon {
  color: #000000;
}

/* ===========================================
   Responsive Design
   =========================================== */
@media (max-width: 520px) {
  .auth-page {
    padding: 32px 16px;
  }

  .auth-page .auth-card {
    padding: 32px 24px;
    border-radius: 12px;
  }

  .auth-page .auth-title {
    font-size: 28px;
  }

  .auth-page .auth-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .auth-page .auth-icon .mdi {
    font-size: 28px;
  }

  .auth-page .input-wrapper {
    height: 50px;
  }

  .auth-page .btn-primary {
    height: 50px;
  }

  .auth-page .btn-oauth {
    height: 50px;
  }
}
