/* =========================================================
   RESERVATION FORM WRAPPER
========================================================= */
.reservation-form-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border: 1px solid #7a1f2b;
    border-radius: 5px;
    overflow: hidden;
    background: #ffffff;
    box-sizing: border-box;
}

/* =========================================================
   FORM TITLE BAR
========================================================= */
.reservation-form-titlebar {
    max-width: 1000px;
    margin: 0 auto;
    background: #17324d;
    padding: 22px 28px;
    border-radius: 5px 5px 0 0;
}

.reservation-form-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.reservation-form-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    flex-shrink: 0;
}

.reservation-form-brand h1 {
    margin: 0;
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 700;
}

.reservation-form-brand p {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
}

/* =========================================================
   FORM
========================================================= */
.ngueye-reservation-form {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* =========================================================
   COLLAPSIBLE SECTIONS
========================================================= */
.reservation-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    margin-bottom: 16px;
    overflow: hidden;
    padding: 0;
}

.reservation-section-toggle {
    width: 100%;
    border: 0;
    background: #e2e5e9;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
    scroll-margin-top: 0;
}

.reservation-section-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.reservation-section-title strong {
    font-size: 1.05rem;
    color: #263747;
}

.reservation-section-title small {
    color: #718096;
    font-size: 0.85rem;
    font-weight: 400;
}

.reservation-section-arrow {
    font-size: 1.3rem;
    color: #475569;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.reservation-section.is-open .reservation-section-toggle {
    background: #7a1f2b;
}

.reservation-section.is-open .reservation-section-title strong {
    color: #ffffff;
}

.reservation-section.is-open .reservation-section-title small {
    color: rgba(255, 255, 255, 0.78);
}

.reservation-section.is-open .reservation-section-arrow {
    transform: rotate(180deg);
    color: #ffffff;
}

.reservation-section-content {
    display: none;
    padding: 22px;
}

.reservation-section.is-open .reservation-section-content {
    display: block;
}

/* =========================================================
   GRID LAYOUT - 2 columns on PC, 1 on mobile
========================================================= */
.reservation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.reservation-full-width {
    grid-column: 1 / -1;
}

/* =========================================================
   FORM FIELDS
========================================================= */
.reservation-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reservation-field label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #2d3748;
}

.reservation-field label span {
    font-weight: 400;
    color: #718096;
    font-size: 0.85rem;
}

.reservation-field input,
.reservation-field select,
.reservation-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d7dee5;
    border-radius: 5px;
    background-color: #f8f9fa;
    font-family: inherit;
    font-size: 1rem;
    color: #263747;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.reservation-field input:focus,
.reservation-field select:focus,
.reservation-field textarea:focus {
    outline: none;
    border-color: #17324d;
    box-shadow: 0 0 0 3px rgba(23, 50, 77, 0.12);
}

.reservation-field input[readonly] {
    background-color: #f8f9fa;
    color: #4a5568;
    cursor: not-allowed;
}

.reservation-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* =========================================================
   ROOM IMAGE
========================================================= */
.reservation-room-image {
    width: 100%;
    height: 460px;
    margin: 18px 0;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    background: #f7fafc;
}

.reservation-room-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    background: #f7fafc;
}

/* =========================================================
   ROOM CARDS
========================================================= */
.reservation-room {
    background: #f7fafc;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.reservation-room h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 16px 0;
}

.reservation-room .reservation-grid:last-child {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* =========================================================
   ADDITIONAL ROOM BUTTON
========================================================= */

.additional-room-action {
    display: flex;
    justify-content: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.additional-room-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 10px 22px;

    border: none;
    border-radius: 5px;

    background: #007bff;
    color: #ffffff;

    font-weight: 600;
    font-size: 0.95rem;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.2s ease;
}

.additional-room-btn:hover {
    background: #0069d9;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}

.additional-room-btn:active {
    background: #005cbf;
    transform: scale(0.98);
}

.additional-room-icon {
    font-size: 1.2rem;
    font-weight: 700;
}
/* =========================================================
   CHECKBOXES
========================================================= */
.reservation-checkbox {
    margin: 12px 0;
}

.reservation-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: #2d3748;
    cursor: pointer;
    line-height: 1.5;
}

.reservation-checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #17324d;
}

