/* START OF AUTOADVISE CUSTOM STYLES (derived from React App) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&family=Inter:wght@400;500&family=Open+Sans:wght@400;600&display=swap');

:root {
  /* AutoAdvise Colors - Matching React Frontend */
  --auto-navy: #1E3A5F;
  --auto-turquoise: #A7E4F2;
  --auto-gray: #F4F7FA;
  --auto-gold: #C89F54;
  
  /* Base Variables */
  --aa-background: var(--auto-gray); /* Soft Gray/White #F4F7FA */
  --aa-foreground: var(--auto-navy); /* Deep Navy Blue #1E3A5F */
  --aa-card: hsl(0, 0%, 100%);
  --aa-card-foreground: var(--auto-navy);
  --aa-popover: hsl(0, 0%, 100%);
  --aa-popover-foreground: var(--auto-navy);
  
  /* Using turquoise as primary color now */
  --aa-primary: var(--auto-turquoise); /* Turquoise Blue #A7E4F2 */
  --aa-primary-foreground: var(--auto-navy); /* Navy on turquoise */
  
  --aa-secondary: var(--auto-navy); /* Navy Blue #1E3A5F */
  --aa-secondary-foreground: hsl(0, 0%, 100%); /* White */
  
  --aa-muted: var(--auto-gray);
  --aa-muted-foreground: hsl(214, 20%, 50%);
  --aa-accent: var(--auto-gold); /* Gold Highlight #C89F54 */
  --aa-accent-foreground: hsl(0, 0%, 100%);
  --aa-destructive: hsl(0, 84.2%, 60.2%);
  --aa-destructive-foreground: hsl(0, 0%, 98%);
  --aa-border: var(--auto-navy);
  --aa-input: var(--auto-navy);
  --aa-ring: var(--auto-turquoise);
  --aa-radius: 0.5rem; /* Default border radius */
  --aa-radius-md: 0.375rem; /* rounded-md */
  --aa-radius-lg: 0.5rem; /* rounded-lg */

  /* Font families - Matching React Frontend */
  --aa-font-heading: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --aa-font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --aa-font-ui: 'Open Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  --aa-font-size-sm: 0.875rem;
  --aa-font-weight-normal: 400;
  --aa-font-weight-medium: 500;
  --aa-font-weight-bold: 700;
  
  --aa-text-primary: var(--auto-navy);
  --aa-text-secondary: var(--auto-gray);
  --aa-body-bg: var(--auto-gray);
  --aa-border-color: rgba(30, 58, 95, 0.2); /* Lighter navy for borders */
  --aa-border-radius-lg: 0.5rem;
  --aa-card-bg: hsl(0, 0%, 100%);
}

body {
  font-family: var(--aa-font-body);
  color: var(--aa-foreground);
  background-color: var(--aa-body-bg); /* Ensure body bg is set */
  line-height: 1.5;
}

/* AutoAdvise Button Styles - Matching React Frontend */
.btn-autoadvise { /* Base for transitions etc. */
  display: inline-block;
  font-weight: 500;
  font-family: var(--aa-font-ui);
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 2px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: var(--aa-radius);
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

/* Primary Button - Turquoise with Navy text */
.btn-primary-auto {
  color: var(--auto-navy);
  background-color: var(--auto-turquoise);
  border-color: var(--auto-turquoise);
}

.btn-primary-auto:hover {
  background-color: #8fd8e9; /* Slightly darker turquoise */
  border-color: #8fd8e9;
}

/* Secondary Button - Navy with white text */
.btn-secondary-auto {
  color: white;
  background-color: var(--auto-navy);
  border-color: var(--auto-navy);
}

.btn-secondary-auto:hover {
  background-color: #152c48; /* Slightly darker navy */
  border-color: #152c48;
}

/* Tertiary Button - White with navy border */
.btn-tertiary-auto {
  color: var(--auto-navy);
  background-color: white;
  border-color: var(--auto-navy);
  color: var(--aa-primary);
  border-radius: var(--aa-radius-md);
  padding: 0.5rem 1rem; /* py-2 px-4 */
  border: 2px solid var(--aa-primary);
}
.btn-tertiary-auto:hover {
  background-color: hsla(0, 0%, 100%, 0.9); /* white with opacity */
  color: var(--aa-primary);
}

.btn-accent-auto {
  background-color: var(--aa-accent);
  color: var(--aa-accent-foreground);
  border-radius: var(--aa-radius-md);
  padding: 0.5rem 1rem; /* py-2 px-4 */
}
.btn-accent-auto:hover {
  background-color: hsl(39, 50%, calc(56% * 0.9)); /* Adjusting lightness for opacity effect */
  color: var(--aa-accent-foreground);
}

/* Input Styles - Matching React Frontend */
.input-autoadvise {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  font-family: var(--aa-font-ui);
  line-height: 1.5;
  color: var(--auto-navy);
  background-color: white;
  background-clip: padding-box;
  border: 1px solid var(--aa-border-color);
  border-radius: var(--aa-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  margin-bottom: 1.25rem;
}

.input-autoadvise:focus {
  border-color: var(--auto-turquoise);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(167, 228, 242, 0.35);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--auto-navy);
  font-family: var(--aa-font-ui);
}

/* Card Styles */
.card-autoadvise {
  background-color: var(--aa-card-bg);
  border: 1px solid var(--aa-border-color);
  border-radius: var(--aa-border-radius-lg); /* Consider a slightly larger radius for main cards */
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
  margin-bottom: 1rem; /* Added for spacing */
}

/* Headings */
.h1-auto, .h2-auto, .h3-auto, .h4-auto {
  font-family: var(--aa-font-heading);
  color: var(--aa-primary);
  margin-top: 0; /* Bootstrap reset often needed */
  margin-bottom: 0.5rem; /* Bootstrap default */
}
.h1-auto {
  font-size: 1.875rem; /* text-3xl */
  font-weight: 700; /* font-bold */
}
.h2-auto {
  font-size: 1.5rem; /* text-2xl */
  font-weight: 700; /* font-bold */
}
.h3-auto {
  font-size: 1.25rem; /* text-xl */
  font-weight: 700; /* font-bold */
}
.h4-auto {
  font-size: 1.125rem; /* text-lg */
  font-weight: 500; /* font-medium */
}

/* Body text */
.text-auto {
  font-family: var(--aa-font-body);
  color: var(--aa-primary);
  line-height: 1.625; /* leading-relaxed */
}

/* AutoAdvise Divider */
.divider-autoadvise {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--aa-text-secondary);
  font-size: var(--aa-font-size-sm);
  font-weight: var(--aa-font-weight-normal);
}

