/* src/assets/css/components.css */
/* All component styles consolidated in one file */
/* Includes: Header, Footer, Menu, Loading, Errors, Layouts, Sidebars, Widgets, Pagination */

/* ========================================
   HEADER & FOOTER
   ======================================== */

.header,
.footer {
  color: var(--gold-blue);
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: white;
}

.footer p {
  margin-bottom: 0;
}

.logo-left {
  padding-right: 0;
}

.logo-right {
  padding-left: 0;
}

.headerTitle,
.footerTitle {
  font-weight: bold;
}

/* ========================================
   MENU & NAVIGATION
   ======================================== */

.menu {
  position: relative;
  border-left: solid var(--gold-yellow) 1px;
  border-right: solid var(--gold-yellow) 1px;
}

.menu .menuSection {
  text-align: center;
}

.menu a {
  color: var(--gold-blue);
  white-space: nowrap;
  text-decoration: none;
}

.dropdown,
.smalldropdown {
  display: none;
  z-index: 9999999;
  background-color: white;
  opacity: 1;
}

.dropdown div,
.smalldropdown div {
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  padding-top: calc(var(--bs-gutter-x) * 0.5);
}

.dropdown {
  position: absolute;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}

.smalldropdown .parent {
  position: absolute;
  left: 0;
}

.smalldropdown {
  text-align: center;
}

.isOpen {
  display: block;
}

/* ========================================
   LOADING COMPONENTS
   ======================================== */

/* Loading Spinner */
.loading-spinner-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.loading-spinner-wrapper.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 9999;
}

.loading-spinner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-message {
  color: #6c757d;
  font-size: 0.9rem;
  margin: 0;
}

/* Spinner sizes */
.spinner-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15rem;
}

.spinner-md {
  width: 2rem;
  height: 2rem;
  border-width: 0.2rem;
}

.spinner-lg {
  width: 3rem;
  height: 3rem;
  border-width: 0.25rem;
}

.spinner-xl {
  width: 4rem;
  height: 4rem;
  border-width: 0.3rem;
}

