/* Trips / Events switch */
.turie-event-wrap {
    width: 100%;
    margin-bottom: 30px;
}

.turie-event-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 50px;
    background: var(--tp-grey-3, #f7f9f9);
    border: 1px solid #e6ebeb;
}

.turie-event-switch__btn {
    padding: 8px 24px;
    border: 0;
    border-radius: 50px;
    background: transparent;
    color: var(--tp-common-black, #071516);
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.turie-event-switch__btn.is-active {
    background: var(--tp-theme-1, #FD4621);
    color: var(--tp-common-white, #fff);
}

/* Trips list hidden while the calendar is shown */
.turie-trips-hidden {
    display: none !important;
}

/* Calendar */
.turie-event-calendar {
    position: relative;
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #e6ebeb;
    border-radius: 12px;
    background: var(--tp-common-white, #fff);
}

.turie-event-calendar.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .6);
    z-index: 5;
}

.turie-event-calendar .fc {
    --fc-button-bg-color: var(--tp-theme-1, #FD4621);
    --fc-button-border-color: var(--tp-theme-1, #FD4621);
    --fc-button-hover-bg-color: var(--tp-common-black, #071516);
    --fc-button-hover-border-color: var(--tp-common-black, #071516);
    --fc-button-active-bg-color: var(--tp-common-black, #071516);
    --fc-button-active-border-color: var(--tp-common-black, #071516);
    --fc-today-bg-color: rgba(253, 70, 33, .08);
    --fc-border-color: #e6ebeb;
    --fc-event-bg-color: var(--tp-theme-1, #FD4621);
    --fc-event-border-color: var(--tp-theme-1, #FD4621);
}

.turie-event-calendar .fc .fc-toolbar-title {
    font-size: 22px;
}

.turie-event-calendar .fc .fc-button {
    text-transform: capitalize;
    box-shadow: none;
}

.turie-event-calendar .fc .fc-button:disabled {
    opacity: .5;
}

.turie-event-calendar .fc .fc-event {
    cursor: pointer;
}

.turie-event-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 1px 4px;
    overflow: hidden;
}

/* Expired events: muted, still clickable */
.turie-event-calendar .fc .fc-event.is-expired {
    --fc-event-bg-color: #a29f9f;
    --fc-event-border-color: #a29f9f;
    opacity: .75;
}

.turie-event-calendar .fc .fc-event.is-expired .turie-event-title > span:first-child {
    text-decoration: line-through;
}

.turie-event-badge {
    padding: 0 6px;
    border-radius: 4px;
    background: var(--tp-common-red, #E52700);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-transform: uppercase;
}

/* List view (mobile) shows the title in a link on a white row */
.turie-event-calendar .fc .fc-list-event.is-expired .turie-event-title {
    color: var(--tp-grey-2, #a29f9f);
}

@media (max-width: 767px) {
    .turie-event-calendar {
        padding: 12px;
    }

    .turie-event-calendar .fc .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .turie-event-calendar .fc .fc-toolbar-title {
        font-size: 18px;
    }
}
