.nest-tt-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.nest-tt-filter {
    display: flex;
    flex-direction: column;
    position: relative; /* needed for ::after arrow positioning */
    --nest-tt-arrow-color: #cc0033; /* overridden by Elementor filter_border_color control */
}

.nest-tt-filter select {
    padding: 8px 36px 8px 12px;
    font-size: 0.9rem;
    border: 2px solid #cc0033;  /* overridden by Elementor colour control */
    border-radius: 4px;
    background-color: #ffffff;
    color: #333333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: none; /* arrow handled by ::after below */
    min-width: 160px;
}

.nest-tt-filter select:focus {
    outline: 2px solid #cc0033; /* overridden by Elementor colour control */
    outline-offset: 2px;
}

/* CSS chevron arrow — colour driven by --nest-tt-arrow-color custom property
   set on .nest-tt-filter via the Elementor filter_border_color selector */
.nest-tt-filter::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--nest-tt-arrow-color, #cc0033);
    border-bottom: 2px solid var(--nest-tt-arrow-color, #cc0033);
    pointer-events: none;
    margin-top: -2px; /* nudge to visually centre the rotated square */
}

/* ─── Re-stripe after JS filtering ──────────────────────────────────────────── */

.nest-tt tbody tr.nest-tt-row-odd  { background-color: #f9f9f9; }
.nest-tt tbody tr.nest-tt-row-even { background-color: #ffffff; }

/* ─── No results message ─────────────────────────────────────────────────────── */

.nest-tt-no-results {
    padding: 1rem;
    background: #fff8f0;
    border-left: 4px solid #cc0033;
    color: #555555;
    font-size: 0.9rem;
    border-radius: 2px;
    margin-top: 8px;
}

/* ─── Responsive filter bar ──────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .nest-tt-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .nest-tt-filter select {
        width: 100%;
    }
}

/* ─── Table ───────────────────────────────────────────────────────────────────── */

.nest-tt-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nest-tt-heading {
    margin-bottom: 1rem;
}

.nest-tt {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Header */
.nest-tt thead th {
    background-color: #cc0033; /* overridden by Elementor colour control */
    color: #ffffff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    border: none;
}

/* Body rows */
.nest-tt tbody tr {
    border-bottom: 1px solid #e2e2e2;
    transition: background-color 0.15s ease;
}

.nest-tt tbody tr:nth-child(odd) {
    background-color: #f9f9f9; /* overridden by Elementor colour control */
}

.nest-tt tbody tr:hover {
    background-color: #fff3f5;
}

.nest-tt tbody td {
    padding: 10px 14px;
    vertical-align: middle;
    color: #333333;
}

/* Book cell – right-align the button */
.nest-tt-book-cell {
    text-align: right;
    white-space: nowrap;
}

/* Book button */
.nest-tt-book-btn {
    display: inline-block;
    padding: 7px 18px;
    background-color: #cc0033; /* overridden by Elementor colour control */
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.nest-tt-book-btn:hover,
.nest-tt-book-btn:focus {
    background-color: #990025; /* overridden by Elementor hover colour control */
    color: #ffffff;
    text-decoration: none;
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.nest-tt-book-btn:focus-visible {
    outline: 2px solid #cc0033;
    outline-offset: 2px;
}

/* Enquire button (BookingType 1) and paid trial button (BookingType 3)
   colours are set via Elementor Style → Button Variants controls.
   Fallback defaults match the original values — no !important so Elementor selectors win. */
.nest-tt-enquire-btn { background-color: #7a2d82; }
.nest-tt-enquire-btn:hover,
.nest-tt-enquire-btn:focus { background-color: #5c2162; }

.nest-tt-paid-btn { background-color: #c07000; }
.nest-tt-paid-btn:hover,
.nest-tt-paid-btn:focus { background-color: #995800; }
.nest-tt-error,
.nest-tt-empty {
    padding: 1rem;
    background: #fff8f0;
    border-left: 4px solid #cc0033;
    color: #555555;
    font-size: 0.9rem;
    border-radius: 2px;
}

/* ─── Responsive (card layout below 640 px) ─────────────────────────────────── */

@media (max-width: 640px) {

    .nest-tt thead {
        /* Hide column headers; labels come from data-label attributes */
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0,0,0,0);
        white-space: nowrap;
        border: 0;
    }

    .nest-tt tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e2e2e2;
        border-radius: 4px;
        overflow: hidden;
        background: #ffffff;
    }

    .nest-tt tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 14px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.875rem;
    }

    .nest-tt tbody td:last-child {
        border-bottom: none;
    }

    /* Show the column label before each cell value */
    .nest-tt tbody td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666666;
        flex-shrink: 0;
        margin-right: 1rem;
    }

    .nest-tt-book-cell {
        justify-content: flex-end;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .nest-tt-book-btn {
        width: 100%;
        text-align: center;
    }
}
