/* Tech Booking System - Frontend Styles */

/* Booking Wrapper */
.tbs-booking-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Book Now Section - Top */
.tbs-book-now-section-top {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}

/* Upcoming Bookings Section */
.tbs-upcoming-bookings-section {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.tbs-upcoming-bookings-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.tbs-bookings-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tbs-booking-item {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.tbs-booking-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tbs-booking-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0073aa;
    color: #fff;
    border-radius: 8px;
    padding: 10px 15px;
    min-width: 60px;
    margin-right: 20px;
}

.tbs-date-day {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.tbs-date-month {
    font-size: 12px;
    text-transform: uppercase;
    margin-top: 4px;
}

.tbs-booking-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tbs-booking-service {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.tbs-booking-datetime {
    font-size: 14px;
    color: #666;
}

.tbs-no-bookings {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Legacy calendar styles - kept for standalone calendar shortcode */
.tbs-public-calendar-section {
    margin-bottom: 40px;
}

.tbs-public-calendar-section h2,
.tbs-booking-form-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.tbs-calendar-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

#tbs-public-calendar,
#tbs-standalone-calendar {
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* Book Now Section - Legacy */
.tbs-book-now-section {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

.tbs-btn-large {
    padding: 16px 50px;
    font-size: 18px;
}

/* Form Styles */
.tbs-booking-form-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#tbs-booking-form {
    max-width: 800px;
}

.tbs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.tbs-form-group {
    margin-bottom: 20px;
}

.tbs-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.tbs-form-group input[type="text"],
.tbs-form-group input[type="email"],
.tbs-form-group input[type="tel"],
.tbs-form-group input[type="date"],
.tbs-form-group select,
.tbs-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.tbs-form-group input:focus,
.tbs-form-group select:focus,
.tbs-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.tbs-form-group input[type="file"] {
    padding: 8px 0;
}

.tbs-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.tbs-field-description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.tbs-image-required {
    color: #d63638;
}

/* Service Details Display */
.tbs-service-details {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.tbs-service-details-header {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.tbs-service-price {
    font-size: 22px;
    font-weight: 700;
    color: #0073aa;
}

.tbs-service-duration {
    color: #666;
    font-size: 14px;
    background: #e8f4fc;
    padding: 4px 12px;
    border-radius: 20px;
}

.tbs-service-description {
    color: #444;
    font-size: 14px;
    line-height: 1.6;
}

.tbs-service-description p {
    margin: 0 0 8px 0;
}

.tbs-service-description p:last-child {
    margin-bottom: 0;
}

.tbs-service-description .tbs-description-list {
    margin: 8px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.tbs-service-description .tbs-description-list li {
    margin-bottom: 4px;
    line-height: 1.5;
}

.tbs-service-description .tbs-description-list li:last-child {
    margin-bottom: 0;
}

/* Image Upload Area */
.tbs-image-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
}

.tbs-image-count {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 15px;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
}

.tbs-image-count #tbs-uploaded-count {
    color: #0073aa;
    font-size: 18px;
}

.tbs-upload-dropzone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
    user-select: none;
}

.tbs-upload-dropzone * {
    cursor: pointer;
    user-select: none;
}

.tbs-upload-dropzone:hover {
    border-color: #0073aa;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.15);
}

.tbs-upload-dropzone:active {
    transform: translateY(0);
}

.tbs-upload-dropzone.tbs-dragover {
    border-color: #0073aa;
    background: #e6f3ff;
    border-width: 3px;
}

.tbs-upload-dropzone.tbs-upload-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.tbs-upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.tbs-upload-text {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px 0;
    font-weight: 500;
}

.tbs-browse-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 10px 0;
}

.tbs-browse-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.tbs-browse-btn:active {
    transform: translateY(0);
}

.tbs-upload-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.tbs-image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.tbs-preview-item {
    position: relative;
    width: 120px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
}

.tbs-preview-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.tbs-remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
    padding: 0;
}

.tbs-remove-image:hover {
    background: #c82333;
}

.tbs-image-name {
    display: block;
    font-size: 10px;
    color: #666;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Buttons */
.tbs-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f1;
    display: flex;
    gap: 15px;
}

.tbs-btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.tbs-btn-primary {
    background: #0073aa;
    color: #fff;
}

.tbs-btn-primary:hover {
    background: #005a87;
}

.tbs-btn-secondary {
    background: #f0f0f1;
    color: #333;
    border: 1px solid #ddd;
}

.tbs-btn-secondary:hover {
    background: #e0e0e0;
}

.tbs-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Messages */
#tbs-booking-message {
    margin-bottom: 20px;
}

.tbs-message {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.tbs-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tbs-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.tbs-message-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Inline error message for image upload */
#tbs-image-error {
    background: #dc3545;
    color: #ffffff;
    border: 2px solid #bd2130;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Calendar Wrapper */
.tbs-calendar-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Public Calendar Section */
.tbs-public-calendar-section {
    margin-bottom: 30px;
}

#tbs-public-calendar {
    min-height: 400px;
}

/* FullCalendar Overrides */
.fc-event {
    cursor: pointer;
}

.fc-toolbar-title {
    font-size: 1.5em !important;
}

.fc-daygrid-day {
    cursor: pointer;
    min-height: 80px;
}

.fc-daygrid-day-frame {
    min-height: 80px;
}

.fc-daygrid-day:hover {
    background: #f0f8ff;
}

/* 2-Week Calendar Styles */
.fc-dayGridTwoWeeks-view .fc-daygrid-body {
    width: 100% !important;
}

.fc-dayGridTwoWeeks-view .fc-scrollgrid-sync-table {
    width: 100% !important;
}

.fc-dayGridTwoWeeks-view .fc-daygrid-day {
    min-height: 100px;
}

.fc-dayGridTwoWeeks-view .fc-daygrid-event {
    font-size: 11px;
    padding: 2px 4px;
    margin-bottom: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .tbs-booking-wrapper {
        padding: 15px;
    }
    
    .tbs-booking-form-section {
        padding: 20px;
    }
    
    .tbs-form-row {
        grid-template-columns: 1fr;
    }
    
    .tbs-public-calendar-section h2,
    .tbs-booking-form-section h2,
    .tbs-upcoming-bookings-section h3 {
        font-size: 20px;
    }
    
    .tbs-form-actions {
        flex-direction: column;
    }
    
    .fc-daygrid-day,
    .fc-daygrid-day-frame {
        min-height: 60px;
    }
    
    .fc-dayGridTwoWeeks-view .fc-daygrid-day {
        min-height: 70px;
    }
    
    .tbs-service-details-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .tbs-service-details {
        padding: 12px 15px;
    }
    
    .tbs-upcoming-bookings-section {
        padding: 15px;
    }
    
    .tbs-booking-item {
        padding: 12px;
    }
    
    .tbs-booking-date {
        min-width: 50px;
        padding: 8px 12px;
        margin-right: 15px;
    }
    
    .tbs-date-day {
        font-size: 20px;
    }
    
    .tbs-booking-service {
        font-size: 14px;
    }
    
    .tbs-booking-datetime {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .tbs-btn {
        width: 100%;
        padding: 14px;
    }
    
    .fc-toolbar-title {
        font-size: 1.2em !important;
    }
    
    .tbs-preview-item {
        width: 100px;
    }
    
    .tbs-service-price {
        font-size: 18px;
    }
    
    .tbs-service-description {
        font-size: 13px;
    }
}

/* Loading State */
.tbs-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* reCAPTCHA Container */
.g-recaptcha {
    margin-bottom: 20px;
}

/* Print Styles */
@media print {
    .tbs-booking-form-section,
    .tbs-form-actions {
        display: none;
    }
    
    .tbs-public-calendar-section {
        page-break-after: always;
    }
}

/* Blocked Dates Styling for Calendar */
.fc-bg-event {
    opacity: 0.3;
}

.tbs-blocked-date-indicator {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    padding: 5px 10px;
    margin-top: 5px;
    border-radius: 4px;
    font-size: 12px;
    color: #842029;
}

/* Calendar blocked dates background */
.fc-daygrid-day.fc-day-blocked {
    background-color: #f8f9fa !important;
    opacity: 0.6;
}

/* =====================================================
   STAFF PORTAL STYLES
   ===================================================== */

.tbs-staff-portal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Staff Login Section */
.tbs-staff-login-section {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tbs-staff-login-section h2 {
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.tbs-login-description {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
}

.tbs-staff-login-form .tbs-form-group {
    margin-bottom: 20px;
}

.tbs-staff-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.tbs-staff-login-form input[type="text"],
.tbs-staff-login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.tbs-staff-login-form input[type="checkbox"] {
    margin-right: 8px;
}

.tbs-staff-login-form .tbs-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* No Access Section */
.tbs-staff-no-access {
    text-align: center;
    padding: 60px 20px;
    background: #fff3cd;
    border-radius: 8px;
    margin: 40px auto;
    max-width: 500px;
}

.tbs-staff-no-access h2 {
    color: #856404;
    margin-bottom: 15px;
}

.tbs-staff-no-access p {
    color: #856404;
    margin-bottom: 10px;
}

/* Staff Dashboard */
.tbs-staff-dashboard {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 25px;
}

.tbs-staff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.tbs-staff-header h2 {
    margin: 0;
    color: #333;
}

.tbs-staff-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
}

.tbs-btn-small {
    padding: 6px 12px !important;
    font-size: 12px !important;
}

/* Filter Tabs */
.tbs-staff-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.tbs-filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.tbs-filter-btn:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.tbs-filter-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Staff Bookings Table */
.tbs-staff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tbs-staff-table th,
.tbs-staff-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tbs-staff-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.tbs-staff-table tr:hover {
    background: #f8f9fa;
}

.tbs-staff-table small {
    color: #666;
}

/* Staff Modal */
.tbs-staff-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tbs-staff-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
}

.tbs-staff-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.tbs-staff-modal-close:hover {
    color: #333;
}

.tbs-staff-modal-body h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.tbs-staff-modal-body h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #555;
    font-size: 14px;
    text-transform: uppercase;
}

.tbs-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tbs-detail-row {
    padding: 8px 0;
}

.tbs-detail-row strong {
    color: #666;
    font-weight: 500;
}

.tbs-description,
.tbs-admin-notes {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    white-space: pre-wrap;
}

.tbs-staff-modal-body .tbs-images {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.tbs-staff-modal-body .tbs-images img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.tbs-staff-update-form {
    margin-top: 20px;
}

.tbs-staff-update-form .tbs-form-group {
    margin-bottom: 15px;
}

.tbs-staff-update-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.tbs-staff-update-form select,
.tbs-staff-update-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.tbs-staff-update-form .tbs-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.tbs-btn-danger {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}

.tbs-btn-danger:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
}

.tbs-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Staff Portal Responsive */
@media (max-width: 768px) {
    .tbs-staff-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .tbs-staff-user-info {
        flex-direction: column;
    }
    
    .tbs-staff-filters {
        justify-content: center;
    }
    
    .tbs-staff-table {
        font-size: 12px;
    }
    
    .tbs-staff-table th,
    .tbs-staff-table td {
        padding: 8px 10px;
    }
    
    .tbs-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .tbs-staff-modal-content {
        padding: 20px;
    }
    
    .tbs-staff-update-form .tbs-form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tbs-staff-table th:nth-child(3),
    .tbs-staff-table td:nth-child(3) {
        display: none;
    }
    
    .tbs-filter-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}


/* =====================================================
   CALENDAR BOOKING (v1.6.0)
   Everything is scoped to .tbs-bk. Colours can be
   overridden from the theme, e.g.
   .tbs-bk { --tbs-accent: #d32f2f; }
   ===================================================== */

.tbs-bk {
    --tbs-accent: #0073aa;
    --tbs-accent-dark: #005a87;
    --tbs-accent-soft: #e6f1f8;
    --tbs-free: #1e8e4f;
    --tbs-free-soft: #e5f5ec;
    --tbs-booked: #8a939c;
    --tbs-booked-soft: #eef0f2;
    --tbs-full: #c62828;
    --tbs-full-soft: #fdecec;
    --tbs-closed: #f3f4f6;
    --tbs-text: #1f2328;
    --tbs-muted: #5f6b76;
    --tbs-border: #dfe3e8;
    --tbs-radius: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0 30px;
    color: var(--tbs-text);
    position: relative;
}

.tbs-bk *,
.tbs-bk *::before,
.tbs-bk *::after {
    box-sizing: border-box;
}

.tbs-bk [hidden] {
    display: none !important;
}

/* Header + legend */
.tbs-bk-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 16px;
}

