/* ========================================
   Design Tokens - CSS Custom Properties
   Customize these variables to match your site's theme
   ======================================== */

:root {
    /* ===== Brand Colors ===== */
    --tp-rb-color-primary: #1976d2;
    --tp-rb-color-primary-dark: #0f4aa3;
    --tp-rb-color-primary-light: #42a5f5;
    --tp-rb-color-secondary: #2e7d32;
    --tp-rb-color-accent: #ff9800;
    
    /* ===== Status Colors ===== */
    --tp-rb-color-success: #4caf50;
    --tp-rb-color-success-bg: #e8f5e9;
    --tp-rb-color-success-text: #155724;
    --tp-rb-color-success-border: #c3e6cb;
    --tp-rb-color-warning: #ff9800;
    --tp-rb-color-warning-bg: #ffe0b2;
    --tp-rb-color-error: #d32f2f;
    --tp-rb-color-error-bg: #ffcdd2;
    --tp-rb-color-error-text: #721c24;
    --tp-rb-color-error-border: #f5c6cb;
    --tp-rb-color-info: #1976d2;
    --tp-rb-color-info-bg: #e3f2fd;
    
    /* ===== Neutral Colors ===== */
    --tp-rb-color-white: #ffffff;
    --tp-rb-color-black: #000000;
    --tp-rb-color-gray-50: #fafafa;
    --tp-rb-color-gray-100: #f5f5f5;
    --tp-rb-color-gray-200: #e0e0e0;
    --tp-rb-color-gray-300: #bdbdbd;
    --tp-rb-color-gray-400: #9e9e9e;
    --tp-rb-color-gray-500: #757575;
    --tp-rb-color-gray-600: #555555;
    --tp-rb-color-gray-700: #424242;
    --tp-rb-color-gray-800: #333333;
    --tp-rb-color-gray-900: #1f2937;
    
    /* ===== Text Colors ===== */
    --tp-rb-color-text-primary: #1f2937;
    --tp-rb-color-text-secondary: #555555;
    --tp-rb-color-text-muted: #757575;
    --tp-rb-color-text-inverse: #ffffff;
    
    /* ===== Background Colors ===== */
    --tp-rb-color-bg-primary: #ffffff;
    --tp-rb-color-bg-secondary: #f5f5f5;
    --tp-rb-color-bg-muted: #fafafa;
    
    /* ===== Border Colors ===== */
    --tp-rb-color-border: #e0e0e0;
    --tp-rb-color-border-light: #f0f0f0;
    --tp-rb-color-border-dark: #bdbdbd;
    
    /* ===== Link Colors ===== */
    --tp-rb-color-link: #1976d2;
    --tp-rb-color-link-hover: #0f4aa3;
    --tp-rb-color-link-visited: #7b1fa2;
    
    /* ===== Button Colors ===== */
    --tp-rb-button-bg-primary: #1976d2;
    --tp-rb-button-bg-primary-hover: #155a9c;
    --tp-rb-button-text-primary: #ffffff;
    --tp-rb-button-gradient-start: #1976d2;
    --tp-rb-button-gradient-end: #42a5f5;
    --tp-rb-button-gradient-hover-start: #155a9c;
    --tp-rb-button-gradient-hover-end: #1e6fb3;
    
    /* ===== Typography ===== */
    --tp-rb-font-family: inherit;
    --tp-rb-font-size-xs: 0.75rem;      /* 12px */
    --tp-rb-font-size-sm: 0.875rem;     /* 14px */
    --tp-rb-font-size-base: 1rem;       /* 16px */
    --tp-rb-font-size-md: 1.05rem;      /* 17px */
    --tp-rb-font-size-lg: 1.1rem;       /* 18px */
    --tp-rb-font-size-xl: 1.25rem;      /* 20px */
    --tp-rb-font-size-2xl: 1.5rem;      /* 24px */
    --tp-rb-font-size-3xl: 1.75rem;     /* 28px */
    --tp-rb-font-size-4xl: 2rem;        /* 32px */
    --tp-rb-font-weight-normal: 400;
    --tp-rb-font-weight-medium: 500;
    --tp-rb-font-weight-semibold: 600;
    --tp-rb-font-weight-bold: 700;
    --tp-rb-line-height-tight: 1.2;
    --tp-rb-line-height-snug: 1.375;
    --tp-rb-line-height-normal: 1.5;
    --tp-rb-line-height-relaxed: 1.625;
    --tp-rb-line-height-loose: 1.75;
    
    /* ===== Spacing ===== */
    --tp-rb-space-0: 0;
    --tp-rb-space-1: 0.25rem;   /* 4px */
    --tp-rb-space-2: 0.5rem;    /* 8px */
    --tp-rb-space-3: 0.75rem;   /* 12px */
    --tp-rb-space-4: 1rem;      /* 16px */
    --tp-rb-space-5: 1.25rem;   /* 20px */
    --tp-rb-space-6: 1.5rem;    /* 24px */
    --tp-rb-space-7: 1.75rem;   /* 28px */
    --tp-rb-space-8: 2rem;      /* 32px */
    --tp-rb-space-10: 2.5rem;   /* 40px */
    --tp-rb-space-12: 3rem;     /* 48px */
    
    /* ===== Border Radius ===== */
    --tp-rb-radius-sm: 0.25rem;   /* 4px */
    --tp-rb-radius-base: 0.35rem; /* 6px */
    --tp-rb-radius-md: 0.5rem;    /* 8px */
    --tp-rb-radius-lg: 0.75rem;   /* 12px */
    --tp-rb-radius-xl: 1rem;      /* 16px */
    --tp-rb-radius-full: 999px;
    
    /* ===== Shadows ===== */
    --tp-rb-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --tp-rb-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --tp-rb-shadow-base: 0 2px 6px rgba(0, 0, 0, 0.08);
    --tp-rb-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --tp-rb-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
    --tp-rb-shadow-xl: 0 6px 16px rgba(0, 0, 0, 0.1);
    --tp-rb-shadow-button: 0 4px 12px rgba(25, 118, 210, 0.25);
    --tp-rb-shadow-button-hover: 0 6px 14px rgba(25, 118, 210, 0.35);
    
    /* ===== Transitions ===== */
    --tp-rb-transition-fast: 0.15s ease;
    --tp-rb-transition-base: 0.2s ease;
    --tp-rb-transition-slow: 0.3s ease;
    
    /* ===== Booking Status Colors ===== */
    --tp-rb-status-confirmed: #4caf50;
    --tp-rb-status-confirmed-bg: #e8f5e9;
    --tp-rb-status-provisional: #ff9800;
    --tp-rb-status-provisional-bg: #ffe0b2;
    --tp-rb-status-pending: #f59e0b;
    --tp-rb-status-pending-bg: #ffecb5;
    --tp-rb-status-booked: #e53935;
    --tp-rb-status-booked-bg: #ffcdd2;
    --tp-rb-status-buffer: #9e9e9e;
    --tp-rb-status-buffer-bg: #e0e0e0;
    --tp-rb-status-blackout: #90a4ae;
    --tp-rb-status-blackout-bg: #b0bec5;
    --tp-rb-status-selected: #1976d2;
    --tp-rb-status-selected-bg: #bbdefb;
    
    /* ===== Component Specific (Legacy - for backward compatibility) ===== */
    --tp-rb-event-detail-background: var(--tp-rb-color-bg-primary);
    --tp-rb-event-detail-text: var(--tp-rb-color-text-primary);
    --tp-rb-event-detail-meta: var(--tp-rb-color-text-secondary);
    --tp-rb-event-detail-link: var(--tp-rb-color-link);
    --tp-rb-event-detail-link-hover: var(--tp-rb-color-link-hover);
    --tp-rb-event-detail-price: var(--tp-rb-color-secondary);
    --tp-rb-event-detail-button-start: var(--tp-rb-button-gradient-start);
    --tp-rb-event-detail-button-end: var(--tp-rb-button-gradient-end);
    --tp-rb-event-detail-button-text: var(--tp-rb-button-text-primary);
    --tp-rb-event-detail-button-hover-start: var(--tp-rb-button-gradient-hover-start);
    --tp-rb-event-detail-button-hover-end: var(--tp-rb-button-gradient-hover-end);
    --tp-rb-event-detail-button-shadow: var(--tp-rb-shadow-button);
    --tp-rb-event-detail-button-hover-shadow: var(--tp-rb-shadow-button-hover);
    
    /* ===== Simple Events Layout ===== */
    --tp-rb-events-simple-background: var(--tp-rb-color-bg-primary);
    --tp-rb-events-simple-border: var(--tp-rb-color-border);
    --tp-rb-events-simple-text: var(--tp-rb-color-text-primary);
    --tp-rb-events-simple-meta: var(--tp-rb-color-text-secondary);
    --tp-rb-events-simple-link: var(--tp-rb-color-link);
    --tp-rb-events-simple-link-hover: var(--tp-rb-color-link-hover);
    --tp-rb-events-simple-price: var(--tp-rb-color-secondary);
}

