/* Mrs. Selam Portal — Unified UI Styles v7.0 */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 2px solid #D4AF37;
  box-shadow: 0 2px 8px rgba(0, 47, 108, 0.08);
}

.navbar .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.navbar .brand {
  font-weight: 700;
  font-size: 16px;
  color: #002F6C;
  margin-right: 16px;
  white-space: nowrap;
}

.navbar a {
  color: #002F6C;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.navbar a:hover {
  background: #f0f4f8;
  border-color: #D4AF37;
}

.navbar a.active {
  background: linear-gradient(135deg, #002F6C 0%, #004A9C 100%);
  color: #ffffff;
  border-color: #D4AF37;
  box-shadow: 0 2px 6px rgba(0, 47, 108, 0.2);
}

.footerbar {
  margin-top: 48px;
  border-top: 2px solid #D4AF37;
  background: linear-gradient(135deg, #002F6C 0%, #003366 100%);
  padding: 24px 16px;
  color: #ffffff;
  font-size: 13px;
}

.footerbar .wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.footerbar .brand-text {
  font-weight: 600;
  color: #D4AF37;
}

.footerbar .version-tag {
  opacity: 0.9;
  font-size: 12px;
}

@media (max-width: 768px) {
  .navbar .inner {
    padding: 8px 16px;
  }
  
  .navbar a {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .navbar .brand {
    font-size: 14px;
    margin-right: 8px;
  }
  
  .footerbar .wrap {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

/* v7.1 Form Enhancements */
.input.ok {
  border-color: #39b54a;
}

.input.err {
  border-color: #d9534f;
}

.hint {
  font-size: 12px;
  color: #5c667a;
  margin-top: 4px;
}

.hint.err {
  color: #d9534f;
}

.stickybar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #e5e8ef;
  padding: 10px;
  border-radius: 10px;
  z-index: 999;
}

@media (max-width: 720px) {
  .stickybar .btn {
    width: 100%;
  }
}

/* One-Surface Widgets UI Polishes v1.0 */

/* Dark mode & high-contrast support */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
  .surface, .card { 
    background: #0b0b0c; 
    border-color: #2a2a2d; 
    box-shadow: none; 
  }
  .voice-body { color: #d6d7dc; }
  .voice-title { color: #fff; }
  .btn { 
    background: #111317; 
    border-color: #2a2a2d; 
    color: #e9eaf0; 
  }
  .btn-primary { 
    background: #0F2E6D; 
    color: #fff; 
  }
  .dropdown {
    background: #0b0b0c;
    border-color: #2a2a2d;
  }
  #surface-onboard {
    background: #0b0b0c;
    border-color: #2a2a2d;
  }
  .voice-error {
    background: #2a1515;
    border-color: #3a1f1f;
  }
}

@media (prefers-contrast: more) {
  #surface-input:focus { outline-width: 3px; }
}

/* Screen reader only (accessibility) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* History dropdown */
.dropdown {
  margin-top: 6px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(16,24,40,.06);
  max-height: 220px;
  overflow: auto;
  list-style: none;
  padding: 0;
}
.dropdown li {
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.dropdown li[aria-selected="true"],
.dropdown li:hover {
  background: #F9FAFB;
}

/* Focus indicators (accessibility) */
#surface-input:focus,
#surface-focus-input:focus {
  outline: 2px solid #D4AF37;
  outline-offset: 2px;
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.fade-in {
  animation: fadeIn .24s ease-out;
}

/* Mic listening pulse */
@keyframes micPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(212,175,55,.35);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(212,175,55,0);
  }
}
.mic-listening {
  animation: micPulse 1.2s ease-in-out infinite;
}

/* Offline indicator */
#offline-banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  background: #111827;
  color: #fff;
  padding: 6px 10px;
  border-radius: 10px;
  z-index: 99999;
  font-size: 12px;
  animation: fadeIn 0.3s ease-out;
}

/* Voice error styling */
.voice-error {
  color: #9B1C1C;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  padding: 8px;
}

/* Mobile touch targets */
@media (max-width: 640px) {
  .btn {
    padding: 12px 14px;
    min-height: 48px;
  }
  #surface-mic {
    min-width: 48px;
  }
  .surface-row {
    align-items: stretch;
  }
}

/* Zero layout shift: reserve space for Tips & Response */
#surface-tips {
  min-height: 40px;
  display: flex;
  align-items: center;
}

#surface-response {
  min-height: 120px;
}

/* Reduced motion support (battery saver) */
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .mic-listening,
  #offline-banner {
    animation: none;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
#surface-onboard,.getting-started{display:none!important}