.tbs-bk-title {
    margin: 0 0 4px;
    font-size: 22px;
    line-height: 1.3;
}

.tbs-bk-hint {
    margin: 0;
    color: var(--tbs-muted);
    font-size: 14px;
}

.tbs-bk-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: var(--tbs-muted);
}

.tbs-bk-legend li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.tbs-bk-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.tbs-bk-swatch-free { background: var(--tbs-free); }
.tbs-bk-swatch-booked { background: var(--tbs-booked); }
.tbs-bk-swatch-full { background: var(--tbs-full); }
.tbs-bk-swatch-closed { background: var(--tbs-closed); border: 1px solid var(--tbs-border); }

/* Calendar surface */
.tbs-bk-calendar-wrap {
    position: relative;
    background: #fff;
    border: 1px solid var(--tbs-border);
    border-radius: var(--tbs-radius);
    padding: 16px;
}

.tbs-bk-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--tbs-radius);
    z-index: 5;
}

.tbs-bk-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--tbs-accent-soft);
    border-top-color: var(--tbs-accent);
    border-radius: 50%;
    display: inline-block;
    animation: tbs-bk-spin 0.8s linear infinite;
    vertical-align: middle;
}

.tbs-bk-spinner-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

@keyframes tbs-bk-spin {
    to { transform: rotate(360deg); }
}