.divider-autoadvise::before,
.divider-autoadvise::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--aa-border-color);
}

.divider-autoadvise:not(:empty)::before {
  margin-right: .75em;
}

.divider-autoadvise:not(:empty)::after {
  margin-left: .75em;
}

.fs-sm {
  font-size: var(--aa-font-size-sm);
}

/* Modern Login Page Styles */
.login-container {
  min-height: 100vh;
  display: flex;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.login-form-side {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: white;
}

.login-graphic-side {
  flex: 1;
  background: linear-gradient(135deg, var(--auto-navy), #0a2547);
  display: none;
  overflow: hidden;
  position: relative;
}


.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--aa-secondary);
}

.login-subtitle {
  margin-bottom: 2rem;
  color: var(--aa-text-primary);
  opacity: 0.8;
}

.login-form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.login-form .form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.login-form .input-autoadvise {
  margin-bottom: 1.25rem;
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--aa-muted-foreground);
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.login-divider::before {
  margin-right: 1rem;
}

.login-divider::after {
  margin-left: 1rem;
}

.social-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--aa-border-color);
  border-radius: var(--aa-radius);
  background-color: white;
  color: var(--auto-navy);
  font-family: var(--aa-font-ui);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.social-login-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: var(--auto-navy);
}

/* Provider-specific styling */
.social-login-btn .provider-logo {
  margin-right: 0.75rem;
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}

/* Microsoft Official Colors */
a.social-login-microsoft {
  background-color: #ffffff !important;
  color: #5e5e5e !important;
  border: 1px solid #8c8c8c !important;
}

a.social-login-microsoft:hover {
  background-color: #f3f2f1 !important;
  color: #323130 !important;
  border-color: #323130 !important;
}

/* Apple Official Colors */
a.social-login-apple {
  background-color: #000000 !important;
  color: #ffffff !important;
  border: 1px solid #000000 !important;
  padding: 0.875rem 1rem !important;
}

a.social-login-apple:hover {
  background-color: #1d1d1f !important;
  color: #ffffff !important;
  border-color: #1d1d1f !important;
}

/* Make Apple logo white on the black button */
.social-login-apple .provider-logo {
  filter: brightness(0) invert(1);
}

/* Google Official Colors */
a.social-login-google {
  background-color: #ffffff !important;
  color: #3c4043 !important;
  border: 1px solid #dadce0 !important;
}

