/**
 * Deportee Studio Bookings - Public Styles
 *
 * Light, professional, modern design for the booking form.
 *
 * @package DeporteeStudioBookings
 */

/* ==========================================================================
   CSS Variables - Inherits from theme with fallbacks
   ========================================================================== */
:root {
    /* Primary colors - inherit from WordPress block themes, Flavor, GeneratePress, Flavor, etc. */
    --dsb-primary: var(--wp--preset--color--primary, var(--flavor-primary, var(--flavor-color-primary, var(--primary-color, var(--color-primary, var(--accent-color, #4a90d9))))));
    --dsb-primary-dark: var(--wp--preset--color--primary-dark, var(--flavor-primary-dark, var(--primary-color-dark, #3a7bc8)));
    --dsb-primary-light: var(--wp--preset--color--primary-light, var(--flavor-primary-light, var(--primary-color-light, #e8f2fc)));

    /* Status colors */
    --dsb-success: var(--wp--preset--color--success, var(--flavor-success, var(--success-color, #28a745)));
    --dsb-success-light: var(--wp--preset--color--success-light, #e8f5eb);
    --dsb-warning: var(--wp--preset--color--warning, var(--flavor-warning, var(--warning-color, #ffc107)));
    --dsb-warning-light: var(--wp--preset--color--warning-light, #fff8e1);
    --dsb-danger: var(--wp--preset--color--error, var(--flavor-danger, var(--danger-color, var(--error-color, #dc3545))));
    --dsb-danger-light: var(--wp--preset--color--error-light, #fce8ea);
    --dsb-info: var(--wp--preset--color--info, var(--flavor-info, var(--info-color, #17a2b8)));
    --dsb-info-light: var(--wp--preset--color--info-light, #e1f5f8);

    /* Gray scale - inherit from theme */
    --dsb-gray-100: var(--wp--preset--color--base, var(--flavor-gray-100, var(--gray-100, #f8f9fa)));
    --dsb-gray-200: var(--wp--preset--color--base-2, var(--flavor-gray-200, var(--gray-200, #e9ecef)));
    --dsb-gray-300: var(--flavor-gray-300, var(--gray-300, var(--border-color, #dee2e6)));
    --dsb-gray-400: var(--flavor-gray-400, var(--gray-400, #ced4da));
    --dsb-gray-500: var(--wp--preset--color--contrast-3, var(--flavor-gray-500, var(--gray-500, #adb5bd)));
    --dsb-gray-600: var(--wp--preset--color--contrast-2, var(--flavor-gray-600, var(--gray-600, var(--text-color-light, #6c757d))));
    --dsb-gray-700: var(--wp--preset--color--contrast, var(--flavor-gray-700, var(--gray-700, var(--text-color, #495057))));
    --dsb-gray-800: var(--flavor-gray-800, var(--gray-800, var(--heading-color, #343a40)));
    --dsb-gray-900: var(--flavor-gray-900, var(--gray-900, #212529));
    --dsb-white: var(--wp--preset--color--base, var(--flavor-white, var(--background-color, #ffffff)));

    /* Shadows */
    --dsb-shadow-sm: var(--wp--custom--shadow--sm, var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08)));
    --dsb-shadow: var(--wp--custom--shadow--md, var(--shadow, 0 2px 8px rgba(0, 0, 0, 0.1)));
    --dsb-shadow-lg: var(--wp--custom--shadow--lg, var(--shadow-lg, 0 4px 16px rgba(0, 0, 0, 0.12)));

    /* Border radius - inherit from theme */
    --dsb-radius: var(--wp--custom--border-radius, var(--flavor-radius, var(--border-radius, 8px)));
    --dsb-radius-sm: var(--wp--custom--border-radius-sm, var(--border-radius-sm, 4px));
    --dsb-radius-lg: var(--wp--custom--border-radius-lg, var(--border-radius-lg, 12px));

    /* Transitions */
    --dsb-transition: var(--wp--custom--transition, var(--transition, 0.2s ease));

    /* Typography - inherit from theme */
    --dsb-font-family: var(--wp--preset--font-family--body, var(--flavor-font-family, var(--font-family, inherit)));
}

/* ==========================================================================
   Base Container
   ========================================================================== */
.dsb-booking-container {
    font-family: var(--dsb-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    color: var(--dsb-gray-700);
    line-height: 1.6;
}

.dsb-booking-container * {
    box-sizing: border-box;
}

/* ==========================================================================
   Tabs
   ========================================================================== */
.dsb-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--dsb-gray-200);
    padding-bottom: 0;
}

.dsb-tab {
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 15px;
    font-weight: 500;
    color: var(--dsb-gray-600);
    cursor: pointer;
    transition: all var(--dsb-transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dsb-tab:hover {
    color: var(--dsb-primary);
    background: var(--dsb-gray-100);
}

.dsb-tab.dsb-tab-active {
    color: var(--dsb-primary);
    border-bottom-color: var(--dsb-primary);
    background: transparent;
}

.dsb-tab-icon {
    font-size: 18px;
}

.dsb-tab-content {
    display: none;
    animation: dsbFadeIn 0.3s ease;
}

.dsb-tab-content.dsb-tab-active {
    display: block;
}

@keyframes dsbFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Form Card
   ========================================================================== */
.dsb-form-card {
    background: var(--dsb-white);
    border: 1px solid var(--dsb-gray-200);
    border-radius: var(--dsb-radius-lg);
    box-shadow: var(--dsb-shadow);
    overflow: hidden;
}

.dsb-form-section {
    padding: 24px;
    border-bottom: 1px solid var(--dsb-gray-200);
}

.dsb-form-section:last-child {
    border-bottom: none;
}

.dsb-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dsb-gray-800);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dsb-section-title svg {
    width: 20px;
    height: 20px;
    color: var(--dsb-primary);
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
.dsb-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.dsb-form-row:last-child {
    margin-bottom: 0;
}

.dsb-form-group {
    margin-bottom: 0;
}

.dsb-form-group.dsb-full-width {
    grid-column: 1 / -1;
}

.dsb-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--dsb-gray-700);
    margin-bottom: 8px;
}

.dsb-label .required {
    color: var(--dsb-danger);
    margin-left: 2px;
}

.dsb-input,
.dsb-select,
.dsb-textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid var(--dsb-gray-300);
    border-radius: var(--dsb-radius);
    background: var(--dsb-white);
    color: var(--dsb-gray-800);
    transition: border-color var(--dsb-transition), box-shadow var(--dsb-transition);
}

.dsb-input:focus,
.dsb-select:focus,
.dsb-textarea:focus {
    outline: none;
    border-color: var(--dsb-primary);
    box-shadow: 0 0 0 3px var(--dsb-primary-light);
}

.dsb-input::placeholder,
.dsb-textarea::placeholder {
    color: var(--dsb-gray-400);
}

.dsb-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.dsb-textarea {
    resize: vertical;
    min-height: 100px;
}

.dsb-input-error {
    border-color: var(--dsb-danger) !important;
}

.dsb-error-message {
    font-size: 13px;
    color: var(--dsb-danger);
    margin-top: 6px;
    display: none;
}

.dsb-form-group.dsb-has-error .dsb-error-message {
    display: block;
}

.dsb-form-group.dsb-has-error .dsb-input,
.dsb-form-group.dsb-has-error .dsb-select,
.dsb-form-group.dsb-has-error .dsb-textarea {
    border-color: var(--dsb-danger);
}

.dsb-field-error {
    font-size: 13px;
    color: var(--dsb-danger);
    margin-top: 6px;
}

.dsb-help-text {
    font-size: 13px;
    color: var(--dsb-gray-500);
    margin-top: 6px;
}

/* ==========================================================================
   Checkbox & Radio
   ========================================================================== */
.dsb-checkbox-label,
.dsb-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--dsb-gray-700);
    line-height: 1.5;
}

.dsb-checkbox-label input,
.dsb-radio-label input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--dsb-primary);
}

.dsb-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dsb-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* ==========================================================================
   Date & Time Picker
   ========================================================================== */
.dsb-datetime-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.dsb-date-picker-container,
.dsb-time-picker-container {
    position: relative;
}

.dsb-date-picker,
.dsb-time-picker {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid var(--dsb-gray-300);
    border-radius: var(--dsb-radius);
    background: var(--dsb-white);
    cursor: pointer;
}

.dsb-date-picker-container,
.dsb-time-picker-container {
    position: relative;
    display: block;
}

/* Reset all native and theme styling on Flatpickr alt inputs */
.dsb-flatpickr-alt,
input.dsb-flatpickr-alt,
.dsb-booking-container .dsb-flatpickr-alt {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: none !important;
    background: var(--dsb-white) !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
    border: 1px solid var(--dsb-gray-300) !important;
    border-radius: var(--dsb-radius) !important;
    width: 100% !important;
    cursor: pointer !important;
}

/* Disabled state for time pickers */
.dsb-flatpickr-alt.dsb-disabled,
.dsb-flatpickr-alt:disabled,
input.dsb-flatpickr-alt:disabled {
    background: var(--dsb-gray-100) !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.dsb-duration-display {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    background: var(--dsb-gray-100);
    border: 1px solid var(--dsb-gray-300);
    border-radius: var(--dsb-radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--dsb-gray-600);
}

.dsb-duration-value {
    font-weight: 600;
    color: var(--dsb-primary);
    margin: 0 4px;
}

/* ==========================================================================
   Engineer Selection
   ========================================================================== */
.dsb-engineer-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dsb-engineer-option {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border: 2px solid var(--dsb-gray-200);
    border-radius: var(--dsb-radius);
    cursor: pointer;
    transition: all var(--dsb-transition);
}

.dsb-engineer-option:hover {
    border-color: var(--dsb-primary-light);
    background: var(--dsb-gray-100);
}

.dsb-engineer-option.selected {
    border-color: var(--dsb-primary);
    background: var(--dsb-primary-light);
}

.dsb-engineer-option input {
    margin-right: 12px;
    margin-top: 3px;
}

.dsb-engineer-info {
    flex: 1;
}

.dsb-engineer-name {
    font-weight: 600;
    color: var(--dsb-gray-800);
    margin-bottom: 4px;
}

.dsb-engineer-desc {
    font-size: 13px;
    color: var(--dsb-gray-500);
}

.dsb-engineer-select-container {
    margin-top: 16px;
    display: none;
}

.dsb-engineer-select-container.dsb-visible {
    display: block;
}

.dsb-available-engineers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.dsb-engineer-card {
    padding: 14px;
    border: 2px solid var(--dsb-gray-200);
    border-radius: var(--dsb-radius);
    cursor: pointer;
    text-align: center;
    transition: all var(--dsb-transition);
}

.dsb-engineer-card:hover {
    border-color: var(--dsb-primary-light);
    background: var(--dsb-gray-100);
}

.dsb-engineer-card.selected {
    border-color: var(--dsb-primary);
    background: var(--dsb-primary-light);
}

.dsb-engineer-card input {
    display: none;
}

.dsb-engineer-card-name {
    font-weight: 600;
    color: var(--dsb-gray-800);
}

/* ==========================================================================
   Price Calculator
   ========================================================================== */
.dsb-price-calculator {
    background: var(--dsb-gray-100);
    border: 1px solid var(--dsb-gray-200);
    border-radius: var(--dsb-radius);
    padding: 20px;
}

.dsb-price-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dsb-gray-700);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dsb-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dsb-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--dsb-gray-600);
}

.dsb-price-item-value {
    font-weight: 500;
    color: var(--dsb-gray-800);
}

.dsb-price-divider {
    height: 1px;
    background: var(--dsb-gray-300);
    margin: 8px 0;
}

.dsb-price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--dsb-gray-800);
    padding-top: 8px;
}

.dsb-price-total-value {
    color: var(--dsb-primary);
    font-size: 24px;
}

.dsb-price-note {
    font-size: 12px;
    color: var(--dsb-gray-500);
    margin-top: 12px;
    text-align: center;
}

/* ==========================================================================
   Terms & Conditions
   ========================================================================== */
.dsb-terms-section {
    background: var(--dsb-gray-100);
    border-radius: var(--dsb-radius);
    padding: 20px;
}

.dsb-terms-content {
    max-height: 150px;
    overflow-y: auto;
    font-size: 13px;
    color: var(--dsb-gray-600);
    line-height: 1.6;
    padding: 12px;
    background: var(--dsb-white);
    border: 1px solid var(--dsb-gray-200);
    border-radius: var(--dsb-radius-sm);
    margin-bottom: 16px;
}

.dsb-terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.dsb-terms-checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--dsb-primary);
}

.dsb-terms-checkbox label {
    font-size: 14px;
    color: var(--dsb-gray-700);
    cursor: pointer;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */
.dsb-submit-section {
    text-align: center;
    padding-top: 8px;
    margin-bottom: 20px;
}

.dsb-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 220px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: var(--dsb-white);
    background: var(--dsb-primary);
    border: none;
    border-radius: var(--dsb-radius);
    cursor: pointer;
    transition: all var(--dsb-transition);
    box-shadow: 0 2px 4px rgba(74, 144, 217, 0.3);
}

.dsb-submit-btn:hover:not(:disabled) {
    background: var(--dsb-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(74, 144, 217, 0.4);
}

.dsb-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.dsb-submit-btn:disabled {
    background: var(--dsb-gray-400);
    cursor: not-allowed;
    box-shadow: none;
}

.dsb-submit-btn .dsb-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--dsb-white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: dsbSpin 0.8s linear infinite;
}

.dsb-submit-btn.dsb-loading .dsb-spinner {
    display: block;
}

.dsb-submit-btn.dsb-loading .dsb-btn-text {
    display: none;
}

@keyframes dsbSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Alerts & Notices
   ========================================================================== */
.dsb-alert {
    padding: 16px 20px;
    border-radius: var(--dsb-radius);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dsb-alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.dsb-alert-success {
    background: var(--dsb-success-light);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dsb-alert-error {
    background: var(--dsb-danger-light);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dsb-alert-warning {
    background: var(--dsb-warning-light);
    color: #856404;
    border: 1px solid #ffeeba;
}

.dsb-alert-info {
    background: var(--dsb-info-light);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ==========================================================================
   Confirmation Modal
   ========================================================================== */
.dsb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--dsb-transition);
}

.dsb-modal-overlay.dsb-visible {
    opacity: 1;
    visibility: visible;
}

.dsb-modal {
    background: var(--dsb-white);
    border-radius: var(--dsb-radius-lg);
    box-shadow: var(--dsb-shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform var(--dsb-transition);
}

.dsb-modal-overlay.dsb-visible .dsb-modal {
    transform: translateY(0);
}

.dsb-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--dsb-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dsb-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dsb-gray-800);
    margin: 0;
}

.dsb-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dsb-gray-500);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.dsb-modal-close:hover {
    color: var(--dsb-gray-800);
}

.dsb-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.dsb-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--dsb-gray-200);
    background: var(--dsb-gray-100);
    text-align: right;
}

/* ==========================================================================
   Confirmation Content
   ========================================================================== */
.dsb-confirmation-success {
    text-align: center;
    padding: 20px 0;
}

.dsb-confirmation-icon {
    width: 80px;
    height: 80px;
    background: var(--dsb-success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.dsb-confirmation-icon svg {
    width: 40px;
    height: 40px;
    color: var(--dsb-success);
}

.dsb-confirmation-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--dsb-gray-800);
    margin-bottom: 12px;
}

.dsb-confirmation-message {
    font-size: 15px;
    color: var(--dsb-gray-600);
    margin-bottom: 24px;
}

.dsb-confirmation-details {
    background: var(--dsb-gray-100);
    border-radius: var(--dsb-radius);
    padding: 20px;
    text-align: left;
}

.dsb-confirmation-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--dsb-gray-200);
}

.dsb-confirmation-detail-row:last-child {
    border-bottom: none;
}

.dsb-confirmation-detail-label {
    color: var(--dsb-gray-600);
    font-size: 14px;
}

.dsb-confirmation-detail-value {
    font-weight: 500;
    color: var(--dsb-gray-800);
}

/* ==========================================================================
   Loading States
   ========================================================================== */
.dsb-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.dsb-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--dsb-gray-200);
    border-top-color: var(--dsb-primary);
    border-radius: 50%;
    animation: dsbSpin 0.8s linear infinite;
}

.dsb-slot-loading {
    padding: 20px;
    text-align: center;
    color: var(--dsb-gray-500);
}

/* ==========================================================================
   Availability Indicator
   ========================================================================== */
.dsb-availability-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--dsb-radius);
    font-size: 14px;
    margin-top: 12px;
}

.dsb-availability-status.dsb-available {
    background: var(--dsb-success-light);
    color: #155724;
}

.dsb-availability-status.dsb-unavailable {
    background: var(--dsb-danger-light);
    color: #721c24;
}

.dsb-availability-status.dsb-checking {
    background: var(--dsb-info-light);
    color: #0c5460;
}

.dsb-availability-icon {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Date Status Indicator
   ========================================================================== */
.dsb-date-status {
    margin-top: 8px;
    font-size: 13px;
}

.dsb-date-status:empty {
    display: none;
}

.dsb-date-status .dsb-checking {
    color: var(--dsb-info);
}

.dsb-date-status .dsb-available {
    color: var(--dsb-success);
}

.dsb-date-status .dsb-unavailable {
    color: var(--dsb-danger);
}

.dsb-date-status .dsb-warning {
    color: var(--dsb-warning);
}

/* ==========================================================================
   Engineer Status
   ========================================================================== */
.dsb-engineer-status {
    margin-top: 8px;
    font-size: 13px;
}

.dsb-engineer-status .dsb-warning {
    color: #856404;
}

.dsb-engineer-status .dsb-error {
    color: var(--dsb-danger);
}

/* ==========================================================================
   Price Line Items
   ========================================================================== */
.dsb-price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--dsb-gray-600);
    padding: 6px 0;
}

/* ==========================================================================
   Flatpickr Customization
   ========================================================================== */
.flatpickr-calendar {
    border-radius: var(--dsb-radius) !important;
    box-shadow: var(--dsb-shadow-lg) !important;
    border: 1px solid var(--dsb-gray-200) !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--dsb-primary) !important;
    border-color: var(--dsb-primary) !important;
}

.flatpickr-day:hover {
    background: var(--dsb-primary-light) !important;
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    color: var(--dsb-gray-400) !important;
    background: var(--dsb-gray-100) !important;
    text-decoration: line-through;
}

/* ==========================================================================
   Add-Ons Section
   ========================================================================== */
.dsb-addons-section {
    display: none;
}

.dsb-addons-category {
    margin-bottom: 20px;
}

.dsb-addons-category:last-child {
    margin-bottom: 0;
}

.dsb-addons-category-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dsb-gray-700);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--dsb-gray-200);
}

.dsb-addons-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dsb-addon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--dsb-white);
    border: 1px solid var(--dsb-gray-200);
    border-radius: var(--dsb-radius);
    transition: all var(--dsb-transition);
}

.dsb-addon-item:hover {
    border-color: var(--dsb-gray-300);
    background: var(--dsb-gray-100);
}

.dsb-addon-item.dsb-addon-required {
    background: var(--dsb-primary-light);
    border-color: var(--dsb-primary);
}

.dsb-addon-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
}

.dsb-addon-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--dsb-primary);
    cursor: pointer;
}

.dsb-addon-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.dsb-addon-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dsb-addon-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--dsb-gray-800);
}

.dsb-addon-rate {
    font-size: 13px;
    color: var(--dsb-gray-500);
}

.dsb-addon-qty-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dsb-addon-qty-label {
    font-size: 13px;
    color: var(--dsb-gray-600);
}

.dsb-addon-qty {
    width: 60px;
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid var(--dsb-gray-300);
    border-radius: var(--dsb-radius-sm);
    text-align: center;
}

.dsb-addon-qty:focus {
    outline: none;
    border-color: var(--dsb-primary);
    box-shadow: 0 0 0 2px var(--dsb-primary-light);
}

.dsb-addon-qty[readonly] {
    background: var(--dsb-gray-100);
    cursor: not-allowed;
}

.dsb-addon-required-message {
    font-size: 12px;
    color: var(--dsb-info);
    padding: 8px 16px 0;
    margin-top: -4px;
}

.dsb-no-addons {
    font-size: 14px;
    color: var(--dsb-gray-500);
    text-align: center;
    padding: 16px;
    font-style: italic;
}

/* Price breakdown add-on styles */
.dsb-price-section-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--dsb-gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-top: 4px;
}

.dsb-price-line.dsb-price-subtotal {
    font-weight: 500;
    color: var(--dsb-gray-700);
}

.dsb-price-line.dsb-price-addon {
    padding-left: 8px;
    color: var(--dsb-gray-600);
}

.dsb-addon-required-badge {
    font-size: 11px;
    font-weight: 500;
    color: var(--dsb-primary);
    background: var(--dsb-primary-light);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 4px;
}

/* ==========================================================================
   Booking Cards (Modal-based shortcode)
   ========================================================================== */
.dsb-booking-card {
    position: relative;
    display: block;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--dsb-radius-lg);
    box-shadow: var(--dsb-shadow);
    transition: transform var(--dsb-transition), box-shadow var(--dsb-transition);
    aspect-ratio: 16 / 9;
    text-decoration: none;
    color: inherit;
}

.dsb-booking-card:hover,
.dsb-booking-card:focus {
    transform: translateY(-4px);
    box-shadow: var(--dsb-shadow-lg);
    text-decoration: none;
    color: inherit;
}

.dsb-booking-card:focus {
    outline: 2px solid var(--dsb-primary);
    outline-offset: 2px;
}

.dsb-booking-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dsb-booking-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    color: var(--dsb-white);
}

.dsb-booking-card-label {
    font-size: 14px;
    opacity: 0.9;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.dsb-booking-card-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

/* ==========================================================================
   Form Modal Overlay (for card-based booking)
   ========================================================================== */
.dsb-form-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dsb-transition), visibility var(--dsb-transition);
    overflow-y: auto;
    padding: 40px 20px;
    -webkit-overflow-scrolling: touch;
}

.dsb-form-modal-overlay.dsb-visible {
    opacity: 1;
    visibility: visible;
}

.dsb-form-modal {
    position: relative;
    background: var(--dsb-white);
    border-radius: var(--dsb-radius-lg);
    max-width: 900px;
    width: 100%;
    box-shadow: var(--dsb-shadow-lg);
    transform: translateY(-20px);
    transition: transform var(--dsb-transition);
    margin: auto;
}

.dsb-form-modal-overlay.dsb-visible .dsb-form-modal {
    transform: translateY(0);
}

.dsb-form-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: var(--dsb-gray-100);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: var(--dsb-gray-600);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background var(--dsb-transition), color var(--dsb-transition);
}

.dsb-form-modal-close:hover,
.dsb-form-modal-close:focus {
    background: var(--dsb-gray-200);
    color: var(--dsb-gray-800);
}

.dsb-form-modal-close:focus {
    outline: 2px solid var(--dsb-primary);
    outline-offset: 2px;
}

.dsb-form-modal-content {
    padding: 20px;
}

/* Remove shadow/border from form card inside modal */
.dsb-form-modal .dsb-form-card {
    box-shadow: none;
    border: none;
    margin: 0;
    padding: 0;
}

/* Body scroll lock when modal is open */
body.dsb-modal-open {
    overflow: hidden;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 768px) {
    .dsb-booking-container {
        padding: 10px;
    }

    .dsb-tabs {
        flex-direction: column;
        gap: 0;
        border-bottom: none;
    }

    .dsb-tab {
        border-bottom: 1px solid var(--dsb-gray-200);
        border-left: 3px solid transparent;
        margin-bottom: 0;
        justify-content: flex-start;
    }

    .dsb-tab.dsb-tab-active {
        border-bottom-color: var(--dsb-gray-200);
        border-left-color: var(--dsb-primary);
        background: var(--dsb-primary-light);
    }

    .dsb-form-section {
        padding: 16px;
    }

    .dsb-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dsb-datetime-row {
        grid-template-columns: 1fr;
    }

    .dsb-radio-group {
        flex-direction: column;
        gap: 12px;
    }

    .dsb-submit-btn {
        width: 100%;
    }

    /* Form Modal responsive */
    .dsb-form-modal-overlay {
        padding: 20px 10px;
    }

    .dsb-form-modal-content {
        padding: 10px;
    }

    .dsb-form-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    /* Booking Cards responsive */
    .dsb-booking-card {
        aspect-ratio: 4 / 3;
    }

    .dsb-booking-card-overlay {
        padding: 16px;
    }

    .dsb-booking-card-title {
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    .dsb-price-total {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .dsb-engineer-options {
        gap: 8px;
    }

    .dsb-engineer-option {
        padding: 12px;
    }

    /* Add-ons responsive */
    .dsb-addon-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .dsb-addon-qty-wrapper {
        align-self: flex-end;
    }
}