/* FullCalendar theming inside .tbs-bk */
.tbs-bk .fc {
    font-size: 14px;
}

.tbs-bk .fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: 14px;
    gap: 8px;
    flex-wrap: wrap;
}

.tbs-bk .fc .fc-toolbar-title {
    font-size: 20px !important;
    font-weight: 600;
}

.tbs-bk .fc .fc-button {
    background: #fff;
    border: 1px solid var(--tbs-border);
    color: var(--tbs-text);
    text-transform: capitalize;
    box-shadow: none !important;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.4;
}

.tbs-bk .fc .fc-button:hover {
    background: var(--tbs-accent-soft);
    color: var(--tbs-accent-dark);
}

.tbs-bk .fc .fc-button-primary:not(:disabled).fc-button-active,
.tbs-bk .fc .fc-button-primary:not(:disabled):active {
    background: var(--tbs-accent);
    border-color: var(--tbs-accent);
    color: #fff;
}

.tbs-bk .fc .fc-button:disabled {
    opacity: 0.45;
}

.tbs-bk .fc-theme-standard td,
.tbs-bk .fc-theme-standard th,
.tbs-bk .fc-theme-standard .fc-scrollgrid {
    border-color: var(--tbs-border);
}

.tbs-bk .fc .fc-col-header-cell-cushion,
.tbs-bk .fc .fc-daygrid-day-number {
    color: var(--tbs-text);
    text-decoration: none;
}