/* ========================================
   Base Styles
   ======================================== */

.tp-rb {
    font-family: var(--tp-rb-font-family);
    margin-bottom: var(--tp-rb-space-8);
    background: var(--tp-rb-color-white);
    color: var(--tp-rb-color-text-primary);
    padding: var(--tp-rb-space-6);
    border-radius: var(--tp-rb-radius-md);
    box-shadow: var(--tp-rb-shadow-lg);
}

/* ========================================
   Calendar Component
   ======================================== */

.tp-rb-calendar {
    margin-bottom: var(--tp-rb-space-8);
}

.tp-rb-calendar__header {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tp-rb-space-6);
    align-items: flex-start;
    margin-bottom: var(--tp-rb-space-6);
}

.tp-rb-calendar__rates {
    background: var(--tp-rb-color-bg-muted);
    border: 1px solid var(--tp-rb-color-border);
    border-radius: var(--tp-rb-radius-md);
    margin-bottom: 0;
    padding: var(--tp-rb-space-4);
}

.tp-rb-calendar__rates-title {
    font-size: var(--tp-rb-font-size-md);
    font-weight: var(--tp-rb-font-weight-bold);
    margin: 0 0 var(--tp-rb-space-2);
}

.tp-rb-calendar__rates-content {
    overflow-x: auto;
}

.tp-rb-calendar__rates-table {
    border-collapse: collapse;
    min-width: 280px;
    width: 100%;
    font-size: var(--tp-rb-font-size-sm);
}

.tp-rb-calendar__rates-table th,
.tp-rb-calendar__rates-table td {
    border: 1px solid var(--tp-rb-color-border);
    padding: var(--tp-rb-space-2) var(--tp-rb-space-3);
    text-align: left;
    vertical-align: middle;
}

.tp-rb-calendar__rates-table thead th {
    background: var(--tp-rb-color-gray-100);
    font-weight: var(--tp-rb-font-weight-semibold);
}

.tp-rb-calendar__rates-empty {
    margin: 0;
    font-size: var(--tp-rb-font-size-base);
    color: var(--tp-rb-color-text-secondary);
}

.tp-rb-calendar__rates--empty .tp-rb-calendar__rates-title {
    margin-bottom: var(--tp-rb-space-1);
}

@media (max-width: 640px) {
    .tp-rb-calendar__header {
        flex-direction: column;
        gap: var(--tp-rb-space-4);
    }

    .tp-rb-calendar__rates {
        padding: var(--tp-rb-space-3);
        width: 100%;
    }

    .tp-rb-calendar__rates-title {
        font-size: var(--tp-rb-font-size-base);
    }

    .tp-rb-calendar__rates-table {
        font-size: var(--tp-rb-font-size-xs);
    }

    .tp-rb-calendar__rates-table th,
    .tp-rb-calendar__rates-table td {
        padding: 0.4rem 0.5rem;
    }

    .tp-rb-calendar__header .tp-rb-calendar__legend {
        width: 100%;
    }
}

.tp-rb-calendar__selector {
    margin-bottom: var(--tp-rb-space-4);
}

.tp-rb-calendar__legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tp-rb-space-4);
    margin-bottom: var(--tp-rb-space-4);
}

.tp-rb-calendar__title {
    font-size: var(--tp-rb-font-size-lg);
    font-weight: var(--tp-rb-font-weight-bold);
    margin: 0 0 var(--tp-rb-space-2);
}

.tp-rb-calendar--all .tp-rb-calendar__title {
    color: var(--tp-rb-color-primary);
}

.tp-rb-calendar--all .tp-rb-calendar__controls,
.tp-rb-calendar--all .tp-rb-calendar__selector {
    display: none;
}

.tp-rb-calendar__controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tp-rb-space-4);
    margin-bottom: var(--tp-rb-space-4);
}

.tp-rb-calendar__pagination {
    display: inline-flex;
    align-items: center;
    gap: var(--tp-rb-space-2);
    min-width: 0;
}

