:root {
    --primary-color: #007bff;
    --button-color: #0056b3;
    --button-text-color: #ffffff;
}


body {
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

.hidden {
    display: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.hotel-header {
    width: 100%;
    margin-bottom: 30px;
}

.header-image {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.header-image h1 {
    color: white;
    font-size: 2.5em;
    position: relative;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: none;
}

.hotel-name-bar {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
}

.hotel-name-bar h1 {
    margin: 0;
    font-size: 1.8em;
}

.hotel-name-bar a {
    color: inherit;
    text-decoration: none;
}

.main-container {
    min-height: calc(100vh - 65px);
}

/* Booking Steps */
.booking-step {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.booking-step h2 {
    color: #333;
    margin: 0 0 20px 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.form-row {
    display: flex;
    gap: 50px;
    margin-bottom: 15px;
    align-items: center;
}

.form-group.half {
    flex: 1;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    background-color: white;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
}

button {
    background: var(--button-color);
    color: var(--button-text-color);
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.2s;
    max-height: 45px;
}

button:hover {
    /* background: var(--primary-color); */
    opacity: 0.9;
}

/* Room Grid */
.room-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Room Card */
.room-card {
    display: flex;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    min-height: 300px;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.room-image {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    position: relative;
    padding: 15px;
}

.room-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 385px;
}

.room-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.room-details {
    flex: 1;
    /* padding-right: 60px; */
    /* Space for capacity badge */
}

.room-details h3 {
    color: #333;
    font-size: 1.3em;
    margin: 0 0 12px 0;
    /* border-bottom: 1px solid rgba(0, 123, 255, 0.2); */
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
    width: 100%;
}

.description {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 16px;
}

.features h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1em;
}

.room-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    /* vertical horizontal */
}

.room-features li {
    padding-left: 16px;
    position: relative;
    color: #666;
    flex: 0 1 auto;
    font-size: 0.9em;
}

.room-features li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.room-info {
    display: none;
}

/* Capacity Badge */
.capacity-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    /* align-items: center; */
    gap: 5px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 6px;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
    border: 1px solid var(--primary-color);
}

.capacity-badge svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

.capacity-badge span {
    font-weight: bold;
    color: var(--primary-color);
}

.room-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: auto;
    padding-top: 16px;
}

.price-tag {
    display: flex;
    flex-direction: column;
    margin-right: 10px;
}


.price-label {
    font-size: 0.9em;
    color: #666;
}

.price-amount {
    /* font-size: 1.8em; */
    font-size: 1.4em;
    font-weight: bold;
    /* color: var(--primary-color); */
    line-height: 1;
}

.price-period {
    font-size: 0.9em;
    color: #666;
}

.price-note {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
    font-style: italic;
    line-height: 1.3;
    max-width: 300px;
}

.book-now {
    background: var(--button-color);
    color: var(--button-text-color);
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.2s;
}

.book-now:hover {
    /* background: var(--primary-color); */
    opacity: 0.9;
}

.book-now:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#availableRooms {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.rate-options {
    flex: 1;
    margin-top: 15px;
    border-top: 1px solid #eee;
    /* padding-top: 15px; */
}

.rate-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.rate-option:last-child {
    border-bottom: none;
}

.rate-info {
    display: flex;
    flex-direction: column;
}

.rate-label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
    padding-bottom: 4px;
}

.rate-price {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.book-rate-btn {
    background-color: var(--button-color);
    color: var(--button-text-color);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.book-rate-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.book-rate-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Unavailable Room Styles */
.unavailable-room {
    position: relative;
}

.unavailable-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
}

.hidden-room {
    opacity: 0;
    transform: translateY(20px);
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, max-height 0.3s ease-in-out, margin 0.3s ease-in-out;
    display: none;
}

.view-all-container {
    text-align: center;
    margin: 20px 0;
    transition: opacity 0.3s ease-in-out;
    display: none;
}

.view-all-button {
    background: var(--button-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

.view-all-button:hover {
    background: var(--button-color);
}



/* Confirmation Page Styles */
/* Enhanced Confirmation Page Styles */
.confirmation-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.confirmation-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.confirmation-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 2em;
}

.success-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #28a745;
    color: white;
    border-radius: 50%;
    font-size: 35px;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.2);
}

.booking-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.booking-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.booking-section h2 {
    color: var(--primary-color);
    font-size: 1.3em;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.booking-reference {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    background: #28a745;
    color: white;
}

.status-pending {
    background-color: #ffc107;
    color: #000;
}

.success-icon.pending {
    background: #ffc107;
}

.payment-reminder {
    border-left: 4px solid #ffc107;
    margin-top: 20px;
}

.payment-reminder h2 {
    color: #ffc107;
}

.payment-reminder ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.payment-reminder ul li {
    padding: 5px 0;
}

.payment-warning {
    color: #dc3545;
    font-weight: bold;
    margin-top: 15px;
}

.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.feature-tag {
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9em;
}

.return-home {
    text-align: center;
    margin-top: 40px;
}

.return-button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--button-color);
    color: var(--button-text-color);
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.2s ease;
}