/* =========================================================
   CAPTCHA
========================================================= */
.reservation-captcha {
    background: #f7fafc;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.reservation-captcha p {
    margin: 0 0 4px 0;
    font-weight: 500;
    color: #2d3748;
}

.reservation-captcha strong {
    font-size: 1.2rem;
    color: #1a202c;
    display: block;
    margin-bottom: 12px;
}

/* =========================================================
   SUBMIT BUTTON
========================================================= */
.reservation-submit {
    text-align: center;
    margin-top: 45px;
    margin-bottom: 45px;
}

.reservation-submit-btn {
    width: 50%;
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.2s ease;
}

.reservation-submit-btn:hover {
    background-color: #0069d9;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}

.reservation-submit-btn:active {
    background-color: #005cbf;
    transform: scale(0.98);
}

/* =========================================================
   SELECTED ROOM PREVIEW
========================================================= */
.reservation-room-preview {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    width: 100%;
    margin-top: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    background: #ffffff;
}

.reservation-room-preview[hidden] {
    display: none !important;
}

.reservation-room-preview .reservation-room-image {
    width: 100%;
    height: 420px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #f7fafc;
}

.reservation-room-preview .reservation-room-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

/* =========================================================
   ROOM DETAILS
========================================================= */
.reservation-room-details {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.selected-room-name {
    margin: 0 0 12px;
    color: #7a1f2b;
    font-size: 1.35rem;
    font-weight: 700;
}

.selected-room-description {
    margin: 0 0 20px;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

.selected-room-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.selected-room-fact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f3f5f7;
    border-radius: 4px;
    color: #2d3748;
    font-size: 0.9rem;
    font-weight: 600;
}

.selected-room-fact i {
    color: #7a1f2b;
}

.selected-room-amenities h5 {
    margin: 0 0 10px;
    color: #2d3748;
    font-size: 0.95rem;
    font-weight: 700;
}

.selected-room-amenities-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-room-amenity {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    font-size: 0.9rem;
}

.selected-room-amenity i {
    color: #7a1f2b;
    width: 16px;
}

/* =========================================================
   BACK TO HOME BUTTON
========================================================= */
.reservation-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding: 5px 15px;
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.2s ease;
}

.reservation-home-link:hover {
    background-color: #0069d9;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}

.reservation-home-link:active {
    background-color: #005cbf;
    color: #ffffff;
    transform: scale(0.98);
}

.reservation-home-link-bottom {
    display: flex;
    width: fit-content;
    margin: 18px auto 0;
}

/* =========================================================
   FORM FOOTER
========================================================= */
.reservation-form-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    padding: 12px 16px;
    background: #f3f5f7;
    border-top: 1px solid #d7dee5;
    box-sizing: border-box;
}

.reservation-form-footer p {
    margin: 0;
    color: #4a5568;
    font-size: 0.82rem;
    font-weight: 500;
    text-align: center;
}

.reservation-footer-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

/* =========================================================
   RESPONSIVE - TABLETS & MOBILE (max-width: 768px)
========================================================= */
@media (max-width: 768px) {
    /* Grid override */
    .ngueye-reservation-form .reservation-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px !important;
    }

    .ngueye-reservation-form .reservation-field {
        width: 100%;
        min-width: 0;
        grid-column: 1 / -1 !important;
    }

    #ngueyeReservationForm .reservation-grid {
        display: grid !important;
        grid-template-columns: 100% !important;
        grid-template-rows: auto !important;
        gap: 14px !important;
        width: 100% !important;
    }

    #ngueyeReservationForm .reservation-grid > .reservation-field {
        grid-column: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    #ngueyeReservationForm .reservation-field input,
    #ngueyeReservationForm .reservation-field select,
    #ngueyeReservationForm .reservation-field textarea {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Section content */
    .reservation-section-content {
        padding: 16px;
    }

    .reservation-room {
        padding: 14px;
    }

    .reservation-room-image {
        height: 320px;
    }

    .reservation-submit-btn {
        width: 100%;
    }

    .reservation-form-titlebar {
        padding: 16px;
        border-radius: 5;
    }

    .reservation-form-logo {
        width: 55px;
        height: 55px;
    }

    .reservation-form-brand {
        gap: 12px;
    }

    .reservation-form-brand h1 {
        font-size: 1.15rem;
    }

    .reservation-form-brand p {
        font-size: 0.8rem;
    }

    .ngueye-reservation-form {
        padding: 10px;
    }

    /* Room preview - stacked, details on top */
    .reservation-room-preview {
        display: flex;
        flex-direction: column;
    }

    .reservation-room-details {
        order: 1;
        padding: 18px 14px;
    }

    .reservation-room-preview .reservation-room-image {
        order: 2;
        height: 300px;
    }

    .selected-room-name {
        font-size: 1.2rem;
    }

    .selected-room-facts {
        flex-direction: column;
        align-items: stretch;
    }
}

