/* Shop Selection Overlay Styles */
.shop-selection-overlay {
    position: fixed !important;
    top: 66px !important; /* Leave space for navigation bar (adjust this value based on your nav height) */
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 60px) !important; /* Adjust height to account for nav bar */
    background-color: white !important;
    z-index: 100 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
}

/* Debug: Force visibility when no shop is selected */
#shop-selection-overlay:not(.hidden) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hide UI elements when shop-selection-overlay class is present */
body.shop-overlay-active #main-content {
    display: none !important;
}

body.shop-overlay-active .modal-container:not(#seats_table):not(#calendar) {
    display: none !important;
}

/* Ensure shop selection overlay is always visible when active */
body.shop-overlay-active #shop-selection-overlay {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Allow calendar modal to show even when shop overlay is active */
body.shop-overlay-active .modal-container#calendar {
    display: block;
}

/* Hide shop selection overlay by default */
#shop-selection-overlay.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.shop-selection-content {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.shop-selection-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
}

.shop-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shop-selection-btn {
    /* background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%); */
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    min-height: 50px;
}

.shop-selection-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    /* background: linear-gradient(135deg, #357ABD 0%, #2968A3 100%); */
    background: #4A90E2;

}

.shop-selection-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .shop-selection-overlay {
        top: 50px; /* Adjust for smaller nav on tablet */
        height: calc(100% - 50px);
    }
    
    .shop-selection-content {
        max-width: 300px;
    }
    
    .shop-selection-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .shop-selection-btn {
        padding: 12px 25px;
        font-size: 14px;
        min-height: 45px;
    }
}

@media (max-width: 480px) {
    .shop-selection-overlay {
        top: 50px; /* Adjust for mobile nav height */
        height: calc(100% - 50px);
        padding: 15px;
    }
    
    .shop-selection-content {
        max-width: 100%;
    }
}

/* Seats table modal - lower z-index */
.modal-container#seats_table {
    z-index: 2000 !important;
}

.modal-container#seats_table .modal-body {
    background-color: white;
    border-radius: 10px;
    max-width: 600px;
    margin: 50px auto;
    z-index: 99 !important;
}

/* Calendar modal - higher z-index to appear on top */
.modal-container#calendar {
    z-index: 2002 !important;
}

.modal-container#calendar .modal-body {
    z-index: 2003 !important;
}

/* General modal styling for seats_table */
.modal-container#seats_table .title {
    color: #333;
    font-weight: bold;
    font-size: 18px;
}

/* Header logo styling */
/* .modal-header .header-logo {
    height: 40px;
    width: auto;
    max-width: 150px;
    margin-bottom: 10px;
} */

/* Header divider line */
.modal-header .header-divider {
    width: 80%;
    height: 1px;
    background-color: #ddd;
    border: none;
    margin: 10px 0;
}

/* Adjust modal header layout for vertical stacking */
.modal-container#seats_table .modal-header {
    padding: 20px;
    position: relative;
    flex-direction: column;
}

.modal-container#seats_table .modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Date/Time section styling */
.date-time-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.date-selectors select {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 16px;
    min-width: 60px;
    text-align: center;
}

.calendar-icon {
    display: flex;
    align-items: center;
}

.instruction-text {
    color: #666;
    margin: 10px 0;
}

/* Table styling to match the image */
.availability-table {
    border: 1px solid #ddd;
    border-radius: 0px;
    overflow: hidden;
    position: relative;
}

.table-scroll-container {
    max-height: 400px;
    overflow: auto;
    background-color: white;
    position: relative;
}

.availability-table-main {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.table-header-row {
    /* background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%); */
    background: #4A90E2;
    position: sticky;
    top: 0;
    z-index: 10;
}

.time-header, .seat-header {
    /* background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%); */
    background: #4A90E2;
    color: white;
    text-align: center;
    padding: 8px 3px;
    font-weight: bold;
    font-size: 9px;
    border-right: 1px solid rgba(255,255,255,0.2);
    position: sticky;
    top: 0;
    z-index: 11;
}

.time-header {
    min-width: 40px;
    width: 40px;
    position: sticky;
    left: 0;
    z-index: 12;
}

.seat-header {
    min-width: 20px;
}

/* First header cell (top-left corner) - sticky in both directions */
.seat-header:first-child {
    position: sticky;
    left: 0;
    z-index: 13;
}

/* Table body styling */
.availability-table-main tbody tr {
    border-bottom: 0.3px solid #eee;
}

.availability-table-main tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.availability-table-main tbody tr:nth-child(odd) {
    background-color: white;
}

.availability-table-main tbody td {
    text-align: center;
    padding: 2px 1px;
    border-right: 0.3px solid #eee;
    vertical-align: middle;
}

.time-slot, .seat-type-name {
    font-weight: bold;
    color: #333;
    background-color: #f5f5f5 !important;
    border-right: 0.3px solid #ddd;
    position: sticky;
    left: 0;
    z-index: 9;
    min-width: 60px;
    font-size: 11px;
    padding: 2px 1px;
}

/* Circle styling to match the image */
.availability-circle {
    width: 16px;
    height: 16px;
    border: 1px solid #4A90E2;
    border-radius: 50%;
    display: inline-block;
    cursor: default;
    background-color: white;
    transition: all 0.2s ease;
    position: relative;
}

/* .availability-circle:hover:not(.unavailable) {
    background-color: #e3f2fd;
    transform: scale(1.1);
} */

.availability-circle.selected {
    background-color: #4A90E2;
    border-color: #357ABD;
}

.availability-circle.unavailable {
    border-color: #ccc;
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.availability-circle.unavailable::before {
    content: "×";
    color: #999;
    font-size: 8px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

/* Scrollbar styling */
.table-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.table-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.table-scroll-container::-webkit-scrollbar-thumb {
    background: #4A90E2;
    border-radius: 3px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #357ABD;
}

.reservation_date_text {
    border: none;
    background-color: transparent;
    outline: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 16px;
    padding: 2px 4px;
}

.reservation_date_text:focus {
    outline: none;
    background-color: #f8f9fa;
}

/* Style the date input container */
.date-selectors .input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    background-color: white;
    min-height: 40px;
    align-items: center;
}

.date-selectors .input:hover {
    border-color: #4A90E2;
}

/* Responsive adjustments */
@media (max-width: -200px) {
    .modal-container#seats_table .modal-body {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .seat-header, .time-header {
        font-size: 8px;
        padding: 6px 2px;
    }
    
    .availability-circle {
        width: 14px;
        height: 14px;
    }
}

/* Back button styling */
.back-to-shops-btn {
    background-color: #f8f9fa;
    border: 2px solid #4A90E2;
    color: #4A90E2;
    font-weight: bold;
    padding: 12px 30px;
    border-radius: 25px;
    transition: all 0.3s ease;
    min-width: 200px;
    display: block;
    margin: 0 auto;
}

.back-to-shops-btn:hover {
    background-color: #4A90E2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

/* Late Night Confirmation Box Styling */
.late-night-confirmation-box {
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
    margin: 10px 0;
}

.late-night-confirmation-box .fs-14 {
    color: #dc3545;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

.late-night-confirmation-box .fs-12 {
    color: #dc3545;
    display: block;
    margin-bottom: 12px;
    line-height: 1.4;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.late-night-confirm {
    width: 16px;
    height: 16px;
    margin: 0;
}

.checkbox-label {
    color: #dc3545;
    font-size: 14px;
    margin: 0;
    cursor: pointer;
    user-select: none;
}