a.social-login-google:hover {
  background-color: #f8f9fa !important;
  color: #174ea6 !important;
  border-color: #dadce0 !important;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}

/* Zoom Official Colors */
a.social-login-zoom {
  background-color: #2d8cff !important;
  color: #ffffff !important;
  border: 1px solid #2d8cff !important;
}

a.social-login-zoom:hover {
  background-color: #0b6cff !important;
  color: #ffffff !important;
  border-color: #0b6cff !important;
}

/* Default Provider Colors */
a.social-login-default {
  background-color: #6c757d !important;
  color: #ffffff !important;
  border: 1px solid #6c757d !important;
}

a.social-login-default:hover {
  background-color: #5a6268 !important;
  color: #ffffff !important;
  border-color: #5a6268 !important;
}


.login-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.login-checkbox {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.login-checkbox input {
  margin-right: 0.5rem;
}

.login-btn {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--auto-turquoise);
  color: var(--auto-navy);
  border: none;
  border-radius: var(--aa-radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1.5rem;
}

.login-btn:hover {
  background-color: #8fd8e9; /* Slightly darker turquoise */
}

.forgot-password {
  display: block;
  text-align: right;
  margin-bottom: 1.5rem;
  color: var(--auto-navy);
  text-decoration: none;
}

.forgot-password:hover {
  text-decoration: underline;
  color: var(--auto-navy);
}

.register-link {
  color: var(--auto-navy);
  font-weight: 600;
  text-decoration: none;
}

.register-link:hover {
  text-decoration: underline;
  color: var(--auto-navy);
}

/* Responsive styles */
@media (min-width: 992px) {
  .login-graphic-side {
    display: block;
  }
  
  .login-form-side {
    padding: 3rem;
  }
}

.graphic-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,.075)' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.3;
}

/* Centralized Styles (formerly in override.css) */

/* Make all h1 tags use the navy color */
h1 {
  color: var(--auto-navy);
}

.login-btn {
  background-color: var(--auto-turquoise);
  color: var(--auto-navy);
  border: none;
}

.login-btn:hover {
  background-color: #8fd8e9; /* Slightly darker turquoise */
}


.login-graphic-side {
  background: linear-gradient(135deg, var(--auto-turquoise), #65c5d8);
  position: relative;
  display: none; /* Hidden by default on small screens */
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Only show the graphic side on screens larger than 768px */
@media (min-width: 768px) {
  .login-graphic-side {
    display: flex;
  }
}

.login-graphic-side .logo-container {
  position: absolute;
  width: 50%;
  max-width: 300px;
  z-index: 2;
  background-color: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.login-graphic-side .graphic-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 80%);
  z-index: 1;
}

/* Force links to use navy color */
.register-link, .forgot-password {
  color: var(--auto-navy);
}

/* Responsive adjustments for the login container */
.login-container {
  min-height: 100vh;
  display: flex;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.login-form-side {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: white;
  width: 100%;
}

/* On small screens, ensure the form takes full width */
@media (max-width: 767px) {
  .login-form {
    max-width: 100%;
    padding: 0 1rem;
  }
}

/* Sticky Sign Out Component */
.sticky-signout {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 99999; /* Extremely high z-index to ensure it's above all content */
  pointer-events: auto; /* Ensure clicks are registered */
}

.signout-btn {
  display: flex;
  align-items: center;
  background-color: var(--auto-navy);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.signout-btn:hover {
  background-color: #152c48; /* Slightly darker navy */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  color: white;
  text-decoration: none;
}

.signout-icon {
  font-size: 1.25rem;
  margin-right: 0.5rem;
}

.signout-text {
  font-weight: 500;
}

/* Main content container */
.main-content {
  position: relative; /* Creates a positioning context for absolute children */
  min-height: 100vh; /* Ensure it takes up the full viewport height */
  width: 100%;
  overflow: visible; /* Ensure the sign-out button isn't clipped */
}

/* Logout page styles */
.logout-actions {
  margin-top: 2rem;
  width: 100%;
}

.logout-actions .login-btn {
  width: 100%;
  display: block;
  text-align: center;
}

.cancel-logout {
  color: var(--auto-navy);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  padding: 0.5rem;
}

.cancel-logout:hover {
  text-decoration: underline;
  color: var(--auto-navy);
}

/* LoggedOut page styles */
.redirect-container {
  margin-top: 2rem;
}

.redirect-container p {
  margin-bottom: 1rem;
}

.redirect-container .login-btn {
  width: 100%;
  display: block;
  text-align: center;
}

/* Error page styles */
.error-details {
  background-color: rgba(167, 228, 242, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--auto-navy);
}

.error-message h3 {
  color: var(--auto-navy);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.error-message p {
  color: #555;
  margin-bottom: 0;
}

.request-id-container {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(30, 58, 95, 0.1);
}

/* END OF AUTOADVISE CUSTOM STYLES */

.welcome-page .logo {
  width: 64px;
}

.icon-banner {
  width: 32px;
}

.body-container {
  margin-top: 60px;
  padding-bottom: 40px;
}

.welcome-page li {
  list-style: none;
  padding: 4px;
}

.logged-out-page iframe {
  display: none;
  width: 0;
  height: 0;
}

.grants-page .card {
  margin-top: 20px;
  border-bottom: 1px solid lightgray;
}
.grants-page .card .card-title {
  font-size: 120%;
  font-weight: bold;
}
.grants-page .card .card-title img {
  width: 100px;
  height: 100px;
}
.grants-page .card label {
  font-weight: bold;
}
