/*
 * FullCalendar theme — Filament/Tailwind palette
 * Replaces Bootstrap-style defaults with tokens that match the app's design system.
 * Shared by WorkCalendar and LoanerCalendar pages.
 */

/* ------------------------------------------------------------------ */
/*  Alpine x-cloak                                                      */
/* ------------------------------------------------------------------ */
[x-cloak] {
    display: none !important;
}

/* ------------------------------------------------------------------ */
/*  FullCalendar design tokens — light mode                             */
/* ------------------------------------------------------------------ */
.fc {
    --fc-border-color:              #e5e7eb; /* gray-200 */
    --fc-page-bg-color:             transparent;
    --fc-neutral-bg-color:          #f9fafb; /* gray-50 */
    --fc-neutral-text-color:        #6b7280; /* gray-500 */
    --fc-today-bg-color:            #eff6ff; /* blue-50 */
    --fc-non-business-color:        rgba(0, 0, 0, 0.04);
    --fc-highlight-color:           rgba(59, 130, 246, 0.1);

    /* Toolbar buttons — match Filament secondary button */
    --fc-button-bg-color:           #ffffff;
    --fc-button-border-color:       #d1d5db; /* gray-300 */
    --fc-button-text-color:         #374151; /* gray-700 */
    --fc-button-hover-bg-color:     #f3f4f6; /* gray-100 */
    --fc-button-hover-border-color: #9ca3af; /* gray-400 */
    --fc-button-active-bg-color:    #e0f2fe; /* sky-100 */
    --fc-button-active-border-color:#0284c7; /* sky-600 */

    /* Event tiles */
    --fc-event-bg-color:            #3b82f6; /* blue-500 */
    --fc-event-border-color:        #2563eb; /* blue-600 */
    --fc-event-text-color:          #ffffff;

    /* Inherit Filament's font stack */
    font-family: inherit;
}

/* ------------------------------------------------------------------ */
/*  FullCalendar design tokens — dark mode                              */
/* ------------------------------------------------------------------ */
.dark .fc {
    --fc-border-color:              #374151; /* gray-700 */
    --fc-page-bg-color:             transparent;
    --fc-neutral-bg-color:          #1f2937; /* gray-800 */
    --fc-neutral-text-color:        #9ca3af; /* gray-400 */
    --fc-today-bg-color:            rgba(30, 64, 175, 0.15); /* blue-800 tint */
    --fc-non-business-color:        rgba(0, 0, 0, 0.20);
    --fc-highlight-color:           rgba(59, 130, 246, 0.15);

    --fc-button-bg-color:           #1f2937; /* gray-800 */
    --fc-button-border-color:       #4b5563; /* gray-600 */
    --fc-button-text-color:         #d1d5db; /* gray-300 */
    --fc-button-hover-bg-color:     #374151; /* gray-700 */
    --fc-button-hover-border-color: #6b7280; /* gray-500 */
    --fc-button-active-bg-color:    #0c4a6e; /* sky-900 */
    --fc-button-active-border-color:#0284c7;
}

/* ------------------------------------------------------------------ */
/*  Buttons — rounded corners to match Filament                         */
/* ------------------------------------------------------------------ */
.fc .fc-button {
    border-radius: 0.5rem; /* rounded-lg */
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    box-shadow: none;
}

.fc .fc-button:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.fc .fc-button-group .fc-button {
    border-radius: 0;
}

.fc .fc-button-group .fc-button:first-child {
    border-radius: 0.5rem 0 0 0.5rem;
}

.fc .fc-button-group .fc-button:last-child {
    border-radius: 0 0.5rem 0.5rem 0;
}

/* ------------------------------------------------------------------ */
/*  Loaner vehicle column headers                                        */
/* ------------------------------------------------------------------ */
.fc-resource-label--loaner {
    color: #0284c7; /* sky-600 */
    font-style: italic;
}

.dark .fc-resource-label--loaner {
    color: #38bdf8; /* sky-400 */
}

/* ------------------------------------------------------------------ */
/*  Toggle Spare Cars custom toolbar button                              */
/* ------------------------------------------------------------------ */
.fc-toggleLoaners-button {
    background-color: #e0f2fe !important; /* sky-100 */
    border-color:     #0284c7 !important; /* sky-600 */
    color:            #075985 !important; /* sky-800 */
    font-size:        0.8rem  !important;
}

.fc-toggleLoaners-button:hover {
    background-color: #bae6fd !important; /* sky-200 */
}

.dark .fc-toggleLoaners-button {
    background-color: #0c4a6e !important; /* sky-900 */
    border-color:     #0284c7 !important;
    color:            #bae6fd !important; /* sky-200 */
}

.dark .fc-toggleLoaners-button:hover {
    background-color: #075985 !important; /* sky-800 */
}
