﻿.calendar {
    background-color: #fff;
    /*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);*/
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 3px;
    overflow: visible;
    -webkit-user-select: none; /* For Safari */
    -moz-user-select: none; /* For Mozilla Firefox */
    -ms-user-select: none; /* For Microsoft Edge */
    user-select: none; /* Standard */
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    background-color: #007bff;
    color: white;
}
    .calendar-header button {
        background: none;
        border: none;
        color: white;
        font-size: 18px;
        cursor: pointer;
        transition: color 0.2s ease-in-out;
    }

        .calendar-header button:hover {
            color: #f0f0f0;
        }

        .calendar-header button:active {
            transform: translateY(1px);
        }

.calendar-body-container {
    display: grid;
}

.calendar-body {
    padding: 5px;
    overflow: visible;
    background-color: transparent;
    border: none;
    border-radius: 3px;
    margin-top: -40px;
}

    .calendar-body.two-month {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

.calendar-weekdays, .calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-gap: 0px;
    transition: opacity 0.3s ease-in-out;
}

    .calendar-weekdays div, .calendar-dates div:not(.small-text):not(.info-tooltip) {
        text-align: center;
        transition: background-color 0.2s ease-in-out;
        border: none;
        cursor: pointer;
        font-size: 14px;
        position: relative;
    }

    .calendar-weekdays div {
        height: 30px;
        padding: 5px 0;
        font-weight: bold;
        color: #555;
    }

    .calendar-dates div:not(.small-text) {
        height: 50px;
    }

    .calendar-dates.small-text {
        height: 18px;
        padding: 0px;
        position: absolute;
        left: 0;
        right: 0;
        font-size: 11px !important;
        text-align: center;
    }

        .calendar-dates div.no-pointer {
            pointer-events: none;
            position: relative;
        }

    .calendar-dates div:hover:not(.selected):not(.small-text):not(.info-tooltip) {
        background-color: #f0f0f0;
    }

    .calendar-dates.fade-out {
        opacity: 0;
    }

.calendar-footer {
    text-align: center;
    background-color: #007bff;
}

select.month-year {
    appearance: none;
    background-color: transparent;
    border: none;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    padding: 5px;
    cursor: pointer;
}

    select.month-year:focus {
        outline: none;
    }

.month-year {
    border-bottom: 1px solid lightgray;
}

    .month-year option {
        color: #333;
        padding: 10px;
    }

#clear-selection {
    padding: 4px 8px;
    background-color: #a5b9c7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0.5rem;
    transition: background-color 0.3s ease;
}

    #clear-selection:hover {
        background-color: rgba(0,0,0,0.25);
    }

.calendar-dates .today {
    border: 1px solid blue;
    font-weight: bold;
}

.calendar-dates .selected {
    background-color: #4caf50;
    color: white;
}

.calendar-dates .first-selected {
    border-radius: 5px 0 0 5px;
}

.calendar-dates .last-selected {
    border-radius: 0 5px 5px 0;
}

.calendar-dates .range, .hover {
    background-color: #a5d6a7;
}

.calendar-dates .next-month, .calendar-dates .prev-month {
    color: rgba(0,0,0,0.65);
    visibility: hidden;
}

/*.calendar-dates .checkin-only, .calendar-dates .no-arrival {
    display: block;
    margin-top: 5px;
    padding: 1px 0;
    background-color: rgba(255, 255, 0, 0.3);
    border-radius: 5px;
}*/

.calendar-dates .disabled {
    /*pointer-events: none;*/
    background-color: rgba(0, 0, 0, 0.2);
}

.calendar-dates .disabled-past {
    pointer-events: none;
}

.calendar-dates .unavailable {
    pointer-events: none;
    color: rgba(0, 0, 0, 0.3);
}

.info-tooltip {
    display: none;
    position: absolute !important;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: rgba(0, 0, 0, 1);
    color: white;
    border-radius: 5px;
    padding: 5px 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 11;
    pointer-events: none;
}

.calendar-dates div:hover .info-tooltip,
.calendar-dates div.active .info-tooltip {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    height: auto;
    text-align: center;
    font-size: 0.7rem;
    padding: 5px 10px;
    box-shadow: 0 2px 2px rgba(0,0,0,0.1);
}

.empty-cell {
    visibility: hidden;
    pointer-events: none;
    background-color: transparent;
}

@media only screen and (min-width: 768px) {
    .calendar-body-container {
        grid-template-columns: 1fr 1fr;
    }

    .calendar, #calendarCase, #calendar {
        width: 560px !important;
    }

    .calendar-weekdays div, .calendar-dates div:not(.small-text) {
        padding: 1px;
    }
}

@media only screen and (max-width: 599px) {
    .calendar-body-container {
        grid-template-columns: 1fr;
    }

    .calendar {
        margin: 0 2px;
    }
}
