/**
 * Upcoming Bookings widget.
 * Base presentation is intentionally low-specificity so Elementor's
 * generated Style-tab CSS can override colours, typography, borders, etc.
 */

:where(.gw-upcoming-bookings) {
    box-sizing: border-box;
}

:where(.gw-upcoming-bookings) *,
:where(.gw-upcoming-bookings) *::before,
:where(.gw-upcoming-bookings) *::after {
    box-sizing: border-box;
}

:where(.gw-upcoming-bookings) .gw-ub__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #1d2b22;
}

:where(.gw-upcoming-bookings) .gw-ub__heading-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #e4f3e8;
    color: #238443;
    font-size: 15px;
}

:where(.gw-upcoming-bookings) .gw-ub__heading-icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

/* List/grid -------------------------------------------------------------- */
:where(.gw-upcoming-bookings) .gw-ub__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

:where(.gw-upcoming-bookings--grid) .gw-ub__list {
    display: grid;
}

/* Card ------------------------------------------------------------------- */
:where(.gw-upcoming-bookings) .gw-ub__item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    width: 100%;
    min-width: 0;
    padding: 17px 18px 17px 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow:
        0 1px 2px rgba(30, 45, 35, .05),
        0 4px 14px rgba(30, 45, 35, .06);
    transition: transform .15s ease, box-shadow .15s ease;
}

:where(.gw-upcoming-bookings) .gw-ub__item::before {
    content: '';
    position: absolute;
    top: -1px;
    bottom: -1px;
    left: -1px;
    width: 4px;
    border-radius: 14px 0 0 14px;
    background: #d9d9d9;
    pointer-events: none;
}

:where(.gw-upcoming-bookings) .gw-ub__item:hover {
    transform: translateY(-1px);
    box-shadow:
        0 2px 4px rgba(30, 45, 35, .06),
        0 8px 20px rgba(30, 45, 35, .09);
}

/* Counterpart ------------------------------------------------------------ */
:where(.gw-upcoming-bookings) .gw-ub__card-main {
    min-width: 0;
}

:where(.gw-upcoming-bookings) .gw-ub__row--person {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

:where(.gw-upcoming-bookings) .gw-ub__person-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

:where(.gw-upcoming-bookings) .gw-ub__person {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #1d2b22;
    text-decoration: none;
}

:where(.gw-upcoming-bookings) .gw-ub__person-role {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #6b776f;
}

/* Dates and duration ----------------------------------------------------- */
:where(.gw-upcoming-bookings) .gw-ub__row--date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-top: 13px;
}

:where(.gw-upcoming-bookings) .gw-ub__date,
:where(.gw-upcoming-bookings) .gw-ub__duration {
    display: block;
    width: 100%;
}

:where(.gw-upcoming-bookings) .gw-ub__date {
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
    color: #34423a;
}

:where(.gw-upcoming-bookings) .gw-ub__duration {
    font-size: 12px;
    line-height: 1.35;
    color: #8a948e;
}

/* Side rail -------------------------------------------------------------- */
:where(.gw-upcoming-bookings) .gw-ub__row--side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    min-width: max-content;
}

:where(.gw-upcoming-bookings) .gw-ub__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

:where(.gw-upcoming-bookings) .gw-ub__status-dot {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

:where(.gw-upcoming-bookings) .gw-ub__arrow {
    color: #a3aca6;
    font-size: 20px;
    line-height: 1;
}

/* Status colours: match the full bookings page. ------------------------- */
:where(.gw-upcoming-bookings) .gw-ub__item--pending-host::before {
    background: #F59E0B;
}

:where(.gw-upcoming-bookings) .gw-ub__item--pending-wwoofer::before {
    background: #8B5CF6;
}

:where(.gw-upcoming-bookings) .gw-ub__item--accepted::before {
    background: #10B981;
}

:where(.gw-upcoming-bookings) .gw-ub__item--inprogress::before {
    background: #3B82F6;
}

:where(.gw-upcoming-bookings) .gw-ub__status--pending-host {
    color: #F59E0B;
    background-color: #FFF7E6;
}

:where(.gw-upcoming-bookings) .gw-ub__status--pending-wwoofer {
    color: #8B5CF6;
    background-color: #F3EEFF;
}

:where(.gw-upcoming-bookings) .gw-ub__status--accepted {
    color: #10B981;
    background-color: #EAFBF4;
}

:where(.gw-upcoming-bookings) .gw-ub__status--inprogress {
    color: #3B82F6;
    background-color: #EEF5FF;
}

:where(.gw-upcoming-bookings) .gw-ub__empty {
    margin: 0;
}

:where(.gw-upcoming-bookings--grid) .gw-ub__item {
    align-content: start;
}
