/* FCDC Brand Colors */
:root {
  --fcdc-primary: #3E22AD;
  --fcdc-secondary: #CC0808;
  --fcdc-primary-rgb: 62, 34, 173;
  --fcdc-secondary-rgb: 204, 8, 8;
}

/* Override Bootstrap primary color */
.bg-primary {
  background-color: var(--fcdc-primary) !important;
}

.btn-primary {
  background-color: var(--fcdc-primary);
  border-color: var(--fcdc-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #321b8a;
  border-color: #321b8a;
}

.btn-outline-primary {
  color: var(--fcdc-primary);
  border-color: var(--fcdc-primary);
}

.btn-outline-primary:hover {
  background-color: var(--fcdc-primary);
  border-color: var(--fcdc-primary);
}

.text-primary {
  color: var(--fcdc-primary) !important;
}

.border-primary {
  border-color: var(--fcdc-primary) !important;
}

/* Secondary color */
.bg-secondary-fcdc {
  background-color: var(--fcdc-secondary) !important;
}

.text-secondary-fcdc {
  color: var(--fcdc-secondary) !important;
}

/* Links */
a {
  color: var(--fcdc-primary);
}

a:hover {
  color: #321b8a;
}

/* Navbar */
.navbar-brand img {
  filter: brightness(0) invert(1);
}

.navbar .dropdown-menu {
  border-radius: 4px;
}

/* Cards */
.card {
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

/* Tables */
.table th {
  font-weight: 600;
  color: #495057;
  border-bottom-width: 2px;
}

.table-hover tbody tr:hover {
  background-color: rgba(var(--fcdc-primary-rgb), 0.05);
}

/* Forms */
.form-control:focus,
.form-select:focus {
  border-color: var(--fcdc-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--fcdc-primary-rgb), 0.25);
}

.form-check-input:checked {
  background-color: var(--fcdc-primary);
  border-color: var(--fcdc-primary);
}

/* Badges */
.badge {
  font-weight: 500;
}

.badge-sm {
  font-size: 0.7rem;
  padding: 0.2em 0.4em;
}

.badge-sm i {
  font-size: 0.6rem;
}

/* Alerts */
.alert {
  border-radius: 4px;
}

/* HTMX loading indicator */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: block;
}

.htmx-request.htmx-indicator {
  display: block;
}

/* Wellness indicators */
.wellness-danger {
  color: #dc3545;
}

.wellness-warning {
  color: #ffc107;
}

.wellness-ok {
  color: #198754;
}

/* Calendar styles */
.calendar-day {
  min-height: 100px;
  border: 1px solid #dee2e6;
  padding: 0.5rem;
}

.calendar-day.today {
  background-color: rgba(var(--fcdc-primary-rgb), 0.1);
}

.calendar-day.other-month {
  background-color: #f8f9fa;
  color: #6c757d;
}

.calendar-slot {
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.25rem;
  border-radius: 2px;
  font-size: 0.875rem;
}

.calendar-slot-normal {
  background-color: #e7f1ff;
  border-left: 3px solid var(--fcdc-primary);
}

.calendar-slot-warning {
  background-color: #fff3cd;
  border-left: 3px solid #ffc107;
}

.calendar-slot-danger {
  background-color: #f8d7da;
  border-left: 3px solid #dc3545;
}

/* Time slots */
.time-slot {
  border-bottom: 1px solid #dee2e6;
  min-height: 60px;
}

.time-slot-label {
  width: 80px;
  font-size: 0.875rem;
  color: #6c757d;
  text-align: right;
  padding-right: 1rem;
}

/* Appointment cards */
.appointment-card {
  border-left: 4px solid var(--fcdc-primary);
  transition: box-shadow 0.15s ease-in-out;
}

.appointment-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.appointment-card.no-show {
  border-left-color: #dc3545;
}

.appointment-card.absent {
  border-left-color: #ffc107;
}

.appointment-card.present {
  border-left-color: #198754;
}

/* Appointment slots in calendar */
.appointment-slot {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border-left: 3px solid var(--fcdc-primary);
  background-color: #f8f9fa;
  color: #212529;
  transition: background-color 0.15s ease-in-out;
}

.appointment-slot:hover {
  background-color: #e9ecef;
  color: #212529;
}

.appointment-slot.appointment-present {
  border-left-color: #198754;
  background-color: rgba(25, 135, 84, 0.1);
}

.appointment-slot.appointment-absent {
  border-left-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
}

.appointment-slot.appointment-rescheduled {
  border-left-color: #0dcaf0;
  background-color: rgba(13, 202, 240, 0.1);
}

.appointment-slot.appointment-pending {
  border-left-color: var(--fcdc-primary);
}

/* Attachment thumbnails */
.attachment-thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.15s ease-in-out;
}

.attachment-thumbnail:hover {
  transform: scale(1.05);
}

/* Sticky footer layout */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* Footer */
footer {
  border-top: 1px solid #dee2e6;
}

.footer-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

/* Utility classes */
.cursor-pointer {
  cursor: pointer;
}

.min-vh-50 {
  min-height: 50vh;
}

/* Print styles */
@media print {
  .navbar,
  footer,
  .btn,
  .no-print {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #dee2e6;
  }
}
