﻿/* Calendar Base Styles */
:root {
    /* Primary Colors */
    --color-navy: #2C3E50;
    --color-navy-light: #34495E;
    --color-brown: #6B4423;
    --color-brown-light: #A67B5B;
    /* Secondary Colors */
    --color-secondary: #4A4036;
    --color-background: #FDF8F3;
    --color-white: #FFFFFF;
    --color-light-gray: #F8F1EA;
    --color-brown-rgb: 142, 114, 86; /* RGB values for brown */
    --color-navy-rgb: 38, 52, 74; /* RGB values for navy */
    /* Shadows */
    --shadow-sm: 0 4px 15px rgba(44, 62, 80, 0.15);
    --shadow-md: 0 8px 25px rgba(44, 62, 80, 0.08);
    --shadow-lg: 0 12px 30px rgba(44, 62, 80, 0.12);
    --transition-default: all 0.4s ease;
}

.fc {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--color-background);
    max-width: 100%;
}

    /* Mobile Optimization */
    .fc .fc-toolbar {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    /* Position left & right toolbar chunks to the sides */
    .fc .fc-toolbar-chunk:first-child,
    .fc .fc-toolbar-chunk:last-child {
        flex: 0 0 auto;
        min-width: 80px;
        display: flex;
    }

    /* Center title area and give it most of the space */
    .fc .fc-toolbar-chunk:nth-child(2) {
        flex: 1 1 auto;
        text-align: center;
    }

    .fc .fc-toolbar-title {
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--color-navy);
    }

    .fc .fc-button {
        padding: 0.5rem 0.75rem;
        font-weight: 500;
        border-radius: 0.375rem;
        border: none;
        background: var(--color-light-gray);
        color: var(--color-navy);
        transition: var(--transition-default);
        font-size: 0.9rem;
    }

        .fc .fc-button:hover {
            background: var(--color-navy-light);
            color: var(--color-white);
        }

    .fc .fc-button-primary {
        background: var(--color-navy);
        color: var(--color-white);
    }

        .fc .fc-button-primary:hover {
            background: var(--color-navy-light);
        }

    /* Highlight today's cell */
    .fc .fc-day-today {
        background: rgba(var(--color-navy-rgb), 0.05) !important;
        border: 2px solid var(--color-navy);
        border-radius: 6px;
    }

/* Remove the default day number */
.fc-daygrid-day-number {
    visibility: hidden;
    position: absolute;
}

/* Hide "more" links completely */
.fc-daygrid-more-link {
    display: none !important;
}

/* Custom day cell styling */
.fc-daygrid-day {
    position: relative;
    cursor: pointer;
    min-height: 40px;
    transition: all 0.2s ease;
}

/* Date centering container */
.date-center-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Make sure clicks go through to cell */
}

/* Custom date number styling */
.calendar-date-number {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    pointer-events: auto; /* Restore pointer events */
}

/* Available day styling */
.calendar-available-day {
    background-color: rgba(16, 185, 129, 0.1) !important;
}

.available-date {
    background-color: #10B981;
    color: white;
}

/* Booked day styling */
.calendar-booked-day {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

.booked-date {
    background-color: #EF4444;
    color: white;
    position: relative;
}

/* Past date styling */
.past-date-cell {
    background-color: rgba(239, 68, 68, 0.05) !important;
    cursor: not-allowed !important;
}

.past-date {
    background-color: rgba(239, 68, 68, 0.6);
    color: white;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
    opacity: 0.7;
}

/* Strike-through line for booked dates */
.strike-through {
    position: absolute;
    width: 140%;
    height: 2px;
    background-color: #000;
    top: 50%;
    left: -20%;
    transform: rotate(-45deg);
}

/* Hide FC event display */
.fc-daygrid-event-harness {
    display: none;
}

/* Modal styling */
.event-modal-content {
    padding: 1rem;
    background: var(--color-white);
    color: var(--color-navy);
    text-align: center;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    color: var(--color-white);
    font-weight: 500;
    margin-bottom: 1rem;
}

.event-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

    .event-actions .btn {
        padding: 0.5rem 1rem;
        border-radius: 0.375rem;
        font-weight: 500;
        text-decoration: none;
    }

/* Responsive adjustments */
@media (max-width: 767px) {
    .fc .fc-toolbar {
        flex-wrap: nowrap;
        margin-bottom: 0.75rem;
    }

    .fc .fc-toolbar-chunk:first-child,
    .fc .fc-toolbar-chunk:last-child {
        min-width: 60px;
    }

        .fc .fc-toolbar-chunk:first-child .fc-button,
        .fc .fc-toolbar-chunk:last-child .fc-button {
            padding: 0.4rem 0.5rem;
            font-size: 0.8rem;
            min-width: 40px;
        }

    .fc .fc-toolbar-title {
        font-size: 1.1rem;
        text-align: center;
    }

    .fc .fc-button {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .fc-col-header-cell-cushion {
        font-size: 0.8rem;
        padding: 4px;
    }

    .calendar-date-number {
        font-size: 0.9rem;
        width: 24px;
        height: 24px;
    }

    .fc-daygrid-day {
        min-height: 35px;
    }

    /* days more compact on mobile */
    .fc td, .fc th {
        padding: 1px !important;
    }

    .event-modal-content {
        padding: 0.75rem;
    }

    .event-actions {
        flex-direction: column;
    }

        .event-actions .btn {
            width: 100%;
            text-align: center;
        }
}

/* Extra small screens */
@media (max-width: 480px) {
    .fc .fc-toolbar {
        margin-bottom: 0.5rem;
    }

    .fc .fc-toolbar-chunk:first-child,
    .fc .fc-toolbar-chunk:last-child {
        min-width: 50px;
    }

    .fc .fc-toolbar-title {
        font-size: 1rem;
    }

    .fc .fc-button {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
        min-width: 40px;
    }

    .calendar-date-number {
        font-size: 0.8rem;
        width: 20px;
        height: 20px;
    }

    .fc-col-header-cell-cushion {
        font-size: 0.7rem;
        padding: 2px;
    }
}
