/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Flatpickr Custom Styles */
.flatpickr-calendar {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  border: none;
  width: 320px !important;
  margin: 0 auto;
}

.flatpickr-months {
  padding: 16px;
  background: white;
  border-bottom: 1px solid #f3f4f6;
}

.flatpickr-current-month {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  padding: 0;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  padding: 8px;
  fill: #6b7280;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  fill: #111827;
}

.flatpickr-weekdays {
  background: white;
  padding: 8px 16px 0;
}

.flatpickr-weekday {
  color: #9ca3af;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.flatpickr-days {
  padding: 8px 16px 16px;
}

.flatpickr-day {
  border-radius: 50%;
  color: #111827;
  font-weight: 500;
  height: 40px;
  line-height: 40px;
  width: 40px;
  margin: 2px;
}

.flatpickr-day:hover {
  background: #f3f4f6;
  border-color: #f3f4f6;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: white;
}

.flatpickr-day.today {
  border-color: #dc2626;
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
  color: #d1d5db;
  cursor: not-allowed;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #d1d5db;
}

/* Kaminari Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 30px 0;
  flex-wrap: wrap;
  padding: 0 15px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.pagination a, 
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #AD0026;
  text-decoration: none;
  transition: all 0.2s ease;
  background: white;
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Hover State */
.pagination a:hover {
  background-color: #FFF5F7;
  color: #8A001F;
  border-color: #FFE4E9;
  transform: translateY(-1px);
}

/* Current Page */
.pagination .current {
  background-color: #AD0026;
  color: white;
  font-weight: 600;
  border-color: #AD0026;
  box-shadow: 0 1px 3px rgba(173, 0, 38, 0.3);
}

/* Disabled State */
.pagination .disabled {
  color: #D1D5DB;
  background-color: #F9FAFB;
  border-color: #E5E7EB;
  pointer-events: none;
  opacity: 0.7;
}

/* Gap between page numbers */
.pagination .gap {
  display: inline-flex;
  align-items: flex-end;
  padding-bottom: 8px;
  color: #9CA3AF;
  pointer-events: none;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* Previous/Next Buttons */
.pagination .prev,
.pagination .next {
  background-color: white;
  border: 1px solid #E5E7EB;
  color: #4B5563;
  font-weight: 600;
}

.pagination .prev:hover,
.pagination .next:hover {
  background-color: #F3F4F6;
  border-color: #D1D5DB;
  color: #1F2937;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .pagination {
    gap: 4px;
  }
  
  .pagination a, 
  .pagination span {
    min-width: 36px;
    height: 36px;
    font-size: 14px;
    padding: 0 8px;
  }
}

/* Modal overlay */
.flatpickr-calendar.open {
  z-index: 9999;
}

.flatpickr-calendar::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* Turbo Progress Bar Styling */
/* Customize the progress bar to match brand colors */
.turbo-progress-bar {
  height: 3px;
  background-color: #dc2626; /* Brand primary color (red) */
}

/* Optional: Add a subtle shadow for better visibility */
.turbo-progress-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(220, 38, 38, 0.4), transparent);
}

/* Pagination Hidden States */
.hidden-by-pagination {
  display: none !important;
}

.hidden-by-filter {
  display: none !important;
}

.hidden-by-search {
  display: none !important;
}