.tbs-bk .fc .fc-col-header-cell-cushion {
    font-weight: 600;
    font-size: 13px;
    padding: 8px 4px;
}

/* Undo the old global overrides for our calendar */
.tbs-bk .fc-daygrid-day {
    cursor: default;
}

.tbs-bk .fc-daygrid-day:hover {
    background: transparent;
}

.tbs-bk .fc .fc-daygrid-day-frame {
    min-height: 92px;
}

.tbs-bk .fc .fc-day-today {
    background: transparent !important;
}

.tbs-bk .fc .fc-day-today .fc-daygrid-day-number {
    background: var(--tbs-accent);
    color: #fff;
    border-radius: 999px;
    min-width: 26px;
    text-align: center;
    margin: 4px;
    padding: 2px 6px;
}

/* Day status colouring (month view) */
.tbs-bk.is-bookable .fc-daygrid-day.tbs-day-open {
    cursor: pointer;
}

.tbs-bk.is-bookable .fc-daygrid-day.tbs-day-open:hover {
    background: var(--tbs-free-soft);
}

.tbs-bk .fc-daygrid-day.tbs-day-full {
    background: #fffafa;
}

.tbs-bk .fc-daygrid-day.tbs-day-closed,
.tbs-bk .fc-daygrid-day.tbs-day-past,
.tbs-bk .fc-daygrid-day.tbs-day-outside {
    background: #fafbfc;
}

