/*
 * Butterfly calendar visibility
 */

.bi-checkout-calendar {
    display: block;
}

.bi-checkout-calendar.bi-calendar-hidden {
    display: none;
}


/*
 * Delivery Date field.
 */

#order-butterfly-delivery-date {
    cursor: pointer;
}


/*
 * Calendar.
 */

.bi-checkout-calendar {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}


/*
 * Calendar header.
 */

.bi-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.bi-calendar-header strong {
    font-size: 16px;
}

.bi-calendar-header button {
    width: 84px;
    height: 35px;
    border: 0;
    border-radius: 2px;
    background: #526fa3;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
}

.bi-calendar-header button:hover {
    opacity: .9;
}


/*
 * Weekdays / days.
 */

.bi-calendar-weekdays,
.bi-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.bi-calendar-weekdays {
    margin-bottom: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
}


/*
 * Date.
 */

.bi-calendar-day {
    min-height: 60px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #000;
    color: #fff;
    cursor: pointer;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 5px;
}

.bi-calendar-day:hover:not(:disabled) {
    border-color: #000;
}

.bi-calendar-day.bi-selected {
    border: 2px solid #cd4532;
    background: #cd4532;
    border-color: #cd4532 !important;
}

.bi-calendar-day.bi-held {
    border-color: #555;
}

.bi-calendar-day.bi-disabled {
    opacity: .4;
    cursor: not-allowed;
}

.bi-calendar-day.bi-event-blocked {
    opacity: .35;
}

.bi-day-number {
    font-size: 14px;
    font-weight: 600;
}

.bi-day-availability {
    margin-top: 4px;
    font-size: 11px;
}

.bi-day-status {
    font-size: 9px;
    margin-top: 2px;
}

.bi-calendar-empty {
    min-height: 60px;
}


/*
 * Messages.
 */

#bi-reservation-message {
    display: none;
}

.bi-calendar-legend {
    margin-top: 15px;
    font-size: 13px;
    line-height: 100%;
}

.bi-selected-date,
.bi-reservation-message {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
    background: #f5f5f5;
    font-size: 13px;
    line-height: 100%;
}

.bi-calendar-error {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
    background: #fff0f0;
    color: #b00000;
    font-size: 13px;
}

.bi-calendar-loading {
    padding: 15px 0;
    text-align: center;
}


/*
 * Mobile.
 */

@media (max-width: 600px) {

    .bi-checkout-calendar {
        padding: 10px;
    }

    .bi-calendar-header {
        margin-bottom: 12px;
    }

    .bi-calendar-header button {
        width: 70px;
        height: 35px;
    }

    .bi-calendar-header strong {
        font-size: 15px;
    }

    .bi-calendar-weekdays,
    .bi-calendar-days {
        gap: 3px;
    }

    .bi-calendar-day {
        min-height: 50px;
    }

    .bi-calendar-empty {
        min-height: 50px;
    }

    .bi-day-number {
        font-size: 13px;
    }

    .bi-day-availability {
        font-size: 10px;
    }
}