/* ==========================================================================
   ACS Healthcare - Global Custom Stylesheet
   ========================================================================== */

/* Smooth Scrolling & Anchor Offset */
html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background: #f7fbff;
}

body.page-loading > :not(#page-loader) {
  visibility: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: #ffffff;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.page-loader__logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(11, 132, 229, 0.18);
}

.page-loader__spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #dbeafe;
  border-top-color: #0b84e5;
  border-radius: 999px;
  animation: page-loader-spin 800ms linear infinite;
}

.page-loader__text {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}

.modal-scrollbar-hidden {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal-scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

@keyframes page-loader-spin {
  to { transform: rotate(360deg); }
}

::selection {
  background: rgba(11, 132, 229, 0.2);
  color: #075985;
}

[id] {
  scroll-margin-top: 6rem;
}

/* Material Symbols Integration */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.material-symbols-fill {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Custom Background Patterns */
.grid-pattern {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(11, 132, 229, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 132, 229, 0.08) 1px, transparent 1px);
}

.grid-pattern-dense {
  background-size: 20px 20px;
  background-image: 
    linear-gradient(to right, rgba(11, 132, 229, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 132, 229, 0.08) 1px, transparent 1px);
}

.blue-glow {
  box-shadow: 0 18px 45px -24px rgba(11, 132, 229, 0.45);
}

button, a, input, textarea, select {
  -webkit-tap-highlight-color: transparent;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(11, 132, 229, 0.12);
}

/* Glassmorphism & Elevation */
.glass-nav {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F8FAFC;
}

::-webkit-scrollbar-thumb {
  background: #B7CBDC;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #62809A;
}

/* Interactive Card Transitions */
.interactive-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.interactive-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.08);
}

/* Privacy policy reading rhythm */
.privacy-section {
  padding-bottom: 2.25rem;
  border-bottom: 1px solid #D7E4EF;
}

.privacy-section + .privacy-section {
  padding-top: 2.25rem;
}

.privacy-section:last-of-type {
  border-bottom: 0;
}

/* Toast Notification Styles */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 320px;
  max-width: 440px;
  background: #FFFFFF;
  color: #111827;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid #E2E8F0;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
}

.toast-item.toast-leave {
  opacity: 0;
  transform: translateX(100%);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Legal Document Formatting */
.legal-content h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 2rem;
  color: #111827;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #E2E8F0;
}

.legal-content h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.75rem;
  color: #1E293B;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content p, .legal-content li {
  color: #475569;
  font-size: 0.9375rem;
  line-height: 1.625rem;
}

.legal-content ul, .legal-content ol {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-content ul {
  list-style-type: disc;
}

.legal-content ol {
  list-style-type: decimal;
}

.legal-content li {
  margin-bottom: 0.375rem;
}

/* Departments carousel with ACS blue and mint accents */
.department-carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: .25rem .1rem .75rem;
}

.department-carousel-track::-webkit-scrollbar {
  display: none;
}

.department-carousel-card {
  min-width: min(82vw, 290px);
  scroll-snap-align: start;
  border: 1px solid #dbe8f2;
  border-radius: 1.25rem;
  background: linear-gradient(145deg, #ffffff 0%, #f3f9fd 100%);
  padding: 1.25rem;
  box-shadow: 0 14px 30px -24px rgba(9, 42, 74, .45);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.department-carousel-card:hover {
  border-color: #8bd5c0;
  box-shadow: 0 18px 34px -24px rgba(9, 42, 74, .6);
  transform: translateY(-3px);
}

.department-icon-accent {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: .9rem;
  background: linear-gradient(135deg, #0b84e5, #19b99a);
  color: #ffffff;
  box-shadow: 0 8px 18px -10px rgba(11, 132, 229, .8);
}

.department-carousel-button {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid #dbe8f2;
  border-radius: 999px;
  background: #ffffff;
  color: #075985;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.department-carousel-button:hover {
  border-color: #7dd3fc;
  background: #effaff;
  color: #075985;
}

/* Shared public authentication controls */
.public-auth-form label { font-weight: 600; }
.public-auth-button { font-weight: 600; letter-spacing: .01em; background: #0f6fae; box-shadow: 0 8px 18px rgba(15,111,174,.18); transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.public-auth-button:hover { background: #0b5b91; transform: translateY(-1px); box-shadow: 0 11px 22px rgba(15,111,174,.22); }
.public-auth-actions { gap: 18px; }
.public-auth-link { font-weight: 600; }

.public-auth-page{display:grid;place-items:center;min-height:480px;padding:64px 20px;background:linear-gradient(135deg,#f2f9fd 0%,#fffaf0 100%)}
.public-auth-card{width:min(100%,620px);padding:40px;border:1px solid #dce9f2;border-radius:24px;background:#fff;box-shadow:0 18px 45px rgba(8,43,76,.10)}
.public-auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:30px;text-decoration:none}.public-auth-brand img{width:46px;height:46px;border-radius:14px;object-fit:cover}.public-auth-brand strong{display:block;color:#082b4c;font-family:'Plus Jakarta Sans',sans-serif;font-size:20px;font-weight:800}.public-auth-brand small{color:#718497}
.public-auth-card h1{margin:0;color:#082b4c;font-family:'Plus Jakarta Sans',sans-serif;font-size:clamp(25px,3vw,32px);font-weight:700;letter-spacing:-.03em}.public-auth-card>p{margin:10px 0 26px;color:#6f8190;line-height:1.6}.public-auth-form{display:grid;gap:16px}.public-auth-form label{display:grid;gap:7px;color:#29455a;font-size:13px;font-weight:600;line-height:1.25}.public-auth-form input,.public-auth-form select,.public-auth-form textarea{width:100%;min-height:46px;padding:12px 13px;border:1px solid #cddfeb;border-radius:10px;outline:0;background:#fff;color:#152a3b;font:inherit}.public-auth-form textarea{resize:vertical}.public-auth-form input:focus,.public-auth-form select:focus,.public-auth-form textarea:focus{border-color:#0f6fae;box-shadow:0 0 0 3px rgba(15,111,174,.12)}.public-auth-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.public-auth-actions{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:8px}.public-auth-button{min-height:46px;padding:12px 22px;border:0;border-radius:10px;background:#0f6fae;color:#fff;font-size:14px;font-weight:600;cursor:pointer;box-shadow:0 8px 18px rgba(15,111,174,.18);transition:background .18s ease,transform .18s ease,box-shadow .18s ease}.public-auth-button:hover{background:#0b5b91;transform:translateY(-1px);box-shadow:0 11px 22px rgba(15,111,174,.22)}.public-auth-button:disabled{opacity:.6;cursor:wait}.public-auth-link{padding:0;border:0;background:none;color:#0f6fae;font-size:13px;font-weight:600;text-decoration:none;cursor:pointer}.public-auth-link:hover{text-decoration:underline}.public-auth-message{display:none;padding:11px 13px;border-radius:9px;font-size:13px;line-height:1.45}.public-auth-message.show{display:block}.public-auth-message.error{background:#fff0f0;color:#b53d3d}.public-auth-message.success{background:#eafaf2;color:#14764f}.public-auth-hidden{display:none!important}
@media(max-width:600px){.public-auth-page{padding:38px 14px}.public-auth-card{padding:26px 20px;border-radius:18px}.public-auth-grid{grid-template-columns:1fr}.public-auth-actions{align-items:stretch;flex-direction:column}.public-auth-button{width:100%}}
