/* Booking Form Styles */

/* Book Now Page Specific Styles */
.booking-form-wrapper {
    background: transparent;
    padding: 0;
}

.page-booking-form-inline {
    background: #fff;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.booking-form-inner {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0,123,255,0.3);
    background: #fff;
}

.ms-btn {
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.ms-btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
}

.ms-btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.page-calendar-area {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: none;
    border: 2px solid #e9ecef;
    min-height: 100px;
}

.page-calendar-area.show {
    display: block !important;
    animation: slideDown 0.5s ease-out;
}

/* Banner Form Styles */
/* Single line form layout for home page */
.ms-banner__from-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 32px;
    padding: 5px 5px 5px 25px;
}

.ms-banner__form-select {
    flex: 1;
    min-width: 0;
}

.banner__form-button {
    flex-shrink: 0;
}

.ms-banner__form-select input[type="date"],
.ms-banner__form-select input[type="time"],
.ms-banner__form-select input[type="text"],
.ms-banner__form-select input[type="number"] {
    width: 100%;
    padding: 15px 20px;
    border: none;
    background: #fff;
    font-size: 16px;
    color: #333;
    border-radius: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Flatpickr text inputs */
.ms-banner__form-select input.flatpickr-date,
.ms-banner__form-select input.flatpickr-time {
    cursor: pointer;
    background: #fff;
    position: relative;
}

/* Add calendar/clock icon indicator */
.ms-banner__form-select input.flatpickr-date::after {
    content: '📅';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.ms-banner__form-select input[type="time"] {
    cursor: pointer;
}

.ms-banner__form-select input[type="number"] {
    text-align: center;
}

.ms-banner__form-select input[type="number"]::-webkit-inner-spin-button,
.ms-banner__form-select input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

.ms-banner__form-select input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.ms-banner__form-select input[type="date"]:focus,
.ms-banner__form-select input[type="time"]:focus,
.ms-banner__form-select input[type="text"]:focus,
.ms-banner__form-select input[type="number"]:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    background-color: #f8f9fa;
}

.ms-banner__form-select input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
    display: none; /* Hide the native calendar picker */
}

.ms-banner__form-select input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.5);
}

.ms-banner__form-select input[type="time"]:hover::-webkit-calendar-picker-indicator {
    filter: invert(0.3);
}

/* Hide native calendar picker for other browsers */
.ms-banner__form-select input[type="date"]::-webkit-inner-spin-button,
.ms-banner__form-select input[type="date"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ms-banner__form-select input[type="date"] {
    -moz-appearance: textfield; /* Firefox */
    appearance: textfield;
}

/* Prevent native calendar from opening */
.ms-banner__form-select input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    pointer-events: none;
}

/* Calendar Area Styles */
.banner-calendar-area {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: none;
    margin-top: 20px;
    border: 2px solid #e9ecef;
    min-height: 100px;
}

.banner-calendar-area.show {
    display: block !important;
    animation: slideDown 0.5s ease-out, highlightBorder 2s ease-in-out;
}

/* Add a highlight effect when slots appear */
@keyframes highlightBorder {
    0% {
        border-color: #e9ecef;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }
    50% {
        border-color: #007bff;
        box-shadow: 0 5px 30px rgba(0,123,255,0.4);
    }
    100% {
        border-color: #e9ecef;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }
}

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

/* Slots header styling */
.slots-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid #007bff;
}

.slots-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    animation: fadeInDown 0.5s ease-out;
}

.slots-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
    animation: fadeInUp 0.5s ease-out;
}

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

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

.slots-wrapper {
    max-height: 400px;
    overflow-y: auto;
}

.slot-day {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.slot-day h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 700;
    padding: 10px 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border-left: 4px solid #007bff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Add scroll hint for mobile */
@media (max-width: 768px) {
    .slot-day h4::after {
        content: " (swipe to see more →)";
        font-size: 12px;
        font-weight: 400;
        color: #6c757d;
        font-style: italic;
    }
}

.slots-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.slot-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    white-space: nowrap;
    width: 100%;
}

/* Available slots - Bright Green styling */
.slot-available {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: 2px solid #28a745;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    animation: pulse-green 2s infinite;
}

.slot-available:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838, #1e7e34);
    border-color: #1e7e34;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.4);
    cursor: pointer;
    animation: none;
}

/* Selected slot - Blue styling to indicate selection */
.slot-selected {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    border: 3px solid #0056b3 !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.5) !important;
    transform: scale(1.05) !important;
    animation: none !important;
    position: relative;
}

.slot-selected::before {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #fff;
    color: #007bff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid #007bff;
}

.slot-selected:hover {
    background: linear-gradient(135deg, #0056b3, #004085) !important;
    border-color: #004085 !important;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    }
    50% {
        box-shadow: 0 2px 12px rgba(40, 167, 69, 0.5);
    }
    100% {
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    }
}

/* Booked slots - Bright Red styling */
.slot-booked {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    border: 2px solid #dc3545;
    color: #fff;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.85;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    position: relative;
}

.slot-booked:disabled {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    border: 2px solid #dc3545;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.85;
}

.slot-booked:hover {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    border-color: #dc3545;
    color: #fff;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Add a subtle strikethrough effect for booked slots */
.slot-booked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%);
    border-radius: 1px;
}

/* Legacy disabled styling for fallback */
.slot-item:disabled {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
    cursor: not-allowed;
    opacity: 0.8;
}

.no-slots {
    color: #6c757d;
    font-style: italic;
    padding: 10px 0;
}

/* Special styling for time-based messages */
.no-slots:has-text("No more slots available today") {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px 15px;
    border-radius: 5px;
    font-style: normal;
    font-weight: 500;
}