.tbs-bk .fc-daygrid-day.tbs-day-past .fc-daygrid-day-number,
.tbs-bk .fc-daygrid-day.tbs-day-outside .fc-daygrid-day-number,
.tbs-bk .fc-daygrid-day.tbs-day-closed .fc-daygrid-day-number {
    color: #a5adb5;
}

/* Events */
.tbs-bk .fc-event {
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.3;
    border-width: 1px;
}

.tbs-bk .fc .fc-daygrid-event {
    padding: 2px 6px;
    margin-top: 2px;
    white-space: normal;
}

.tbs-bk .fc-event.tbs-ev-dayfree,
.tbs-bk .fc-event.tbs-ev-free {
    background: var(--tbs-free-soft);
    border-color: var(--tbs-free);
    color: var(--tbs-free);
    font-weight: 600;
}

.tbs-bk.is-bookable .fc-event.tbs-ev-dayfree,
.tbs-bk.is-bookable .fc-event.tbs-ev-free {
    cursor: pointer;
}

.tbs-bk.is-bookable .fc-event.tbs-ev-dayfree:hover,
.tbs-bk.is-bookable .fc-event.tbs-ev-free:hover,
.tbs-bk .fc-event.tbs-ev-free:focus-visible,
.tbs-bk .fc-event.tbs-ev-dayfree:focus-visible {
    background: var(--tbs-free);
    color: #fff;
    outline: none;
}

.tbs-bk .fc-event.tbs-ev-dayfree .fc-event-title,
.tbs-bk .fc-event.tbs-ev-dayfree .fc-event-main,
.tbs-bk .fc-event.tbs-ev-free .fc-event-main,
.tbs-bk .fc-event.tbs-ev-full .fc-event-main,
.tbs-bk .fc-event.tbs-ev-booked .fc-event-main {
    color: inherit;
}

.tbs-bk .fc-event.tbs-ev-full {
    background: var(--tbs-full-soft);
    border-color: var(--tbs-full);
    color: var(--tbs-full);
    font-weight: 600;
    cursor: default;
}

.tbs-bk .fc-event.tbs-ev-booked {
    background: var(--tbs-booked-soft);
    border-color: var(--tbs-booked);
    color: #4d555c;
    cursor: default;
}

.tbs-bk .fc-daygrid-dot-event.tbs-ev-booked .fc-daygrid-event-dot {
    border-color: var(--tbs-booked);
}

.tbs-bk .fc-daygrid-dot-event:hover {
    background: transparent;
}