.return-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.highlight-button {
    animation: pulse 2s infinite;
    position: relative;
}

/* Image Carousel Styles */
.image-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
    max-height: 385px;
    /* Consistent aspect ratio for all images */
}

.carousel-images {
    position: relative;
    width: 100%;
    height: 100%;
    /* FIX: Removed redundant aspect-ratio. The parent .image-carousel now controls the geometry.
       This is a key part of the fix for Safari. */
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.carousel-image.active {
    opacity: 1;
}

/* Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 3;
    opacity: 0;
    padding: 0;

    /* Accessibility improvements */
    border: 2px solid transparent;
}

/* Show navigation on hover */
.image-carousel:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}



.carousel-nav.prev {
    left: 8px;
}

.carousel-nav.next {
    right: 8px;
}

/* Indicators - Always visible for multiple images */
.carousel-indicators {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
    opacity: 1;
    /* Always visible */
    transition: opacity 0.2s ease;
    padding: 0;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid white;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding: 0;

    /* Accessibility improvements */
    border: 2px solid white;
    outline: none;
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}

.carousel-indicator:hover,
.carousel-indicator:focus {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
    outline: none;
    /* Remove default focus outline */
}

/* Hide navigation elements when there's only one image */
.image-carousel:not([data-multiple-images]) .carousel-nav,
.image-carousel:not([data-multiple-images]) .carousel-indicators {
    display: none;
}

/* Consistent aspect ratios for all images (desktop and mobile) */
.room-image img:not(.carousel-image) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* aspect-ratio: 4/3; */
    max-height: 385px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .room-image {
        /* min-height: 200px; */
        max-height: 385px;
        /* aspect-ratio: 4/3; */
        /* Consistent aspect ratio for all images */
    }

    /* Regular images - ensure consistent sizing */
    .room-image img:not(.carousel-image) {
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* aspect-ratio: 4/3; */
    }

    .image-carousel {
        height: 100%;
        min-height: 200px;
        aspect-ratio: 4/3;
    }

    .carousel-images {
        height: 100%;
        /* FIX: Removed redundant min-height and aspect-ratio from the child element.
           This was causing layout conflicts in Safari. The element will now correctly
           fill its parent, which defines the dimensions. */
    }

    .carousel-nav {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .carousel-nav.prev {
        left: 5px;
    }

    .carousel-nav.next {
        right: 5px;
    }

    .carousel-indicators {
        bottom: 5px;
    }

    .carousel-indicator {
        width: 6px;
        height: 6px;
    }

    /* Always show nav controls on mobile since there's no hover */
    .image-carousel .carousel-nav {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--button-color-rgb), 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(var(--button-color-rgb), 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(var(--button-color-rgb), 0);
    }
}

@media screen and (max-width: 768px) {
    .confirmation-container {
        margin: 20px;
        padding: 20px;
    }

    .booking-section {
        padding: 15px;
    }

    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .price-note {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}

/* } */
@media screen and (max-width: 900px) {
    .room-card {
        flex-flow: column;
    }

    .room-image {

        flex: none;
        max-width: 100%;
    }

    .form-row {
        flex-flow: column;
        gap: 0;
    }

    .form-group input {
        width: 100%;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 1em;
        box-sizing: border-box;
    }

    .form-group.half {
        width: 100%;
    }
}

.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    overflow: auto;
}

.lightbox-content {
    position: relative;
    max-width: 1200px;
    max-height: 90vh;
    margin: 5vh auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.lightbox-header {
    padding: 15px 20px;
    background: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    min-height: 24px;
    position: relative;
    z-index: 1;
}

.lightbox-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.lightbox-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-image-container {
    position: relative;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    /* aspect-ratio: 4/3; */
    margin: 50px;
}

.lightbox-image {
    max-width: 100%;
    /* max-height: 100%; */
    object-fit: contain;
    transition: opacity 0.3s ease;
    max-height: 600px;
}

/* Lightbox carousel navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    max-height: 50px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 15px;
}

.lightbox-nav.next {
    right: 15px;
}

.lightbox-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: white;
}

.lightbox-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.lightbox-indicator.active {
    background: var(--primary-color);
}

.lightbox-indicator:hover {
    transform: scale(1.2);
}

/* Hide navigation for single images */
.lightbox-single-image .lightbox-nav,
.lightbox-single-image .lightbox-indicators {
    display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .lightbox-image-container {
        margin: 0;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 2.5vh auto;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }

    .lightbox-indicator {
        width: 10px;
        height: 10px;
    }
}