/* Base layout and shared UI styling extracted from templates/base.html */
:root {
  --primary-color: #198754;
  --secondary-color: #6c757d;
}

body {
  background: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

footer {
  background: #fff;
  flex-shrink: 0;
}

.errorlist {
  color: #dc3545;
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

.notif-dropdown {
  display: none;
  position: fixed;
  right: 1rem;
  top: 4.5rem;
  width: 380px;
  max-width: calc(100vw - 2rem);
  z-index: 1090;
  max-height: 75vh;
  overflow-y: auto;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
}

.notif-dropdown.show {
  display: block;
}

#notifBadge:empty {
  display: none !important;
}

.navbar.sticky-top {
  z-index: 1060;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1400px) {
  .container-fluid {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 576px) {
  .notif-dropdown {
    width: 95vw;
    right: 2.5vw;
    left: 2.5vw;
    top: 3.5rem;
    max-height: 65vh;
  }

  main.container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

@media (max-width: 768px) {
  main.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.alert-container {
  position: fixed;
  top: 5.5rem;
  right: 1rem;
  z-index: 1080;
  max-width: 400px;
  width: 90%;
}

@media (max-width: 768px) {
  .alert-container {
    left: 1rem;
    right: 1rem;
    width: auto;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media print {
  .navbar,
  footer,
  .notif-dropdown {
    display: none !important;
  }

  body {
    background: white !important;
  }

  main {
    padding: 0 !important;
  }
}

.pulse-animation {
  animation: pulse 1s ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}