.tbs-bk .fc .fc-bg-event.tbs-ev-closed {
    background: repeating-linear-gradient(135deg, #f4f5f7, #f4f5f7 6px, #eceef1 6px, #eceef1 12px);
    opacity: 1;
}

.tbs-bk .fc .fc-bg-event .fc-event-title {
    font-style: normal;
    font-size: 11px;
    color: #8a939c;
    margin: 28px 6px 0;
}

.tbs-bk .fc .fc-timegrid-event .fc-event-main {
    padding: 2px 4px;
}

.tbs-bk .fc .fc-timegrid-slot {
    height: 2.2em;
}

/* List view */
.tbs-bk .fc .fc-list-event.tbs-ev-free td {
    background: var(--tbs-free-soft);
}

.tbs-bk.is-bookable .fc .fc-list-event.tbs-ev-free {
    cursor: pointer;
}

.tbs-bk .fc .fc-list-event.tbs-ev-free .fc-list-event-title {
    color: var(--tbs-free);
    font-weight: 600;
}

.tbs-bk .fc .fc-list-event.tbs-ev-free .fc-list-event-dot {
    border-color: var(--tbs-free);
}

.tbs-bk .fc .fc-list-event.tbs-ev-booked .fc-list-event-dot {
    border-color: var(--tbs-booked);
}

.tbs-bk .fc .fc-list-event.tbs-ev-booked {
    color: var(--tbs-muted);
}

.tbs-bk .fc .fc-list-empty {
    background: #fafbfc;
}

/* Toast */
.tbs-bk-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    background: #1f2328;
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    z-index: 100001;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    max-width: calc(100% - 32px);
    text-align: center;
}

.tbs-bk-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Fallback (calendar library unavailable) */
.tbs-bk-fallback {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.tbs-bk-fb-day {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--tbs-border);
    background: #fff;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.tbs-bk-fb-day.tbs-day-open {
    border-color: var(--tbs-free);
    background: var(--tbs-free-soft);
}

.tbs-bk-fb-day:disabled {
    cursor: default;
    opacity: 0.6;
}

/* ---------- Booking panel (modal) ---------- */
html.tbs-bk-lock,
html.tbs-bk-lock body {
    overflow: hidden !important;
}

.tbs-bk-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tbs-bk-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
}

.tbs-bk-dialog {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    outline: none;
    animation: tbs-bk-pop 0.18s ease-out;
}

@keyframes tbs-bk-pop {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.tbs-bk-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--tbs-border);
}

.tbs-bk-dialog-title {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 20px !important;
    line-height: 1.3;
}

.tbs-bk-dialog-date {
    margin: 2px 0 0;
    color: var(--tbs-accent);
    font-weight: 600;
    font-size: 15px;
}

.tbs-bk-close {
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: var(--tbs-muted);
    cursor: pointer;
    padding: 0 4px;
    min-width: 36px;
    min-height: 36px;
}

.tbs-bk-close:hover {
    color: var(--tbs-text);
    background: transparent;
}

.tbs-bk-dialog-body {
    padding: 18px 22px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
}

.tbs-bk-dialog-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid var(--tbs-border);
    background: #fafbfc;
}

.tbs-bk-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.tbs-bk-alert {
    background: var(--tbs-full-soft);
    border: 1px solid #f3b8b8;
    color: #8c1d1d;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Steps */
.tbs-bk-step {
    margin-bottom: 22px;
}

.tbs-bk-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px !important;
    font-size: 16px !important;
    line-height: 1.3;
}

.tbs-bk-step-no {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--tbs-accent);
    color: #fff;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.tbs-bk-step-sub {
    margin: -2px 0 10px 34px;
    font-size: 13px;
    color: var(--tbs-muted);
}

/* Services */
.tbs-bk-services {
    display: grid;
    gap: 8px;
}

.tbs-bk-service {
    border: 1.5px solid var(--tbs-border);
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}

.tbs-bk-service.is-selected {
    border-color: var(--tbs-accent);
    background: var(--tbs-accent-soft);
}

