/* ==========================================
   BT BOOKING - SINGLE PAGE LAYOUT
   ========================================== */

:root {
    --bs-primary: #6366f1;
    --bs-success: #10b981;
    --bs-danger: #ef4444;
    --bs-font-size: 16px;
    --bs-form-bg: #ffffff;
    --bs-input-height: 50px;
    --bs-border-radius: 12px;
    --bs-form-align: left;
}

* {
    box-sizing: border-box;
}

/* Scope form control defaults to plugin wrapper to avoid theme bleed */
.bs-wrapper input,
.bs-wrapper select,
.bs-wrapper textarea,
.bs-wrapper button,
.bs-wrapper .bs-input,
.bs-wrapper .bs-textarea,
.bs-wrapper .bs-btn {
    font-family: inherit;
    font-size: inherit;
    line-height: 1.3;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
    background: white;
}


.bs-wrapper {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--bs-font-size);
}

/* Tabs */
.bs-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.bs-tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    font-size: 1em;
    font-weight: 700;
    background: #72529B;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: var(--bs-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.bs-tab-btn:hover {
    transform: translateY(-2px);
    color: #6366f1;
    border-color: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.bs-tab-btn.active {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.3);
}

/* Tab Content */
.bs-tab-content {
    display: none;
}

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

/* Single Page Form Layout */
.bs-single-page-form {
    display: grid;
    grid-template-columns: 1fr 1fr; /* both columns equal width */
    gap: 25px;
    align-items: start;
} 

.bs-left-column,
.bs-right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Section Cards */
.bs-section-card {
    background: var(--bs-form-bg);
    border-radius: var(--bs-border-radius);
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #f3f4f6;
    transition: all 0.3s ease;
}

.bs-section-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: #e5e7eb;
}

.bs-section-title {
    font-size: 1.3em;
    font-weight: 800;
    color: var(--bs-primary);
    margin: 0 0 20px 0;
    text-align: var(--bs-form-align);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Calendar Styling */
#bs-calendar,
#reschedule-calendar {
    width: 100%;
    border-radius: var(--bs-border-radius);
    overflow: hidden;
}

.flatpickr-calendar {
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
}

/* Center month header and make arrows bolder */
.flatpickr-months {
    background: var(--bs-primary) !important;
    padding: 10px 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
}

/* Center flatpickr inner container contents to align month header and arrows */
.flatpickr-innerContainer {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

/* Ensure the inner month container uses flex so items align center vertically */
.flatpickr-months .flatpickr-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 80% !important; /* limit header content to 80% width */
    max-width: 900px !important;
    margin: 0 auto !important; /* center the 80% block */
    position: relative !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    /* prevent absolute positioning from pushing them to the top */
    position: relative !important;
    top: auto !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 6px !important;
    margin: 0 !important;
}

/* Center SVGs inside the arrow containers */
.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    display: block !important;
    margin: 0 auto !important;
    /*vertical-align: middle !important;*/
    fill: white !important;
    width: 18px !important;
    height: 18px !important;
}

.flatpickr-prev-month svg path,
.flatpickr-next-month svg path,
.flatpickr-prev-month svg line,
.flatpickr-next-month svg line {
    stroke: white !important;
    stroke-width: 2px !important;
}

.flatpickr-current-month {
    color: white !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin: 0 !important;
}

.flatpickr-weekdays {
    background: #f9fafb !important;
    padding: 10px 0 !important;
}

.flatpickr-weekday {
    color: #6b7280 !important;
    font-weight: 700 !important;
}

.flatpickr-day {
    border-radius: 8px !important;
    margin: 2px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.flatpickr-day:hover {
    background: var(--bs-primary) !important;
    color: white !important;
    transform: scale(1.05) !important;
}

.flatpickr-day.selected {
    background: var(--bs-primary) !important;
    color: white !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4) !important;
}

.flatpickr-day.today {
    border: 2px solid var(--bs-primary) !important;
    color: var(--bs-primary) !important;
    font-weight: 800 !important;
}

/* Time Row */
.bs-time-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Duration Badge */
.bs-duration-badge {
    background: linear-gradient(145deg, #eef2ff, #e0e7ff);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--bs-border-radius);
    padding: 15px;
    text-align: center;
    color: #374151;
    font-weight: 600;
    margin-top: 15px;
}

.bs-duration-badge strong {
    color: var(--bs-primary);
    font-size: 1.2em;
}

/* Form Groups */
.bs-form-group {
    margin-bottom: 20px;
}

.bs-form-group label {
    display: block;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
    text-align: var(--bs-form-align);
    font-size: 0.9em;
}

/* Inputs */
.bs-wrapper .bs-input,
.bs-wrapper .bs-textarea {
    width: 100%;
    height: var(--bs-input-height);
    padding: 0 15px;
    font-size: 1em;
    border: 2px solid #e5e7eb;
    border-radius: var(--bs-border-radius);
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
} 

.bs-wrapper .bs-textarea {
    height: auto;
    padding: 15px;
    resize: vertical;
} 

.bs-wrapper .bs-input:focus,
.bs-wrapper .bs-textarea:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
} 