.tp-rb-calendar__nav {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--tp-rb-color-gray-300);
    border-radius: var(--tp-rb-radius-sm);
    background-color: var(--tp-rb-color-white);
    color: var(--tp-rb-color-gray-800);
    font-weight: var(--tp-rb-font-weight-semibold);
    cursor: pointer;
    transition: background-color var(--tp-rb-transition-base), 
                color var(--tp-rb-transition-base), 
                border-color var(--tp-rb-transition-base);
}

.tp-rb-calendar__nav:hover,
.tp-rb-calendar__nav:focus {
    background-color: var(--tp-rb-color-gray-100);
}

.tp-rb-calendar__nav:focus {
    outline: 2px solid var(--tp-rb-color-primary);
    outline-offset: 2px;
}

.tp-rb-calendar__nav[disabled],
.tp-rb-calendar__nav[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.5;
    background-color: var(--tp-rb-color-bg-muted);
}

.tp-rb-calendar__nav-icon {
    font-size: var(--tp-rb-font-size-base);
    line-height: 1;
}

.tp-rb-calendar__control {
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.tp-rb-calendar__control label {
    font-weight: var(--tp-rb-font-weight-semibold);
    margin-bottom: var(--tp-rb-space-1);
}

.tp-rb-calendar__control input,
.tp-rb-calendar__control select {
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--tp-rb-color-gray-300);
    border-radius: var(--tp-rb-radius-sm);
    font-size: var(--tp-rb-font-size-base);
}

/* ========================================
   Status Indicators
   ======================================== */

.tp-rb-status {
    display: inline-flex;
    align-items: center;
    font-size: var(--tp-rb-font-size-sm);
    gap: var(--tp-rb-space-2);
}

.tp-rb-status::before {
    content: '';
    width: 1rem;
    height: 1rem;
    border-radius: var(--tp-rb-radius-sm);
    display: inline-block;
    background: var(--tp-rb-status-confirmed);
}

.tp-rb-status--provisional::before {
    background: var(--tp-rb-status-provisional);
}

.tp-rb-status--pending_payment::before {
    background: var(--tp-rb-status-pending);
}

.tp-rb-status--booked::before {
    background: var(--tp-rb-status-booked);
}

.tp-rb-status--buffer::before {
    background: var(--tp-rb-status-buffer);
}

.tp-rb-calendar__header .tp-rb-calendar__legend {
    margin-bottom: 0;
    min-width: 220px;
}

.tp-rb-calendar__header .tp-rb-status {
    white-space: nowrap;
}

.tp-rb-calendar__wrapper {
    overflow-x: auto;
}

@media (max-width: 48em) {
    .tp-rb-calendar__control--range {
        display: none;
    }
}

/* ========================================
   Combo Two-Column Layout
   ======================================== */

.tp-rb-combo__cols {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: var(--tp-rb-space-6);
    align-items: start;
}

.tp-rb-combo__col {
    min-width: 0;
}

.tp-rb-combo__col--calendar .tp-rb-calendar {
    margin-bottom: 0;
}

@media (max-width: 900px) { /* --tp-rb-breakpoint-combo: 900px */
    .tp-rb-combo__cols {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Combo: inner form grid overrides
   When the combo is in two-column mode (viewport > 900 px) the form
   column is roughly half the viewport wide.  The standard 4-column
   booking-details grid would leave each cell only ~115 px at 950 px
   viewport, causing labels to be clipped.  Cap it at 2-col so the
   fields remain readable, and keep the existing span rules consistent.
   ======================================== */

@media (min-width: 901px) {
    /* Booking details stays 2-col inside the combo column */
    .tp-rb--combo .tp-rb-grid--booking-details {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Room and user type each occupy one column (not span-2 of 4) */
    .tp-rb--combo .tp-rb-grid--booking-details .tp-rb-field--room,
    .tp-rb--combo .tp-rb-grid--booking-details .tp-rb-field--user-type {
        grid-column: span 1;
    }

    /* Reason remains full-width */
    .tp-rb--combo .tp-rb-grid--booking-details .tp-rb-field--reason {
        grid-column: 1 / -1;
    }
}

/* ========================================
   Compact form (used in combo right column)
   ======================================== */

.tp-rb-form--compact .tp-rb-section:first-child {
    margin-top: 0;
}

.tp-rb-form--compact .tp-rb-summary {
    max-width: none;
}

/* ========================================
   Calendar Table & Slots
   ======================================== */

.tp-rb-calendar__table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--tp-rb-font-size-xs);
    table-layout: fixed;
}

.tp-rb-calendar--days-7 .tp-rb-calendar__table {
    font-size: var(--tp-rb-font-size-sm);
}

.tp-rb-calendar--days-14 .tp-rb-calendar__table {
    font-size: 0.8rem;
}

.tp-rb-calendar--days-21 .tp-rb-calendar__table {
    font-size: 0.75rem;
}

.tp-rb-calendar--days-28 .tp-rb-calendar__table {
    font-size: 0.7rem;
}

.tp-rb-calendar__table th,
.tp-rb-calendar__table td {
    border: 1px solid var(--tp-rb-color-border);
    text-align: center;
    padding: var(--tp-rb-space-1);
    background: var(--tp-rb-color-white);
    color: var(--tp-rb-color-text-primary);
}

.tp-rb-calendar--days-21 .tp-rb-calendar__table th,
.tp-rb-calendar--days-21 .tp-rb-calendar__table td {
    padding: 0.18rem;
}

.tp-rb-calendar--days-28 .tp-rb-calendar__table th,
.tp-rb-calendar--days-28 .tp-rb-calendar__table td {
    padding: 0.12rem;
}

.tp-rb-calendar__table thead th {
    background: var(--tp-rb-color-gray-100);
    font-weight: var(--tp-rb-font-weight-semibold);
    font-size: var(--tp-rb-font-size-xs);
    background-clip: padding-box;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

/* Sticky Header */
.tp-rb-sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateZ(0);
    transition: opacity var(--tp-rb-transition-fast);
}

.tp-rb-sticky-header.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tp-rb-calendar__sticky-header {
    background: var(--tp-rb-color-gray-100);
    border-bottom: 1px solid var(--tp-rb-color-border-light);
    box-shadow: var(--tp-rb-shadow-base);
    overflow: hidden;
}

.tp-rb-calendar__sticky-header .tp-rb-calendar__table {
    margin: 0;
    border-collapse: collapse;
}

.tp-rb-calendar__day-name {
    display: block;
    font-weight: var(--tp-rb-font-weight-semibold);
}

/* Slot Styling */
.tp-rb-slot {
    display: block;
    height: 0.9rem;
    margin: 0.1rem 0;
    border-radius: var(--tp-rb-radius-sm);
    background: var(--tp-rb-status-confirmed-bg);
    cursor: pointer;
    transition: background var(--tp-rb-transition-base);
}

.tp-rb-calendar--days-14 .tp-rb-slot {
    height: 0.75rem;
}

.tp-rb-calendar--days-21 .tp-rb-slot,
.tp-rb-calendar--days-28 .tp-rb-slot {
    height: 0.6rem;
}

.tp-rb-calendar--dragging .tp-rb-slot {
    cursor: grabbing;
}

.tp-rb-slot--provisional {
    background: var(--tp-rb-status-provisional-bg);
}

.tp-rb-slot--pending_payment {
    background: var(--tp-rb-status-pending-bg);
}

.tp-rb-slot--booked {
    background: var(--tp-rb-status-booked-bg);
    cursor: help;
}

.tp-rb-slot--blackout {
    background: var(--tp-rb-status-blackout-bg);
}

.tp-rb-slot--buffer {
    background: var(--tp-rb-status-buffer-bg);
    cursor: not-allowed;
}

.tp-rb-slot--selected {
    outline: 2px solid var(--tp-rb-status-selected);
    background: var(--tp-rb-status-selected-bg);
}

.tp-rb-calendar--loading .tp-rb-slot {
    opacity: 0.6;
}

.tp-rb-loading {
    margin: var(--tp-rb-space-4) 0;
    font-size: var(--tp-rb-font-size-sm);
}

/* ========================================
   Form Component
   ======================================== */

.tp-rb-form {
    border: 1px solid var(--tp-rb-color-border);
    padding: var(--tp-rb-space-6);
    border-radius: var(--tp-rb-radius-md);
    background: var(--tp-rb-color-white);
}

.tp-rb-field,
.tp-rb-toggle,
.tp-rb-price,
.tp-rb-actions,
.tp-rb-messages,
.tp-rb-terms-block {
    margin-bottom: var(--tp-rb-space-4);
}

.tp-rb-price--disabled {
    opacity: 0.65;
}

.tp-rb-price__notice {
    margin-top: var(--tp-rb-space-2);
    font-size: var(--tp-rb-font-size-xs);
    color: var(--tp-rb-color-gray-700);
}

.tp-rb-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--tp-rb-space-4);
}

