/* Container */
.gn-slots-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 20px 0;
}

/* --- MESSAGES --- */
.gn-conflict-message {
    background-color: #fff5f5;
    border: 1px solid #dc3545;
    border-left: 5px solid #dc3545;
    color: #721c24;
    padding: 15px;
  	margin-top: 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: none; /* Hidden by default */
    animation: fadeIn 0.3s ease-in-out;
}

.gn-success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-left: 5px solid #28a745;
    color: #155724;
    padding: 20px;
  	margin-top: 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 1.1em;
    display: block; /* JS will insert it when needed */
    animation: fadeIn 0.3s ease-in-out;
}

/* --- TABS NAVIGATION --- */
.gn-tabs-nav {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}

.gn-tab-btn {
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: #555;
    border-radius: 5px 5px 0 0;
    transition: all 0.2s ease;
    
    /* Allow flex for two lines */
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.gn-tab-day { font-weight: bold; }
.gn-tab-date { font-size: 0.8em; font-weight: normal; margin-top: 2px; color: #777; }

.gn-tab-btn:hover {
    background: #e9e9e9;
    color: #000;
}

.gn-tab-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
    position: relative;
    top: 2px;
}
.gn-tab-btn.active .gn-tab-date { color: #ccc; }

/* --- TAB CONTENT --- */
.gn-tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}
.gn-tab-panel.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Day Block */
.gn-day-block {
    margin-bottom: 40px;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    border-top: none;
    overflow: hidden;
    background: #fff;
    position: relative; 
}

/* Grid Layout */
.gn-slots-grid {
    display: grid;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; 
    min-width: 100%;
}

/* Headers Row */
.gn-grid-header-row { display: contents; }

.gn-grid-header-cell {
    background: #000;
    color: #fff;
    padding: 10px 5px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
    position: sticky;
    top: 0;
    z-index: 10; 
}

/* Station Row */
.gn-station-label {
    background: #f9f9f9;
    padding: 10px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    position: sticky;
    left: 0;
    z-index: 20; 
    display: flex;
    align-items: center;
    min-width: 120px;
}

.gn-grid-header-cell:first-child {
    position: sticky;
    left: 0;
    top: 0;
    z-index: 30;
}

.gn-slot-cell {
    padding: 10px 5px;
    text-align: center;
    border-bottom: 1px solid #fff;
    border-right: 1px solid #fff;
    font-size: 0.85em;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    min-width: 80px; 
    color: #000;
    font-weight: 500;
}

.gn-slot-cell:hover { opacity: 0.9; }

/* States */
.gn-slot-cell.is-booked {
    background-color: #eee !important;
    color: #aaa;
    cursor: not-allowed;
    text-decoration: line-through;
}
.gn-slot-cell.is-selected {
    box-shadow: inset 0 0 0 3px #000;
    position: relative;
    z-index: 5;
}
.gn-slot-cell.is-empty {
    background: #fff;
    cursor: default;
}

/* --- MOBILE STYLES --- */

/* Hide hint by default */
.gn-mobile-scroll-hint { display: none; }

@media (max-width: 768px) {
    /* Show hint on mobile */
    .gn-mobile-scroll-hint {
        display: block;
        text-align: center;
        padding: 8px;
        font-size: 0.85em;
        color: #666;
        background: #f9f9f9;
        border-bottom: 1px solid #eee;
    }

    /* Smaller fonts and tighter spacing */
    .gn-grid-header-cell {
        font-size: 0.75em;
        padding: 5px 2px;
    }
    .gn-station-label {
        font-size: 0.8em;
        padding: 5px;
        min-width: 90px; /* Allow narrower left column */
    }
    .gn-slot-cell {
        min-height: 45px;
        min-width: 60px;
        font-size: 0.75em;
        padding: 5px 2px;
    }
    
    /* Adjust tab buttons */
    .gn-tab-btn {
        padding: 8px 12px;
        font-size: 0.9em;
    }
}

/* --- BOOKING CART FOOTER --- */
.gn-booking-area {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: none;
}
.gn-booking-area.active {
    display: block;
}

.gn-cart-summary h3 {
    margin-top: 0;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

.gn-cart-day-row {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.gn-cart-day-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #333;
}

.gn-cart-items {
    list-style: none;
    padding: 0 !important; /* Added !important as requested */
    margin: 0;
}

.gn-cart-items li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.95em;
    color: #555;
}

/* NEW: Totals Section */
.gn-cart-totals-block {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #ccc;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.gn-cart-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 300px;
    font-size: 0.95em;
    color: #555;
}

.gn-cart-total-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 300px;
    align-items: center;
    font-size: 1.3em;
    font-weight: bold;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    color: #000;
}

.gn-footer-actions {
    text-align: right;
    margin-top: 20px;
}

.gn-book-btn {
    background: #772f48;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    cursor: pointer;
    border-radius: 4px;
}
.gn-book-btn:hover { background: #000; }

/* Gravity Forms Wrapper */
.gn-gf-wrapper {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    display: none;
}