/* Loading Skeleton */
.loading-skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: loading-skeleton 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes loading-skeleton {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Skeleton variants */
.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-title {
  height: 1.5rem;
  width: 60%;
  margin-bottom: 1rem;
}

.skeleton-paragraph {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-paragraph:last-child {
  width: 80%;
}

.skeleton-image {
  height: 200px;
  width: 100%;
  margin-bottom: 1rem;
}

.skeleton-card {
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* ========================================
   ERROR COMPONENTS
   ======================================== */

/* Error Alerts Container */
.error-alerts-container {
  margin-bottom: 1rem;
  padding: 0.5rem;
}

/* Toast notifications */
.toast-container {
  z-index: 10000;
}

.toast {
  min-width: 350px;
  margin-bottom: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-error .toast-header {
  background-color: #dc3545;
  color: white;
}

.toast-error .btn-close {
  filter: brightness(0) invert(1);
}

.toast-warning .toast-header {
  background-color: #ffc107;
  color: #000;
}

.toast-info .toast-header {
  background-color: #0dcaf0;
  color: #000;
}

.toast-success .toast-header {
  background-color: #198754;
  color: white;
}

.toast-success .btn-close {
  filter: brightness(0) invert(1);
}

/* Alert animations */
.alert {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toast animations */
.toast.show {
  animation: slideInRight 0.3s ease-out;
}

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

/* ========================================
   3-COLUMN LAYOUT (Generic)
   ======================================== */

.three-column-layout {
  padding: 0;
  padding-top: 1.5rem;
  max-width: 1400px;
  margin: 0 auto !important;
}

/* Add consistent padding to the edges */
.three-column-layout > .row {
  margin-left: 0.75rem !important;
  margin-right: 0.75rem !important;
}

/* Remove Bootstrap column padding */
.three-column-layout .row > * {
  padding-left: 0;
  padding-right: 0;
}

/* Add double padding to main content */
.main-content {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.sidebar-left,
.sidebar-right {
  align-self: flex-start;
}

/* Content Panel in left sidebar - use filter colors */
.sidebar-left .content-panel {
  background: white;
  border: 1px solid #ddd;
}

.sidebar-left .content-panel-header {
  background: white;
  border-bottom: none;
  padding: 1rem 1.5rem 0 1.5rem;
}

.sidebar-left .content-panel-title {
  color: var(--gold-blue);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold-yellow);
}

.sidebar-left .content-panel-body {
  background: white;
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: #333;
}

/* Custom column widths for sidebars (2.5 columns = 20.833%) */
@media (min-width: 992px) {
  .three-column-layout aside.col-lg-2 {
    flex: 0 0 20.833%;
    max-width: 20.833%;
  }

  .three-column-layout main.col-lg-8 {
    flex: 0 0 58.334%;
    max-width: 58.334%;
  }
}

@media (max-width: 767.98px) {
  .three-column-layout {
    padding: 1rem 0.5rem;
  }

  .sidebar-left {
    padding: 0;
  }
}

/* Mobile filter toggle */
.mobile-filter-toggle .btn-outline-blue {
  color: var(--gold-blue);
  border-color: var(--gold-blue);
}

.mobile-filter-toggle .btn-outline-blue:hover {
  background-color: var(--gold-blue);
  color: white;
}

/* ========================================
   SIDEBAR FILTERS (Generic)
   ======================================== */

.sidebar-filters {
  background: white;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  padding: 1.5rem;
  font-size: 0.9rem;
}

@media (max-width: 767.98px) {
  .sidebar-filters {
    border-left: none;
    border-right: none;
    border-radius: 0;
  }
}

.filter-title {
  color: var(--gold-blue);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold-yellow);
}

.filter-section {
  margin-bottom: 1.5rem;
}

.filter-section:last-child {
  margin-bottom: 0;
}

/* Category filter buttons */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  background: white;
  text-align: left;
  transition: all 0.2s;
  cursor: pointer;
}

.category-item:hover {
  background: #f8f9fa;
  border-color: var(--gold-blue);
}

.category-item.active {
  background: var(--gold-blue);
  border-color: var(--gold-blue);
  color: white;
  font-weight: 600;
}

.category-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Search input */
.search-input {
  width: 100%;
}

/* Date inputs */
.date-inputs .form-label {
  color: #666;
  margin-bottom: 0.25rem;
}

/* ========================================
   SIDEBAR WIDGETS (Generic)
   ======================================== */

.sidebar-widgets {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.widget {
  background: white;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  overflow: hidden;
}

.widget-header {
  background: linear-gradient(135deg, var(--gold-blue) 0%, #3a3ea9 100%);
  color: white !important;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-header * {
  color: white !important;
}

.widget-header i {
  font-size: 1.1rem;
}

.widget-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: white !important;
}

.widget-content {
  padding: 1rem;
}

/* Calendar Widget */
.event-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.event-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.event-date {
  background: var(--gold-yellow);
  color: var(--gold-blue);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  text-align: center;
  min-width: 50px;
  height: fit-content;
}

.event-info strong {
  color: var(--gold-blue);
  font-size: 0.8rem;
}

.event-info small {
  font-size: 0.7rem;
}

/* Links Widget */
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.link-list li:last-child {
  border-bottom: none;
}

.link-list a {
  color: var(--gold-blue);
  text-decoration: none;
  font-size: 0.8rem;
}

.link-list a:hover {
  text-decoration: underline;
  color: var(--color-hover);
}

.link-list img {
  width: 16px;
  height: 16px;
}

/* ========================================
   PAGINATION (Generic)
   ======================================== */

.pagination .page-link {
  color: var(--gold-blue);
  border: 1px solid var(--gold-yellow);
  border-radius: 0.25rem;
  margin: 0 0.2rem;
}

.pagination .page-item.active .page-link {
  background-color: var(--gold-blue);
  border-color: var(--gold-blue);
  color: white;
}

.pagination .page-link:hover {
  background-color: var(--gold-yellow);
  border-color: var(--gold-yellow);
  color: var(--gold-blue);
}

.pagination .page-item.disabled .page-link {
  color: #6c757d;
  pointer-events: none;
  border-color: #e0e0e0;
}

/* ========================================
   CONTENT PANEL COMPONENT (Matching News Item Style)
   ======================================== */

.content-panel {
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Header: Yellow background like news items */
.content-panel-header {
  background: #ffcf63;  /* Yellow from old site */
  border-bottom: 1px solid #ddd;
  padding: 0.75rem 1rem;
}

.content-panel-title {
  color: #2e3092;  /* Blue from GOLD theme */
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

/* Content: Light yellow background like news items */
.content-panel-body {
  background: #ffffb2;  /* Light yellow from old site */
  padding: 1.5rem;
  color: #333;
  line-height: 1.7;
}

/* Style content HTML (matching news-content) */
.content-panel-body p {
  margin-bottom: 1rem;
}

.content-panel-body p:last-child {
  margin-bottom: 0;
}

.content-panel-body strong {
  font-weight: 600;
  color: #000;
}

.content-panel-body ul,
.content-panel-body ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.content-panel-body li {
  margin-bottom: 0.5rem;
}

/* ========================================
   TABLES - GLOBAL STYLES
   ======================================== */

/* Global table styling with GOLD theme colors */
.table thead,
table thead {
  background-color: #ffcf63 !important;  /* Yellow header */
  color: var(--gold-blue) !important;
}

.table thead th,
table thead th {
  font-weight: 600;
  border: none;
  padding: 0.75rem;
  background-color: #ffcf63 !important;
  color: var(--gold-blue) !important;
  font-size: 0.9rem;
}

/* Alternating row colors - Override Bootstrap's white backgrounds */
.table tbody tr:nth-child(odd),
.table-hover tbody tr:nth-child(odd),
table tbody tr:nth-child(odd) {
  background-color: #ffff99 !important;  /* Light yellow */
  --bs-table-bg: #ffff99 !important;  /* Bootstrap 5 variable override */
}

.table tbody tr:nth-child(even),
.table-hover tbody tr:nth-child(even),
table tbody tr:nth-child(even) {
  background-color: #ffffCC !important;  /* Lighter yellow */
  --bs-table-bg: #ffffCC !important;  /* Bootstrap 5 variable override */
}

/* Hover state - Override Bootstrap's hover color */
.table tbody tr:hover,
.table-hover tbody tr:hover,
table tbody tr:hover {
  background-color: #ffdb00 !important;  /* Bright yellow on hover */
  --bs-table-hover-bg: #ffdb00 !important;  /* Bootstrap 5 variable override */
}

.table tbody td,
table tbody td {
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem;
  vertical-align: middle;
  background-color: transparent !important;  /* Let row background show through */
  font-size: 0.9rem;
}

.table tbody tr:last-child td,
table tbody tr:last-child td {
  border-bottom: none;
}

/* ========================================
   MODALS
   ======================================== */

/* Registration Modal */
.registration-modal .modal-content {
  border: 2px solid var(--gold-yellow);
  border-radius: 0.5rem;
}

.registration-modal .modal-header {
  background: var(--gold-yellow);
  border-bottom: 2px solid var(--gold-yellow);
}

.registration-modal .modal-header .modal-title {
  color: var(--gold-blue);
  font-size: 1.25rem;
}

.registration-modal .modal-header .btn-close {
  filter: none;
}

.registration-modal .modal-footer {
  border-top: 1px solid var(--gold-yellow);
}

/* Form elements in modal */
.registration-modal .form-label {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.registration-modal .form-control {
  border-color: #ddd;
  font-size: 0.9rem;
}

.registration-modal .form-control:focus {
  border-color: var(--gold-yellow);
  box-shadow: 0 0 0 0.2rem rgba(255, 219, 0, 0.25);
}

/* Checkbox styling with GOLD theme */
.registration-modal .transport-checkbox {
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid var(--gold-yellow);
  cursor: pointer;
}

.registration-modal .transport-checkbox:checked {
  background-color: var(--gold-blue);
  border-color: var(--gold-blue);
}

.registration-modal .transport-checkbox:focus {
  border-color: var(--gold-yellow);
  box-shadow: 0 0 0 0.2rem rgba(255, 219, 0, 0.25);
}

.registration-modal .form-check-label {
  font-size: 0.95rem;
  cursor: pointer;
  margin-left: 0.5rem;
}

/* Button styles in modal */
.registration-modal .btn-gold-blue {
  background-color: var(--gold-blue);
  border-color: var(--gold-blue);
  color: white;
  font-weight: 600;
}

.registration-modal .btn-gold-blue:hover:not(:disabled) {
  background-color: #252775;
  border-color: #252775;
}

.registration-modal .btn-gold-blue:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Border utility classes */
.border-gold {
  border-color: var(--gold-yellow) !important;
}

.text-gold-blue {
  color: var(--gold-blue) !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 767.98px) {
  .filter-title {
    font-size: 1rem;
  }
}