.tp-rb-columns--times {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.tp-rb-field label,
.tp-rb-toggle label {
    display: block;
    font-weight: var(--tp-rb-font-weight-semibold);
    margin-bottom: var(--tp-rb-space-2);
}

.tp-rb-terms-block,
.tp-rb-terms-block .tp-rb-actions {
    text-align: center;
}

.tp-rb-terms-block .tp-rb-payment-note {
    margin: 0;
    font-size: var(--tp-rb-font-size-base);
    color: var(--tp-rb-color-gray-700);
}

.tp-rb-terms-block .tp-rb-terms-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--tp-rb-space-2);
    font-weight: var(--tp-rb-font-weight-semibold);
}

.tp-rb-terms-block .tp-rb-terms-label input {
    margin: 0;
}

.tp-rb-terms-block .tp-rb-invoice-msg {
    margin-top: 6px;
    font-size: var(--tp-rb-font-size-base);
}

.tp-rb-terms-error {
    margin-top: 6px;
    color: var(--tp-rb-color-error);
    font-weight: var(--tp-rb-font-weight-semibold);
    display: none;
}

.tp-rb-terms-error.is-visible {
    display: block;
}

.tp-rb-terms-error[hidden] {
    display: none !important;
}

.tp-rb-field input,
.tp-rb-field select,
.tp-rb-field textarea,
.tp-rb-form-room {
    width: 100%;
    padding: var(--tp-rb-space-2);
    border: 1px solid var(--tp-rb-color-gray-300);
    border-radius: var(--tp-rb-radius-sm);
    font-size: var(--tp-rb-font-size-base);
}

.tp-rb-field textarea {
    resize: vertical;
}

.tp-rb-form select option.tp-rb-option-hidden {
    display: none;
}

.tp-rb-fieldset {
    border: 1px solid var(--tp-rb-color-border);
    border-radius: var(--tp-rb-radius-md);
    padding: var(--tp-rb-space-4);
}

.tp-rb-fieldset legend {
    font-weight: var(--tp-rb-font-weight-semibold);
    padding: 0 var(--tp-rb-space-2);
}

.tp-rb-extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--tp-rb-space-2);
    gap: var(--tp-rb-space-3);
}

.tp-rb-extra input {
    margin-right: var(--tp-rb-space-2);
}

.tp-rb-extra__price {
    font-weight: var(--tp-rb-font-weight-semibold);
    white-space: nowrap;
}

.tp-rb-price {
    border-top: 1px solid var(--tp-rb-color-border);
    padding-top: var(--tp-rb-space-4);
}

.tp-rb-price__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--tp-rb-space-2);
}

.tp-rb-price__row--total strong {
    font-size: var(--tp-rb-font-size-xl);
}

/* ========================================
   Site Credit / Branding
   ======================================== */

.tp-rb-site-credit {
    margin: var(--tp-rb-space-8) auto 0;
    text-align: center;
    font-size: var(--tp-rb-font-size-sm);
    color: var(--tp-rb-color-text-secondary);
}

.tp-rb-site-credit a {
    color: inherit;
    font-weight: var(--tp-rb-font-weight-semibold);
    text-decoration: none;
}

.tp-rb-site-credit a:hover,
.tp-rb-site-credit a:focus {
    text-decoration: underline;
}

/* ========================================
   Events List Component
   ======================================== */

.tp-rb-events {
    margin: var(--tp-rb-space-8) 0;
}

.tp-rb-events__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--tp-rb-space-6);
}

.tp-rb-events__item {
    border: 1px solid var(--tp-rb-color-border);
    border-radius: var(--tp-rb-radius-lg);
    padding: var(--tp-rb-space-5);
    background-color: var(--tp-rb-color-white);
    box-shadow: var(--tp-rb-shadow-lg);
    display: grid;
    gap: var(--tp-rb-space-5);
}

.tp-rb-events__thumb {
    margin: 0;
    max-width: 160px;
}

.tp-rb-events__thumb img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--tp-rb-radius-md);
    box-shadow: var(--tp-rb-shadow-md);
}

.tp-rb-events__content {
    display: flex;
    flex-direction: column;
    gap: var(--tp-rb-space-3);
}

.tp-rb-events__title {
    margin: 0 0 var(--tp-rb-space-2);
    font-size: 36px;
    line-height: var(--tp-rb-line-height-tight);
}