.tbs-bk-service-main {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 0 !important;
    cursor: pointer;
    font-weight: normal !important;
}

.tbs-bk-service-main input {
    position: absolute;
    left: 14px;
    top: 50%;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.tbs-bk-check {
    width: 20px;
    height: 20px;
    border: 2px solid #b7c0c9;
    border-radius: 5px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: all 0.15s;
}

.tbs-bk-service.is-selected .tbs-bk-check {
    background: var(--tbs-accent);
    border-color: var(--tbs-accent);
}

.tbs-bk-service.is-selected .tbs-bk-check::after {
    content: "";
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.tbs-bk-service-main input:focus-visible + .tbs-bk-check {
    outline: 2px solid var(--tbs-accent);
    outline-offset: 2px;
}

.tbs-bk-service-text {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.tbs-bk-service-name {
    font-weight: 600;
    font-size: 15px;
}

.tbs-bk-service-meta {
    font-size: 13px;
    color: var(--tbs-muted);
}

.tbs-bk-service-price {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--tbs-accent-dark);
}

.tbs-bk-service-more {
    background: transparent !important;
    border: 0 !important;
    color: var(--tbs-accent) !important;
    font-size: 13px !important;
    padding: 0 14px 10px 46px !important;
    cursor: pointer;
    text-decoration: underline;
    box-shadow: none !important;
}

.tbs-bk-service-desc {
    display: none;
    padding: 0 14px 12px 46px;
    font-size: 13px;
    color: var(--tbs-muted);
}

.tbs-bk-service.is-open .tbs-bk-service-desc {
    display: block;
}

.tbs-bk-service-desc p {
    margin: 0 0 4px;
}

.tbs-bk-service-desc ul {
    margin: 0 0 4px 18px;
    padding: 0;
}

.tbs-bk-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-top: 10px;
    padding: 10px 14px;
    background: #f6f8fa;
    border-radius: 8px;
    font-size: 14px;
}

.tbs-bk-summary-price {
    margin-left: auto;
    font-size: 16px;
}

/* Times */
.tbs-bk-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}

.tbs-bk-time {
    border: 1.5px solid var(--tbs-free) !important;
    background: #fff !important;
    color: var(--tbs-free) !important;
    border-radius: 8px !important;
    padding: 9px 6px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer;
    line-height: 1.2 !important;
    box-shadow: none !important;
    text-transform: none !important;
}

.tbs-bk-time:hover {
    background: var(--tbs-free-soft) !important;
}

.tbs-bk-time.is-selected {
    background: var(--tbs-free) !important;
    color: #fff !important;
}

.tbs-bk-note {
    grid-column: 1 / -1;
    margin: 0;
    padding: 10px 12px;
    background: #f6f8fa;
    border-radius: 8px;
    color: var(--tbs-muted);
    font-size: 14px;
}

.tbs-bk-note-warn {
    background: #fff7e6;
    color: #8a5a00;
}

.tbs-bk-ends {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--tbs-text);
    font-weight: 600;
}

/* Fields */
.tbs-bk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 14px;
}

.tbs-bk-field {
    margin-bottom: 14px;
}

.tbs-bk-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}

.tbs-bk-field input[type="text"],
.tbs-bk-field input[type="email"],
.tbs-bk-field input[type="tel"],
.tbs-bk-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c9d1d9;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    color: var(--tbs-text);
    font-family: inherit;
}

.tbs-bk-field input:focus,
.tbs-bk-field textarea:focus {
    outline: none;
    border-color: var(--tbs-accent);
    box-shadow: 0 0 0 3px var(--tbs-accent-soft);
}

.tbs-bk-field .has-error,
.tbs-bk-field input.has-error {
    border-color: var(--tbs-full) !important;
}

.tbs-bk-field-error {
    color: var(--tbs-full);
    font-size: 13px;
    margin-top: 6px;
}

.tbs-bk-req {
    color: var(--tbs-full);
}