/* Alternative approach for time-based no slots message */
.slot-day .no-slots {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 12px 15px;
    border-radius: 5px;
    margin: 5px 0;
}

.slot-day .no-slots:contains("No more slots available today") {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.loading {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
}

.success-message {
    text-align: center;
    padding: 20px;
    color: #155724;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    font-weight: 500;
    text-align: center;
}

.no-slots-message {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* Booking Modal Styles */
.booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.modal-inner {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease-out;
}

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

.modal-inner h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    border-bottom: 3px solid #007bff;
    padding-bottom: 15px;
}

/* Booking Info Notice */
.booking-info-notice {
    background: linear-gradient(135deg, #e7f3ff, #cfe2ff);
    border: 2px solid #0d6efd;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.15);
}

.booking-info-notice p {
    margin: 0;
    font-size: 13px;
    color: #084298;
    font-weight: 500;
    line-height: 1.5;
}

/* Booking Details Section */
.booking-details {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #007bff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

.booking-detail-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    font-size: 16px;
    color: #333;
}

.booking-detail-item:not(:last-child) {
    border-bottom: 1px solid #dee2e6;
}

.booking-detail-item strong {
    min-width: 100px;
    color: #007bff;
    font-weight: 600;
}

.booking-detail-item span {
    color: #495057;
    font-weight: 500;
}

.form-row {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0,123,255,0.3);
    background: #fff;
}

.form-control::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Small helper text styling */
.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.4;
}

.text-muted {
    color: #6c757d !important;
}

/* Advanced options styling */
.booking-form-inner .row:has(#page_slot_duration) {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 20px 15px;
    margin: 15px 0;
}

.booking-form-inner .row:has(#page_slot_duration)::before {
    content: '⚙️ Advanced Options';
    display: block;
    font-weight: 700;
    font-size: 16px;
    color: #495057;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

/* Center the single slot duration field */
.booking-form-inner .row:has(#page_slot_duration) .col-md-12 {
    max-width: 600px;
    margin: 0 auto;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    margin-right: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

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

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

#confirm-booking-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    flex: 1;
    max-width: 200px;
}

#confirm-booking-btn:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
}

#cancel-booking-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: #fff;
    flex: 1;
    max-width: 200px;
}

#cancel-booking-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
}



.slot-available::before {
    background-color: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.slot-booked::before {
    background-color: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

/* Slot time and status styling */
.slot-time {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
}

/* Multi-day slot styling */
.slot-time small {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.9;
    display: block;
    margin-top: 4px;
}

/* .slot-status removed - no longer used */

/* Slot capacity indicator styling */
.slot-item small {
    font-size: 10px;
    opacity: 0.9;
    font-weight: normal;
    margin-top: 2px;
}

.slot-available small {
    color: rgba(255, 255, 255, 0.9);
}

.slot-booked small {
    color: rgba(255, 255, 255, 0.9);
}

/* Slot legend styling */
.slot-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border: 2px solid #dee2e6;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.legend-indicator {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
    border: 2px solid;
}

.legend-indicator.available {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.legend-indicator.booked {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    border-color: #dc3545;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Loading animation for slot area */
.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Button alignment - move Book Studio button to the right */
.banner__form-button {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.banner__form-button .input__btn {
    margin-left: auto;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .ms-banner__from-inner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 20px;
    }
    
    .ms-banner__form-select {
        flex: 1 1 calc(50% - 5px);
        min-width: 150px;
    }
    
    .banner__form-button {
        flex: 1 1 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .page-booking-form-inline {
        border-radius: 15px;
    }
}

@media (max-width: 768px) {
    .ms-banner__from-inner {
        flex-direction: column;
        padding: 30px 20px;
    }
    
    .ms-banner__form-select {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .ms-banner__form-select input {
        border: 2px solid #e9ecef;
        border-radius: 8px;
    }
    
    .banner__form-button {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
    }
    
    .banner__form-button .input__btn {
        margin-left: 0;
        width: 100%;
    }
    
    .page-booking-form-inline {
        border-radius: 20px;
    }
    
    .slots-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .slot-item {
        font-size: 12px;
        padding: 10px 12px;
        min-height: 50px;
    }
    
    .modal-inner {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .slots-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .slot-item {
        padding: 8px 10px;
        min-height: 45px;
    }
    
    .slot-time {
        font-size: 11px;
    }
    
    .slot-item small {
        font-size: 9px;
    }
    
    .slot-legend {
        gap: 20px;
        padding: 12px;
    }
    
    .legend-item {
        font-size: 12px;
    }
    
    .legend-indicator {
        width: 14px;
        height: 14px;
    }
}
/*
 Native Select Field Styles */
.ms-banner__form-select select {
    width: 100%;
    padding: 15px 40px 15px 20px;
    border: none;
    background: #fff;
    font-size: 16px;
    color: #333;
    border-radius: 0;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

.ms-banner__form-select select:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    background-color: #f8f9fa;
}

.ms-banner__form-select select:hover {
    background-color: #f8f9fa;
}

.ms-banner__form-select select option {
    padding: 10px;
    background: #fff;
    color: #333;
}

/* Remove nice-select styles if they exist */
.ms-banner__form-select .nice-select {
    display: none !important;
}

.ms-banner__form-select select {
    display: block !important;
}

/* Time input styling */
input[type="time"].form-control {
    cursor: pointer;
}

input[type="time"].form-control::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.5);
}

input[type="time"].form-control:hover::-webkit-calendar-picker-indicator {
    filter: invert(0.3);
}