.tp-rb-events__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tp-rb-space-3);
    font-size: var(--tp-rb-font-size-base);
    color: var(--tp-rb-color-text-secondary);
    margin-bottom: var(--tp-rb-space-3);
}

.tp-rb-events__datetime strong {
    font-weight: var(--tp-rb-font-weight-semibold);
    margin-right: var(--tp-rb-space-1);
}

.tp-rb-events__room {
    font-weight: var(--tp-rb-font-weight-semibold);
}

.tp-rb-events__summary {
    margin: 0 0 var(--tp-rb-space-3);
    line-height: var(--tp-rb-line-height-normal);
}

.tp-rb-events__actions {
    margin: 0;
}

.tp-rb-events__link {
    font-weight: var(--tp-rb-font-weight-semibold);
    color: var(--tp-rb-color-link) !important;
    text-decoration: none;
}

.tp-rb-events__link:hover,
.tp-rb-events__link:focus {
    text-decoration: underline;
    color: var(--tp-rb-color-link-hover) !important;
}

.tp-rb-events__price {
    font-weight: var(--tp-rb-font-weight-semibold);
    color: var(--tp-rb-color-secondary);
}

.tp-rb-events__empty {
    font-style: italic;
    margin: 0;
}

@media (min-width: 640px) {
    .tp-rb-events__item {
        grid-template-columns: minmax(0, 180px) 1fr;
        align-items: start;
    }
}

/* ========================================
   Event Detail Component
   ======================================== */

.tp-rb-event-detail {
    border: 1px solid var(--tp-rb-color-border);
    border-radius: var(--tp-rb-radius-lg);
    padding: var(--tp-rb-space-6);
    background-color: var(--tp-rb-color-bg-primary);
    color: var(--tp-rb-color-text-primary);
    box-shadow: var(--tp-rb-shadow-lg);
    display: flex;
    flex-direction: column;
    gap: var(--tp-rb-space-7);
}

.tp-rb-event-detail a,
.tp-rb-event-hero a {
    color: var(--tp-rb-color-link);
}

.tp-rb-event-detail a:hover,
.tp-rb-event-detail a:focus,
.tp-rb-event-hero a:hover,
.tp-rb-event-hero a:focus {
    color: var(--tp-rb-color-link-hover);
}

.tp-rb-event-detail__layout {
    display: grid;
    gap: var(--tp-rb-space-6);
}

.tp-rb-event-detail__media {
    display: grid;
    gap: var(--tp-rb-space-4);
}

.tp-rb-event-detail__gallery {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--tp-rb-space-3);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tp-rb-event-detail__featured {
    position: relative;
    margin: 0;
}

.tp-rb-event-detail__featured::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.75);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--tp-rb-transition-base);
}

.tp-rb-event-detail__featured.is-loading::after {
    opacity: 1;
}

.tp-rb-event-detail__featured-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--tp-rb-radius-md);
    box-shadow: var(--tp-rb-shadow-md);
}

.tp-rb-event-detail__gallery-link {
    display: block;
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    border-radius: 0.4rem;
    overflow: hidden;
    box-shadow: var(--tp-rb-shadow-base);
    background-color: var(--tp-rb-color-bg-primary);
    transition: transform var(--tp-rb-transition-fast), 
                box-shadow var(--tp-rb-transition-fast);
}

.tp-rb-event-detail__gallery-link:focus,
.tp-rb-event-detail__gallery-link:hover {
    outline: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}

.tp-rb-event-detail__gallery-item.is-active .tp-rb-event-detail__gallery-link {
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.35);
}

.tp-rb-event-detail__gallery-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tp-rb-event-detail__content {
    display: flex;
    flex-direction: column;
    gap: var(--tp-rb-space-4);
    justify-content: flex-start;
}

.tp-rb-event-detail__title {
    margin: 0;
    font-size: var(--tp-rb-font-size-2xl);
}

.tp-rb-event-detail__meta {
    list-style: none;
    margin: 0 0 var(--tp-rb-space-4);
    padding: 0;
    display: grid;
    gap: var(--tp-rb-space-2);
    font-size: var(--tp-rb-font-size-base);
    color: var(--tp-rb-color-text-secondary);
}

.tp-rb-event-detail__meta-item strong {
    font-weight: var(--tp-rb-font-weight-semibold);
    margin-right: var(--tp-rb-space-2);
}

.tp-rb-event-detail__pricing {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tp-rb-event-detail__pricing li {
    margin: 0.15rem 0;
}

.tp-rb-event-detail__description {
    line-height: var(--tp-rb-line-height-relaxed);
}

.tp-rb-event-detail__description p {
    margin: 0 0 var(--tp-rb-space-3);
}

.tp-rb-event-detail__description p:last-child {
    margin-bottom: 0;
}

.tp-rb-event-detail__empty {
    font-style: italic;
    margin: 0;
    border: 1px solid var(--tp-rb-color-border);
    border-radius: var(--tp-rb-radius-lg);
    padding: var(--tp-rb-space-5) var(--tp-rb-space-6);
    background-color: var(--tp-rb-color-bg-primary);
    color: var(--tp-rb-color-text-primary);
}

.tp-rb-event-detail__cta {
    margin: 0;
}

.tp-rb-event-detail__cta .tp-rb-button {
    min-width: 220px;
    text-align: center;
}

@media (min-width: 768px) {
    .tp-rb-event-detail__layout {
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
        align-items: start;
    }
}

/* ========================================
   Simple Events Layout
   ======================================== */

.tp-rb-events--simple {
    border: 1px solid var(--tp-rb-events-simple-border);
    border-radius: var(--tp-rb-radius-lg);
    padding: var(--tp-rb-space-4) var(--tp-rb-space-5);
    background-color: var(--tp-rb-events-simple-background);
    color: var(--tp-rb-events-simple-text);
}

.tp-rb-events--simple .tp-rb-events__list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tp-rb-events--simple .tp-rb-events__item {
    border: none;
    border-bottom: 1px solid var(--tp-rb-events-simple-border);
    padding: var(--tp-rb-space-3) 0;
    box-shadow: none;
    border-radius: 0;
}

.tp-rb-events--simple .tp-rb-events__item:last-child {
    border-bottom: 0;
}

.tp-rb-events__simple-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tp-rb-space-4);
    text-decoration: none;
    color: inherit;
    font-weight: var(--tp-rb-font-weight-semibold);
}

.tp-rb-events--simple a.tp-rb-events__simple-link {
    color: var(--tp-rb-events-simple-link);
}

.tp-rb-events--simple a.tp-rb-events__simple-link:hover,
.tp-rb-events--simple a.tp-rb-events__simple-link:focus {
    color: var(--tp-rb-events-simple-link-hover);
}

