/* ============================================================
   PREMIUM HOLIDAY RESORT BOOKING ENGINE GRAPHICS
============================================================ */
:root {
    --brand-primary: #1a365d;       /* Deep Luxury Blue Header Text */
    --holiday-blue: #0284c7;        /* Crisp Active Selection Blue */
    --holiday-blue-light: #e0f2fe;  /* Selected stay track highlights */
    --status-red: #f43f5e;          /* Muted Crimson Premium Red for occupied */
    --status-green: #10b981;        /* Fresh Emerald for clear check-in spaces */
    --bg-grey-light: #f8fafc;       /* Clean neutral background tint */
    --text-dark: #334155;           /* Primary day numerals slate text */
    --text-muted: #cbd5e1;          /* Disabled out of grid padding markers */
}

.holiday-calendar-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Nav Header */
.calendar-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.month-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin: 0;
}
.nav-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.nav-btn:hover {
    background: var(--bg-grey-light);
    color: var(--brand-primary);
    border-color: #cbd5e1;
}

/* Core Grid Alignment Layout */
.calendar-core-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.weekday-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    padding: 8px 0;
    letter-spacing: 0.05em;
}

/* Base Grid Item Layout rules */
.calendar-day {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.day-number {
    position: relative;
    z-index: 3;
}

/* 1. Fully Available Days (Clean layout indicator) */
.calendar-day.status-available {
    background-color: #dcfce7;
    border: 1px solid var(--status-green);
}
.calendar-day.status-available:hover {
    border-color: var(--status-green);
    box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.15);
    background-color: #f0fdf4;
}

/* 2. Fully Occupied/Blocked (Solid Soft Red) */
.calendar-day.status-unavailable {
    background-color: #ffe4e6;
    color: #b91c1c;
    cursor: not-allowed;
    border: 1px solid #fecdd3;
}

/* 3. Professional Diagonal Turnaround Splits */
/* Top-Right Triangle = Morning Checkout (Red) | Bottom-Left = Afternoon Check-in (Green/Available) */
.calendar-day.status-turnaround.turnaround-bookable {
    background: linear-gradient(135deg, #ffe4e6 50%, #ffffff 50%);
    border: 1px solid #e2e8f0;
}
.calendar-day.status-turnaround.turnaround-bookable:hover {
    background: linear-gradient(135deg, #ffe4e6 50%, #f0fdf4 50%);
    box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.2);
}
/* Top-Right Triangle = Morning Checkout (Red) | Bottom-Left = Disabled for check-in (Grey) */
.calendar-day.status-turnaround.turnaround-locked {
    background: linear-gradient(135deg, #ffe4e6 50%, var(--bg-grey-light) 50%);
    border: 1px solid #e2e8f0;
    cursor: not-allowed;
}

/* 4. Seasonal Constraints or Rule-Disabled Days */
.calendar-day.status-restricted {
    background-color: var(--bg-grey-light);
    color: var(--text-muted);
    border: 1px solid #f1f5f9;
}

/* 5. Static Confirmed Selection Highlights */
.calendar-day.arrival-selected {
    background-color: var(--holiday-blue) !important;
    color: #ffffff !important;
    border-color: var(--holiday-blue) !important;
    border-radius: 6px 0 0 6px !important;
}
.calendar-day.departure-selected {
    background-color: var(--holiday-blue) !important;
    color: #ffffff !important;
    border-color: var(--holiday-blue) !important;
    border-radius: 0 6px 6px 0 !important;
}
.calendar-day.selected-range {
    background-color: var(--holiday-blue-light) !important;
    color: #0369a1 !important;
    border-top: 1px solid #bae6fd !important;
    border-bottom: 1px solid #bae6fd !important;
    border-radius: 0 !important;
}

/* 6. Live Interactive Mouseover Tracking Previews (Agency UX Gold Standard) */
.calendar-day.preview-range {
    background-color: #f0f9ff !important;
    color: var(--holiday-blue) !important;
    border-top: 1px dashed #7dd3fc !important;
    border-bottom: 1px dashed #7dd3fc !important;
    border-radius: 0 !important;
}
.calendar-day.preview-departure {
    background-color: var(--holiday-blue) !important;
    color: #ffffff !important;
    border-radius: 0 6px 6px 0 !important;
    opacity: 0.85;
}
.calendar-day.preview-invalid {
    box-shadow: 0 0 0 2px var(--status-red) !important;
    cursor: not-allowed;
}

/* Empty Padding Blocks */
.calendar-day.status-empty {
    background: transparent;
    cursor: default;
}
.rctx-booking {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
}

/* -----------------------------------
   TITLES & INTRO
----------------------------------- */
.rctx-booking-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: .5rem;
    color: #222;
}

.rctx-booking-intro {
    text-align: center;
    font-size: .95rem;
    color: #555;
    margin-bottom: 1.5rem;
}

/* -----------------------------------
   CALENDAR WRAPPER
----------------------------------- */
.rctx-calendar {
    background: #fafafa;
    padding: 1rem;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px #e5e5e5;
}

/* -----------------------------------
   CALENDAR HEADER
----------------------------------- */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem;
}