.tbs-bk-muted {
    color: var(--tbs-muted);
    font-weight: normal;
    font-size: 13px;
}

/* Images */
.tbs-bk-drop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    border: 2px dashed #c9d1d9;
    border-radius: 10px;
    background: #fafbfc;
    color: var(--tbs-muted);
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

.tbs-bk-drop:hover,
.tbs-bk-drop.is-over,
.tbs-bk-drop:focus-visible {
    border-color: var(--tbs-accent);
    background: var(--tbs-accent-soft);
    outline: none;
}

.tbs-bk-drop.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tbs-bk-drop-icon {
    font-size: 22px;
}

.tbs-bk-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tbs-bk-preview {
    position: relative;
    width: 110px;
    font-size: 11px;
    color: var(--tbs-muted);
}

.tbs-bk-preview img {
    width: 110px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    border: 1px solid var(--tbs-border);
}

.tbs-bk-preview span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 3px;
}

.tbs-bk-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50% !important;
    border: 0 !important;
    background: var(--tbs-full) !important;
    color: #fff !important;
    font-size: 16px !important;
    line-height: 24px !important;
    padding: 0 !important;
    cursor: pointer;
}

/* Buttons */
.tbs-bk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 20px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    border: 1px solid transparent !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    box-shadow: none !important;
}

.tbs-bk-btn-primary {
    background: var(--tbs-accent) !important;
    color: #fff !important;
}

.tbs-bk-btn-primary:hover {
    background: var(--tbs-accent-dark) !important;
}

.tbs-bk-btn-primary:disabled {
    opacity: 0.6;
    cursor: wait;
}

.tbs-bk-btn-ghost {
    background: #fff !important;
    border-color: var(--tbs-border) !important;
    color: var(--tbs-text) !important;
}

.tbs-bk-btn-ghost:hover {
    background: #f3f4f6 !important;
}

/* Success */
.tbs-bk-success {
    text-align: center;
    padding: 20px 10px 10px;
}

.tbs-bk-success h3 {
    margin: 10px 0 6px;
}

.tbs-bk-success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--tbs-free-soft);
    color: var(--tbs-free);
    font-size: 30px;
    line-height: 60px;
    margin: 0 auto;
}

.tbs-bk-success-code strong {
    font-size: 18px;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 900px) {
    .tbs-bk-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .tbs-bk-calendar-wrap {
        padding: 10px;
        border-radius: 8px;
    }

    .tbs-bk .fc .fc-toolbar.fc-header-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .tbs-bk .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }

    .tbs-bk .fc .fc-toolbar-title {
        font-size: 17px !important;
        text-align: center;
    }

    .tbs-bk .fc .fc-daygrid-day-frame {
        min-height: 64px;
    }

    .tbs-bk .fc .fc-daygrid-event {
        font-size: 10px;
        padding: 1px 3px;
    }

    .tbs-bk-modal {
        padding: 0;
        align-items: flex-end;
    }

    .tbs-bk-dialog {
        max-width: none;
        max-height: 100vh;
        max-height: 100dvh;
        height: 100%;
        border-radius: 0;
    }

    .tbs-bk-dialog-head,
    .tbs-bk-dialog-body,
    .tbs-bk-dialog-foot {
        padding-left: 16px;
        padding-right: 16px;
    }

    .tbs-bk-grid {
        grid-template-columns: 1fr;
    }

    .tbs-bk-dialog-foot .tbs-bk-btn {
        flex: 1 1 auto;
        font-size: 14px !important;
        padding: 11px 12px !important;
    }

    .tbs-bk-dialog-foot .tbs-bk-btn-ghost {
        flex: 0 0 auto;
    }

    .tbs-bk-step-sub {
        margin-left: 0;
    }
}

.tbs-bk .tbs-ev-inner {
    white-space: normal;
    font-size: 11px;
    line-height: 1.3;
    overflow: hidden;
}

.tbs-bk .tbs-ev-inner span {
    display: block;
    font-weight: normal;
}