.tp-rb-events__simple-link time {
    font-weight: var(--tp-rb-font-weight-normal);
    color: var(--tp-rb-events-simple-meta);
}

.tp-rb-events--simple .tp-rb-events__price {
    color: var(--tp-rb-events-simple-price);
}

/* Room Events Simple Component */
.tp-room-events.simple {
    --tp-room-events-text-color: inherit;
    --tp-room-events-text-size: inherit;
    --tp-room-events-icon-size: 16px;
    --tp-room-events-link-color: var(--tp-rb-events-simple-link);
    --tp-room-events-link-hover: var(--tp-rb-events-simple-link-hover);
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--tp-rb-events-simple-border);
    border-radius: var(--tp-rb-radius-lg);
    background-color: var(--tp-rb-events-simple-background);
    color: var(--tp-room-events-text-color);
    font-size: var(--tp-room-events-text-size);
    line-height: var(--tp-rb-line-height-normal);
    overflow: hidden;
}

.tp-room-events.simple.horizontal {
    gap: var(--tp-rb-space-2);
}

.tp-room-events.simple .tp-room-events__event {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tp-room-events.simple .tp-room-events__link {
    display: block;
    padding: 0.85rem 1.1rem;
    text-decoration: none;
    color: var(--tp-room-events-link-color, var(--tp-room-events-text-color));
    transition: color var(--tp-rb-transition-base);
}

.tp-room-events.simple .tp-room-events__link:hover,
.tp-room-events.simple .tp-room-events__link:focus {
    color: var(--tp-room-events-link-hover, var(--tp-room-events-link-color, var(--tp-room-events-text-color)));
}

.tp-room-events.simple .tp-room-events__link--static {
    color: var(--tp-room-events-text-color);
    cursor: default;
}

.tp-room-events.simple .tp-room-events__segments {
    display: grid;
    gap: 0.45rem;
}

.tp-room-events.simple.horizontal .tp-room-events__segments {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--tp-rb-space-2);
}

.tp-room-events.simple .tp-room-events__segment {
    display: inline-flex;
    align-items: center;
    gap: var(--tp-rb-space-2);
    min-width: 0;
}

.tp-room-events.simple .tp-room-events__value {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    min-width: 0;
}

.tp-room-events.simple .tp-room-events__segment--title .tp-room-events__value {
    font-weight: var(--tp-rb-font-weight-semibold);
    color: var(--tp-room-events-text-color);
}

.tp-room-events.simple .tp-room-events__segment--date time,
.tp-room-events.simple .tp-room-events__segment--time time {
    color: var(--tp-rb-events-simple-meta);
}

.tp-room-events.simple .tp-room-events__range-separator {
    color: var(--tp-rb-events-simple-meta);
    padding: 0 var(--tp-rb-space-1);
}

.tp-room-events.simple .tp-room-events__segment-separator {
    display: none;
}

.tp-room-events.simple.horizontal .tp-room-events__segment-separator {
    display: inline-flex;
    align-items: center;
    color: var(--tp-rb-events-simple-meta);
    margin: 0 0.35rem;
}

.tp-room-events.simple .tp-icon {
    display: block;
    width: var(--tp-room-events-icon-size);
    height: var(--tp-room-events-icon-size);
    flex: 0 0 auto;
}

.tp-room-events.simple .tp-room-events__title-text {
    display: inline-block;
    min-width: 0;
}

.tp-room-events.simple .tp-event-separator {
    border: 0;
    border-top: 1px solid var(--tp-rb-events-simple-border);
    margin: 0;
}

.tp-room-events.simple.horizontal .tp-room-events__segment {
    gap: 0.35rem;
}

.tp-room-events.simple.horizontal .tp-room-events__link {
    padding: var(--tp-rb-space-3) var(--tp-rb-space-4);
}

.tp-room-events.simple .tp-room-events__event:last-child .tp-event-separator {
    display: none;
}

/* ========================================
   Event Hero Component
   ======================================== */

.tp-rb-event-hero {
    display: grid;
    gap: var(--tp-rb-space-6);
    margin-bottom: var(--tp-rb-space-8);
    border: 1px solid var(--tp-rb-color-border);
    border-radius: var(--tp-rb-radius-lg);
    padding: var(--tp-rb-space-6);
    background-color: var(--tp-rb-color-bg-primary);
    color: var(--tp-rb-color-text-primary);
    box-shadow: var(--tp-rb-shadow-lg);
}

.tp-rb-event-hero__media {
    margin: 0;
}

.tp-rb-event-hero__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--tp-rb-radius-lg);
    box-shadow: var(--tp-rb-shadow-lg);
}

.tp-rb-event-hero__content {
    display: grid;
    gap: var(--tp-rb-space-4);
}

.tp-rb-event-hero__title {
    margin: 0;
    font-size: var(--tp-rb-font-size-3xl);
}

.tp-rb-event-hero__meta {
    display: grid;
    gap: var(--tp-rb-space-2);
    font-size: var(--tp-rb-font-size-base);
    color: var(--tp-rb-color-text-secondary);
}

.tp-rb-event-hero__meta dt {
    font-weight: var(--tp-rb-font-weight-semibold);
    margin-right: var(--tp-rb-space-1);
}

.tp-rb-event-hero__meta dd {
    margin: 0;
}

.tp-rb-event-hero__summary {
    margin: 0;
    line-height: var(--tp-rb-line-height-relaxed);
}

@media (min-width: 720px) {
    .tp-rb-event-hero {
        grid-template-columns: minmax(0, 220px) 1fr;
    }
}

/* ========================================
   Actions & Buttons
   ======================================== */

.tp-rb-actions {
    margin-top: var(--tp-rb-space-5);
    text-align: right;
}

.tp-rb-submit {
    background: var(--tp-rb-button-bg-primary);
    color: var(--tp-rb-button-text-primary);
    border: none;
    padding: var(--tp-rb-space-3) var(--tp-rb-space-6);
    border-radius: var(--tp-rb-radius-md);
    font-size: var(--tp-rb-font-size-base);
    cursor: pointer;
    padding-top: var(--tp-rb-space-5);
}

.tp-rb-submit.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.tp-rb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--tp-rb-space-2);
    padding: var(--tp-rb-space-3) var(--tp-rb-space-7);
    border-radius: var(--tp-rb-radius-full);
    border: none;
    font-size: var(--tp-rb-font-size-base);
    font-weight: var(--tp-rb-font-weight-semibold);
    cursor: pointer;
    transition: transform var(--tp-rb-transition-base), 
                box-shadow var(--tp-rb-transition-base);
}