.bs-wrapper .bs-input:hover,
.bs-wrapper .bs-textarea:hover {
    border-color: var(--bs-primary);
} 

.bs-help-text {
    display: block;
    font-size: 0.85em;
    color: #6b7280;
    margin-top: 5px;
    font-style: italic;
}

/* Buttons */
.bs-wrapper .bs-btn {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.05em;
    font-weight: 700;
    border: none;
    border-radius: var(--bs-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
} 

.bs-wrapper .bs-btn-primary {
    background: var(--bs-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
} 

.bs-wrapper .bs-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
} 

.bs-wrapper .bs-btn-success {
    background: var(--bs-success);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
} 

.bs-wrapper .bs-btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
} 

.bs-wrapper .bs-btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
} 

.bs-wrapper .bs-btn-secondary:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
} 

.bs-wrapper .bs-btn-danger {
    background: var(--bs-danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
} 

.bs-wrapper .bs-btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
} 

.bs-wrapper .bs-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
} 

/* Result Messages */
.bs-result {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: var(--bs-border-radius);
    font-weight: 600;
    display: none;
}

.bs-success {
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-left: 5px solid var(--bs-success);
}

.bs-error {
    background: linear-gradient(145deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-left: 5px solid var(--bs-danger);
}

/* Info Box */
.bs-info-box {
    background: #f9fafb;
    border-radius: var(--bs-border-radius);
    padding: 20px;
    border-left: 5px solid var(--bs-primary);
    line-height: 1.8;
}

.bs-info-box p {
    margin: 8px 0;
}

.bs-info-box strong {
    color: #374151;
}

/* Preview Modal */
.bs-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.bs-modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: auto;
    animation: modalSlideIn 0.3s ease;
}

/* Large screens: use left/right 30% margins, keep normal vertical spacing */
@media (min-width: 992px) {
    .bs-modal-content {
        position: relative !important;
        margin: 0% 30% !important; /* top/bottom 5%, left/right 30% */
        width: auto !important;
        height: auto !important;
        padding: 30px !important;
        max-width: none !important;
        max-height: 100vh !important;
        overflow: auto !important;
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35) !important;
    }
}

/* Small screens: ensure modal remains usable and full-width with standard margins */
@media (max-width: 991px) {
    .bs-modal-content {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin: 5% auto !important;
        width: 90% !important;
        max-width: 700px !important;
        max-height: 80vh !important;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bs-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bs-modal-close:hover {
    color: var(--bs-danger);
    transform: scale(1.2);
}

.bs-modal-title {
    font-size: 2em;
    font-weight: 800;
    color: #374151;
    margin: 0 0 10px 0;
}

.bs-modal-subtitle {
    color: #6b7280;
    margin: 0 0 30px 0;
    font-size: 1.05em;
}

/* Preview Grid */
.bs-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.bs-wrapper .bs-preview-item {
    background: #f9fafb;
    border-radius: var(--bs-border-radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border: 2px solid #f3f4f6;
    transition: all 0.3s ease;

    /* Limit preview item width and center within grid cells */
    max-width: 560px; /* adjust this value to change width */
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.bs-preview-item:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.bs-preview-item.bs-preview-price-box {
    grid-column: 1 / -1;
    background: linear-gradient(145deg, #eef2ff, #e0e7ff);
    border-color: rgba(99, 102, 241, 0.3);
}

.bs-preview-icon {
    font-size: 2em;
    line-height: 1;
    flex-shrink: 0;
}

.bs-preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bs-preview-label {
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.5px;
}

.bs-preview-value {
    font-size: 1.05em;
    font-weight: 600;
    color: #374151;
    line-height: 1.5;
}

.bs-preview-price {
    font-size: 2.2em !important;
    font-weight: 900 !important;
    color: var(--bs-primary) !important;
}

/* Modal Actions */
.bs-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Cancel Layout */
.bs-cancel-layout {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 1200px) {
    .bs-single-page-form {
        grid-template-columns: 1fr 1fr; /* maintain equal width until the single-column breakpoint */
    }
}

@media (max-width: 992px) {
    .bs-single-page-form {
        grid-template-columns: 1fr;
    }
    
    .bs-preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .bs-wrapper {
        padding: 15px;
    }
    
    .bs-tabs {
        flex-direction: column;
    }
    
    .bs-tab-btn {
        min-width: 100%;
    }
    
    .bs-section-card {
        padding: 20px;
    }
    
    .bs-section-title {
        font-size: 1.2em;
    }
    
    .bs-time-row {
        grid-template-columns: 1fr;
    }
    
    .bs-modal-content {
        width: 95%;
        padding: 30px 20px;
        margin: 10% auto;
    }
    
    .bs-modal-title {
        font-size: 1.6em;
    }
    
    .bs-modal-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        --bs-font-size: 14px;
        --bs-input-height: 45px;
    }
    
    .bs-section-title {
        font-size: 1.1em;
    }
    
    .bs-wrapper .bs-btn {
        padding: 12px 20px;
    }
}

/* Ensure no overflow */
.bs-wrapper,
.bs-wrapper * {
    max-width: 100%;
}

body {
    overflow-x: hidden;
}