.calendar-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.calendar-header button {
    background: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #0078ff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    cursor: pointer;
    transition: all .15s ease;
}

.calendar-header button:hover {
    background: #0078ff;
    color: #fff;
    transform: translateY(-2px);
}

/* -----------------------------------
   GRID LAYOUT
----------------------------------- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .35rem;
}

.day-name {
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
    color: #666;
    padding-bottom: .25rem;
}



/* -----------------------------------
   SELECTED SUMMARY
----------------------------------- */
.rctx-selected {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    font-size: .95rem;
    color: #333;
}

.rctx-selected p {
    margin: .25rem 0;
}

/* -----------------------------------
   PRICE BOX
----------------------------------- */
.rctx-price {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    text-align: center;
}

/* Late deal tag */
.late-deal-tag {
    margin-top: .5rem;
    background: #ff5722;
    color: #fff;
    padding: .35rem .6rem;
    border-radius: 8px;
    font-size: .8rem;
    display: inline-block;
}

/* -----------------------------------
   BOOK BUTTON
----------------------------------- */
.rctx-book-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: .9rem;
    background: #0078ff;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.rctx-book-btn:hover {
    background: #0069d9;
}

.rctx-book-btn:active {
    background: #005bb8;
}
/* FULLSCREEN POPUP OVERLAY */
#rctxBookingPopup {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 99999;
    overflow-y: auto;
    padding: 3rem 1.5rem;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Smooth entry transition states */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show popup state */
#rctxBookingPopup.show {
    opacity: 1;
    visibility: visible;
}

/* INNER CONTAINER */
.rctx-popup-inner {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    background: #ffffff;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    
    /* Scale animation on entrance */
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#rctxBookingPopup.show .rctx-popup-inner {
    transform: translateY(0);
}

/* CLOSE BUTTON */
.rctx-popup-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: #222222;
    opacity: 0.6;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rctx-popup-close:hover {
    opacity: 1;
    background-color: #f9f9f9;
}

.rctx-popup-close:focus-visible {
    outline: 2px solid #222222;
}

/* TYPOGRAPHY */
.rctx-popup-inner h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #222222;
    letter-spacing: -0.02em;
}

/* FORM ELEMENTS */
.rctx-popup-inner label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555555;
}

.rctx-popup-inner input {
    width: 100%;
    padding: 0.85rem 1rem;
    margin-top: 0.35rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    font-size: 1rem;
    color: #222222;
    background-color: #ffffff;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rctx-popup-inner input:focus {
    outline: none;
    border-color: #222222;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.03);
}

/* BOOKING SUMMARY BOX */
.rctx-booking-summary {
    background: #f9f9f9;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    margin-bottom: 2rem;
}

.rctx-booking-summary p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: #222222;
    display: flex;
    justify-content: space-between;
}

.rctx-booking-summary p:first-of-type {
    margin-top: 0;
}

.rctx-booking-summary p:last-of-type {
    margin-bottom: 0;
    font-weight: 700;
    border-top: 1px dashed #e0e0e0;
    padding-top: 0.5rem;
    margin-top: 0.75rem;
}

/* CTA SUBMIT BUTTON */
.rctx-submit-btn {
    width: 100%;
    padding: 1rem;
    background: #ff4f7b;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 79, 123, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rctx-submit-btn:hover {
    background: #e03b64;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 79, 123, 0.4);
}

.rctx-submit-btn:active {
    transform: translateY(1px);
}

/* LOADING SPINNER */
.rctx-spinner {
    display: none;
    width: 28px;
    height: 28px;
    margin: 1.5rem auto 0;
    border: 3px solid #e0e0e0;
    border-top-color: #ff4f7b;
    border-radius: 50%;
    animation: rctxSpin 0.6s cubic-bezier(0.6, 0.2, 0.1, 1) infinite;
}

@keyframes rctxSpin {
    to { transform: rotate(360deg); }
}

/* RESPONSIVE DESIGN */
@media (max-width: 576px) {
    #rctxBookingPopup {
        padding: 1rem;
    }
    .rctx-popup-inner {
        padding: 2rem 1.25rem;
        border-radius: 12px;
    }
}
.booking-success-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.booking-success-modal.show {
  display: flex;
}

.booking-success-content {
  background: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  animation: popupFade 0.25s ease-out;
}

@keyframes popupFade {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-btn {
  margin-top: 18px;
  padding: 10px 18px;
  background: #2ecc71;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}