.tp-rb-button--primary {
    background: linear-gradient(120deg, var(--tp-rb-button-gradient-start), var(--tp-rb-button-gradient-end));
    color: var(--tp-rb-button-text-primary);
    box-shadow: var(--tp-rb-shadow-button);
}

.tp-rb-button--primary:hover,
.tp-rb-button--primary:focus {
    transform: translateY(-1px);
    box-shadow: var(--tp-rb-shadow-button-hover);
    background: linear-gradient(120deg, var(--tp-rb-button-gradient-hover-start), var(--tp-rb-button-gradient-hover-end));
}

/* ========================================
   Messages & Notifications
   ======================================== */

.tp-rb-messages {
    min-height: 1.5rem;
    font-weight: var(--tp-rb-font-weight-semibold);
}

.tp-rb-messages--publicise {
    margin-bottom: var(--tp-rb-space-4);
}

.tp-rb-message--error {
    color: var(--tp-rb-color-error);
}

.tp-rb-message--success {
    color: var(--tp-rb-color-success);
}

.tp-rb-notice {
    border-radius: var(--tp-rb-radius-md);
    padding: var(--tp-rb-space-4) var(--tp-rb-space-5);
    margin: var(--tp-rb-space-4) 0;
    border: 1px solid transparent;
}

.tp-rb-notice--error {
    border-color: var(--tp-rb-color-error-border);
    background: var(--tp-rb-color-error-bg);
    color: var(--tp-rb-color-error-text);
}

.tp-rb-notice--success {
    border-color: var(--tp-rb-color-success-border);
    background: var(--tp-rb-color-success-bg);
    color: var(--tp-rb-color-success-text);
}

.tp-rb-notice ul {
    margin: 0;
    padding-left: var(--tp-rb-space-5);
}

/* ========================================
   Helper Classes
   ======================================== */

.tp-rb-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.tp-rb-field--business {
    display: none;
}

.tp-rb-field--business.tp-rb-field--visible {
    display: block;
}

.tp-rb-required {
    color: var(--tp-rb-color-error);
}

.screen-reader-text,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .tp-rb-calendar__table th,
    .tp-rb-calendar__table td {
        padding: 0.15rem;
    }
}

/* ========================================
   Publicise Form
   ======================================== */

.tp-rb-publicise__wrap {
    max-width: 760px;
    margin: 0 auto var(--tp-rb-space-12);
    padding: var(--tp-rb-space-8);
    background: var(--tp-rb-color-white);
    border: 1px solid var(--tp-rb-color-border);
    border-radius: var(--tp-rb-radius-lg);
    box-shadow: var(--tp-rb-shadow-md);
}

.tp-rb-publicise__title {
    margin-top: 0;
    font-size: var(--tp-rb-font-size-3xl);
    font-weight: var(--tp-rb-font-weight-bold);
}

.tp-rb-publicise__intro {
    font-size: var(--tp-rb-font-size-base);
    margin-bottom: var(--tp-rb-space-6);
}

.tp-rb-publicise__summary {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tp-rb-space-4);
    margin-bottom: var(--tp-rb-space-6);
    font-weight: var(--tp-rb-font-weight-semibold);
}

.tp-rb-publicise__form .tp-rb-field {
    margin-bottom: var(--tp-rb-space-5);
}

.tp-rb-field--pricing .tp-rb-pricing {
    display: flex;
    flex-direction: column;
    gap: var(--tp-rb-space-3);
}

.tp-rb-pricing__list {
    display: grid;
    gap: var(--tp-rb-space-2);
}

.tp-rb-pricing__row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tp-rb-space-2);
    align-items: center;
    background: var(--tp-rb-color-gray-50);
    border: 1px solid var(--tp-rb-color-border);
    border-radius: var(--tp-rb-radius-md);
    padding: var(--tp-rb-space-3);
}

.tp-rb-pricing__field {
    flex: 1 1 200px;
    min-width: 150px;
}

.tp-rb-pricing__field--amount {
    flex: 0 1 130px;
    max-width: 160px;
}

.tp-rb-pricing__field input {
    width: 100%;
}

.tp-rb-pricing__remove {
    background: none;
    border: none;
    color: #c62828;
    font-size: 1.35rem;
    line-height: 1;
    padding: 0 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-rb-pricing__remove[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.tp-rb-pricing__add {
    align-self: flex-start;
    margin-top: var(--tp-rb-space-1);
}

.tp-rb-publicise__form label {
    font-weight: var(--tp-rb-font-weight-semibold);
    display: block;
    margin-bottom: var(--tp-rb-space-2);
}

.tp-rb-field-error {
    color: var(--tp-rb-color-error);
    font-size: var(--tp-rb-font-size-sm);
    margin-top: var(--tp-rb-space-2);
    display: none;
}

.tp-rb-field-error--visible {
    display: block;
}

.tp-rb-publicise__form input[type="text"],
.tp-rb-publicise__form input[type="url"],
.tp-rb-publicise__form input[type="date"],
.tp-rb-publicise__form input[type="time"],
.tp-rb-publicise__form textarea {
    width: 100%;
    padding: var(--tp-rb-space-2) var(--tp-rb-space-3);
    border: 1px solid var(--tp-rb-color-gray-300);
    border-radius: var(--tp-rb-radius-base);
    font-size: var(--tp-rb-font-size-base);
}

.tp-rb-char-count {
    margin-top: var(--tp-rb-space-2);
    color: var(--tp-rb-color-text-secondary);
    font-size: var(--tp-rb-font-size-sm);
}
}

.tp-rb-char-count__value,
.tp-rb-char-count__max {
    font-weight: var(--tp-rb-font-weight-semibold);
}

.tp-rb-publicise__privacy {
    font-size: var(--tp-rb-font-size-sm);
    color: var(--tp-rb-color-text-secondary);
    margin: var(--tp-rb-space-6) 0;
}

.tp-rb-field--inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--tp-rb-space-4);
    border: 1px solid var(--tp-rb-color-border);
    border-radius: var(--tp-rb-radius-md);
    padding: var(--tp-rb-space-4);
    background: var(--tp-rb-color-bg-muted);
}

.tp-rb-field--inline label {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .tp-rb-publicise__wrap {
        padding: var(--tp-rb-space-6);
    }

    .tp-rb-field--inline {
        grid-template-columns: 1fr 1fr;
    }
}

/* ========================================
   Upload & Media
   ======================================== */

.tp-rb-uploaded {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tp-rb-space-3);
    margin-top: var(--tp-rb-space-3);
    position: relative;
}

.tp-rb-uploaded--uploading {
    opacity: 0.6;
    pointer-events: none;
    min-height: 5rem;
}