/* =========================================================
   RESPONSIVE - SMALL PHONES (max-width: 480px)
========================================================= */
@media (max-width: 480px) {
    .ngueye-reservation-form {
        padding: 6px;
    }

    .reservation-section-content {
        padding: 12px;
    }

    .reservation-room {
        padding: 10px;
    }

    .reservation-room-image {
        height: 240px;
    }

    .reservation-checkbox label {
        font-size: 0.85rem;
    }

    .reservation-form-footer {
        gap: 8px;
        padding: 10px 6px;
    }

    .reservation-footer-logo {
        width: 24px;
        height: 24px;
    }

    .reservation-form-footer p {
        font-size: 0.72rem;
    }
}

/* ============================================================
   SELECTED ROOM PRICE
============================================================ */
.selected-room-price {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;

    margin: 0.25rem 0 1rem;
    padding: 0.55rem 1.15rem;

    background: linear-gradient(
        135deg,
        #fdf8e9 0%,
        #faf1d4 100%
    );
    border: 1px solid rgba(122, 31, 43, 0.18);
    border-left: 3px solid #7a1f2b;
    border-radius: 5px;

    width: fit-content;

    box-shadow: 0 2px 6px rgba(122, 31, 43, 0.05);
}

.selected-room-price[hidden] {
    display: none !important;
}

.selected-room-price-amount {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: #7a1f2b;
    line-height: 1;
    letter-spacing: -0.5px;
}

.selected-room-price-currency {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #17324d;
    opacity: 0.85;
}

.selected-room-price-unit {
    font-size: 0.78rem;
    font-style: italic;
    color: #718096;
    margin-left: 0.2rem;
}

/* Tablet */
@media (max-width: 768px) {
    .selected-room-price {
        padding: 0.5rem 1rem;
    }
    .selected-room-price-amount {
        font-size: 1.35rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .selected-room-price {
        padding: 0.45rem 0.9rem;
        gap: 0.3rem;
    }
    .selected-room-price-amount {
        font-size: 1.2rem;
    }
    .selected-room-price-currency {
        font-size: 0.68rem;
        letter-spacing: 1px;
    }
    .selected-room-price-unit {
        font-size: 0.72rem;
    }
}

.reservation-field label span.asterisk {
    color: red;
    font-weight: 700;
    font-size: 0.9rem;
}

/**********************************************************************
                SUBMISSION REVIEW
************************************************************************/

/* =========================================================
   RESERVATION REVIEW MODAL
========================================================= */

.reservation-review-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.reservation-review-modal[hidden] {
    display: none !important;
}

.reservation-review-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.reservation-review-dialog {
    position: relative;
    z-index: 1;

    width: min(900px, calc(100% - 30px));
    max-height: calc(100vh - 40px);

    margin: 20px auto;

    background: #ffffff;
    border-radius: 5px;
    overflow: hidden;

    display: flex;
    flex-direction: column;
}

.reservation-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;

    padding: 20px 24px;
    background: #17324d;
    color: #ffffff;
}

