/* Base Layout */
.booking-wrapper {
    width: 834px;
    margin: 0 auto;
    padding: 20px;
}

/* Side by Side Layout for Initial View */
#dateTimeSelection {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    gap: 20px;
}

.booking-container {
    width: 100%;
    position: relative;
}

/* Calendar Section */
.calendar-section {
    width: 400px;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

/* Custom Flatpickr Calendar */
.flatpickr-calendar {
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: 1px solid #eee;
    padding: 10px !important;
    border-radius: 8px;
    background: #fff;
}

.flatpickr-months {
    position: relative;
    height: 40px;
    margin-bottom: 15px;
}

.flatpickr-prev-month, .flatpickr-next-month {
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flatpickr-prev-month svg, .flatpickr-next-month svg {
    width: 16px;
    height: 16px;
}

.flatpickr-month {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flatpickr-current-month {
    position: static !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    height: auto;
    padding: 0;
}

.flatpickr-current-month span.cur-month {
    font-weight: 500;
    margin-right: 5px;
    padding: 0;
}

.flatpickr-current-month input.cur-year {
    font-weight: 500;
    padding: 0;
    margin: 0;
    height: auto;
    box-sizing: border-box;
}

.flatpickr-weekdays {
    height: 28px;
    background: transparent;
    padding: 0;
    margin-bottom: 10px;
}

.flatpickr-weekday {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    height: 28px;
    line-height: 28px;
    background: transparent;
}

.flatpickr-days {
    width: 100% !important;
    padding: 0;
}

.dayContainer {
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.flatpickr-day {
    max-width: 100%;
    width: 100%;
    height: 36px;
    line-height: 36px;
    margin: 0;
    border-radius: 0;
    border: none;
    font-size: 13px;
    font-weight: normal;
    color: #333;
    background-color: #f9f9f9;
}

.flatpickr-day:hover {
    background-color: #f0f0f0;
}

.flatpickr-day.today {
    background-color: #f0f0f0;
    border-color: transparent;
}

.flatpickr-day.today:hover {
    background-color: #e6e6e6;
}

.flatpickr-day.selected {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

.flatpickr-day.selected:hover {
    background-color: #333;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    background-color: #f9f9f9 !important;
    color: #ccc !important;
    cursor: not-allowed !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #bbb;
    background-color: #f9f9f9;
}

.flatpickr-day.today:not(.selected) {
    border-color: transparent !important;
}

/* Time Slots Section */
.time-slots-section {
    width: 400px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.selected-date-display {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: auto;
}

.time-slot-btn {
    padding: 12px;
    font-size: 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.time-slot-btn:hover:not(.disabled) {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

.time-slot-btn.selected {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.time-slot-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

/* Header Section */
.appointment-header {
    width: 834px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

.back-link {
    color: #0d6efd;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-title {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Appointment Summary Section */
.summary-view {
    width: 834px;
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: none;
    position: relative; /* Added to ensure proper positioning */
}

.summary-header {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.service-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.appointment-datetime {
    font-size: 16px;
    color: #555;
    margin-bottom: 10px;
    display: block;
}



.service-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.close-button {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prevent any unwanted transformations */
.summary-view * {
    transform: none !important;
    perspective: none !important;
}

/* Form Section */
.form-section {
    margin-top: 20px;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none;
}

/* When Form is Shown */
.booking-container.show-form #dateTimeSelection {
    display: none;
}

.booking-container.show-form .summary-view {
    display: block;
}

.booking-container.show-form .form-section {
    display: block;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Container Overrides */
.container-fluid {
    padding: 0;
}

.row {
    margin: 0;
}

.col-12, .col-md-8, .col-lg-7 {
    padding: 0;
}

/* Custom Container Width */
.text-center.border.rounded.p-3.mb-4 {
    width: 834px;
    margin: 0 auto 20px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .booking-wrapper,
    .summary-view,
    .appointment-header,
    .text-center.border.rounded.p-3.mb-4 {
        width: 100%;
        max-width: 834px;
    }
    
    #dateTimeSelection {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .calendar-section,
    .time-slots-section {
        width: 100%;
        max-width: 400px;
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .time-slots-grid {
        grid-template-columns: 1fr;
    }
}

/* Prevent any unwanted transformations */
.text-center.border.rounded.p-3.mb-4 {
    transform: none !important;
}

/* Ensure form elements are not skewed */
input, select, button {
    transform: none !important;
}