.tp-rb-uploaded--uploading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--tp-rb-radius-md);
}

.tp-rb-uploaded--uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2.5rem;
    height: 2.5rem;
    margin-top: -1.25rem;
    margin-left: -1.25rem;
    border-radius: 999px;
    border: 3px solid #216ba5;
    border-top-color: transparent;
    animation: tp-rb-upload-spin 0.75s linear infinite;
}

.tp-rb-uploaded--empty {
    display: none;
}

.tp-rb-uploaded--empty.tp-rb-uploaded--uploading {
    display: flex;
}

@keyframes tp-rb-upload-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.tp-rb-upload-thumb {
    position: relative;
    width: 140px;
    height: 95px;
    border-radius: var(--tp-rb-radius-md);
    overflow: hidden;
    background: var(--tp-rb-color-gray-50);
    box-shadow: var(--tp-rb-shadow-base);
}

.tp-rb-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tp-rb-upload-thumb__remove {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--tp-rb-radius-full);
    border: none;
    background: rgba(33, 33, 33, 0.75);
    color: var(--tp-rb-color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: background var(--tp-rb-transition-base), 
                transform var(--tp-rb-transition-base);
}

.tp-rb-upload-thumb__remove:hover,
.tp-rb-upload-thumb__remove:focus {
    background: rgba(220, 53, 69, 0.85);
    transform: scale(1.05);
    outline: none;
}

.tp-rb-upload-thumb__remove span[aria-hidden="true"] {
    margin-top: -0.05rem;
}

/* ========================================
   Recurring Bookings
   ======================================== */

.tp-rb-recurring__details {
    display: grid;
    gap: var(--tp-rb-space-3);
    margin-top: var(--tp-rb-space-3);
}

.tp-rb-recurring__details[hidden] {
    display: none;
}

.tp-rb-recurring__term {
    display: flex;
    align-items: center;
    gap: var(--tp-rb-space-2);
}

.tp-rb-publicise-block .tp-rb-lead-time {
    margin-top: var(--tp-rb-space-5);
}

/* ========================================
   Form Section Layout (Columnar Redesign)
   ======================================== */

/* Section wrapper & heading */
.tp-rb-section {
    margin-bottom: var(--tp-rb-space-6);
}

.tp-rb-section__heading {
    margin: 0 0 var(--tp-rb-space-4);
    padding-bottom: var(--tp-rb-space-2);
    border-bottom: 1px solid var(--tp-rb-color-border);
    font-size: 14px;
    font-weight: var(--tp-rb-font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tp-rb-color-text-secondary);
}

/* Base grid — single column (mobile-first) */
.tp-rb-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--tp-rb-space-4);
}

/* Full-width helper inside any grid */
.tp-rb-field--full {
    grid-column: 1 / -1;
}

/* ── Booking details: 4-col on desktop, 2-col on tablet ── */
@media (min-width: 600px) {
    .tp-rb-grid--booking-details {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Reason spans the full 2-col row on tablet */
    .tp-rb-grid--booking-details .tp-rb-field--reason {
        grid-column: 1 / -1;
    }
}

@media (min-width: 900px) {
    .tp-rb-grid--booking-details {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Room and user type each span 2 of 4 columns on desktop */
    .tp-rb-grid--booking-details .tp-rb-field--room,
    .tp-rb-grid--booking-details .tp-rb-field--user-type {
        grid-column: span 2;
    }

    /* Reason spans 2 columns (left half of the row) on desktop */
    .tp-rb-grid--booking-details .tp-rb-field--reason {
        grid-column: span 2;
    }
}

/* ── Your details: 2-col on tablet+ ── */
@media (min-width: 600px) {
    .tp-rb-grid--your-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Additional options: 2-col on tablet+ ── */
@media (min-width: 600px) {
    .tp-rb-grid--options {
        grid-template-columns: repeat(2, 1fr);
        align-items: start;
    }

    /* When there are no extras the options-col spans the full width */
    .tp-rb-grid--options .tp-rb-options-col:only-child {
        grid-column: 1 / -1;
    }
}

/* Stack children inside the right options column */
.tp-rb-options-col {
    display: flex;
    flex-direction: column;
    gap: var(--tp-rb-space-4);
}

/* Extras card — already has .tp-rb-fieldset border; ensure height fills column */
.tp-rb-grid--options .tp-rb-extras {
    height: 100%;
    box-sizing: border-box;
}

/* Publicise block sits full-width below the 2-col grid */
.tp-rb-section .tp-rb-publicise-block {
    margin-top: var(--tp-rb-space-4);
}

/* ── Booking summary card ── */
.tp-rb-summary {
    max-width: 400px;
}

.tp-rb-summary .tp-rb-price {
    border: 1px solid var(--tp-rb-color-border);
    border-radius: 8px;
    padding: var(--tp-rb-space-4);
}

/* ── Publicise lead-time: hidden until checkbox is ticked ── */
.tp-rb-lead-time {
    display: none;
}

.tp-rb-lead-time--visible {
    display: block;
}

/* ========================================
   Room Picker (pill buttons)
   ======================================== */

.tp-rb-room-picker__label {
    margin: 0 0 var(--tp-rb-space-2);
    font-size: 13px;
    font-weight: var(--tp-rb-font-weight-semibold);
    color: var(--tp-rb-color-text-secondary);
}

.tp-rb-room-picker {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tp-rb-space-2);
}

.tp-rb-room-pill {
    padding: 0.45rem 1.25rem;
    border: 2px solid var(--tp-rb-color-primary);
    border-radius: 999px;
    background: transparent;
    color: var(--tp-rb-color-primary);
    font-family: inherit;
    font-size: var(--tp-rb-font-size-base);
    font-weight: var(--tp-rb-font-weight-semibold);
    line-height: var(--tp-rb-line-height-normal);
    cursor: pointer;
    transition: background-color var(--tp-rb-transition-base),
                color var(--tp-rb-transition-base),
                border-color var(--tp-rb-transition-base);
}

.tp-rb-room-pill:hover,
.tp-rb-room-pill:focus {
    background-color: var(--tp-rb-color-primary-light);
    color: var(--tp-rb-color-white);
    outline: 2px solid var(--tp-rb-color-primary);
    outline-offset: 2px;
}

.tp-rb-room-pill.is-active {
    background-color: var(--tp-rb-color-primary);
    border-color: var(--tp-rb-color-primary);
    color: var(--tp-rb-color-white);
}

.tp-rb-room-pill.is-active:focus {
    outline-color: var(--tp-rb-color-primary-dark);
}