.reservation-review-header h2 {
    margin: 0 0 5px;
    font-size: 1.4rem;
}

.reservation-review-header p {
    margin: 0;
    opacity: 0.85;
}

.reservation-review-close {
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.reservation-review-body {
    padding: 22px;
    overflow-y: auto;
}

.review-section {
    margin-bottom: 25px;
}

.review-section h3 {
    color: #7a1f2b;
    font-size: 1.1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.review-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.review-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #718096;
    text-transform: uppercase;
}

.review-value {
    color: #263747;
    font-size: 0.95rem;
    word-break: break-word;
}

.review-room {
    padding: 15px;
    margin-bottom: 12px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
}

.review-room h4 {
    color: #17324d;
    margin: 0 0 12px;
}

.reservation-review-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;

    padding: 16px 22px;

    border-top: 1px solid #e2e8f0;
    background: #f7fafc;
}

.review-edit-btn,
.review-confirm-btn {
    border: 0;
    border-radius: 5px;
    padding: 11px 20px;
    font-weight: 600;
    cursor: pointer;
}

.review-edit-btn {
    background: #e2e5e9;
    color: #263747;
}

.review-confirm-btn {
    background: #007bff;
    color: #ffffff;
}

.review-confirm-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .reservation-review-dialog {
        width: calc(100% - 16px);
        max-height: calc(100vh - 16px);
        margin: 8px auto;
    }

    .review-grid {
        grid-template-columns: 1fr;
    }

    .reservation-review-actions {
        flex-direction: column;
    }

    .review-edit-btn,
    .review-confirm-btn {
        width: 100%;
    }
}

/* ============================================================
   RESERVATION REVIEW - PRICING SUMMARY
============================================================ */

.review-pricing-section {
    background: #f8fafc;
}

.review-pricing-room {
    padding: 14px 0;
    border-bottom: 1px solid #e2e8f0;
}

.review-pricing-room:first-child {
    padding-top: 0;
}

.review-pricing-room-name {
    font-weight: 700;
    margin-bottom: 6px;
}

.review-pricing-calculation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.review-pricing-calculation span {
    color: #64748b;
}

.review-pricing-calculation strong {
    white-space: nowrap;
}


/* TOTALS */

.review-pricing-totals {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 2px solid #cbd5e1;
}

.review-pricing-total-row,
.review-pricing-deposit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.review-pricing-total-row {
    font-size: 1.1rem;
}

.review-pricing-total-row strong {
    font-size: 1.25rem;
}

.review-pricing-deposit-row {
    margin-top: 12px;
    padding: 12px 14px;
    background: #fff7ed;
    border-radius: 6px;
}

.review-pricing-deposit-row strong {
    white-space: nowrap;
}


/* DEPOSIT NOTICE */

.review-deposit-notice {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    padding: 16px;
    background: #eef6ff;
    border: 1px solid #cfe3f7;
    border-radius: 6px;
}

.review-deposit-notice > i {
    margin-top: 3px;
}

.review-deposit-notice strong {
    display: block;
    margin-bottom: 4px;
}

.review-deposit-notice p {
    margin: 0;
    line-height: 1.55;
}


/* MOBILE */

@media (max-width: 600px) {

    .review-pricing-calculation,
    .review-pricing-total-row,
    .review-pricing-deposit-row {
        align-items: flex-start;
        gap: 8px;
    }

    .review-pricing-calculation {
        flex-direction: column;
    }

    .review-pricing-total-row,
    .review-pricing-deposit-row {
        flex-wrap: wrap;
    }
}

/* ============================================================
   PRICING SUMMARY - SECTION BORDER
============================================================ */

.review-pricing-section {
    border: 1px solid #d7dee5;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    background: #ffffff;
}

@media (max-width: 600px) {
    .review-pricing-section {
        padding: 16px;
        border-radius: 6px;
    }
}