/*
 * css/booking-calendar.css
 * Booking calendar — deep crimson theme, professional styling
 * Unavailable days clearly distinct from available
 */

/* ── Step indicators ── */
.booking-steps { display:flex; align-items:center; margin-bottom:40px; }
.booking-step {
    display:flex; align-items:center; gap:10px;
    font-family: "Times New Roman", Times, serif;
    font-size:13px; font-weight:600; color:var(--text-muted);
}
.booking-step--active { color:var(--skin-color); }
.booking-step--done   { color:var(--skin-color); }
.booking-step__num {
    width:28px; height:28px; border-radius:50%;
    border:1.5px solid currentColor;
    display:flex; align-items:center; justify-content:center;
    font-size:11px; font-weight:700; flex-shrink:0;
}
.booking-step--active .booking-step__num,
.booking-step--done .booking-step__num {
    background:var(--skin-color); border-color:var(--skin-color); color:#fff;
    box-shadow:0 3px 10px var(--accent-glow);
}
.booking-step-line { flex:1; height:1px; background:var(--surface-border); margin:0 14px; max-width:64px; }
.booking-step-line--done { background:var(--skin-color); }

/* ── Instruction pills ── */
.ei-cal-instruction {
    display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:28px;
}
.ei-cal-instruction__step {
    display:flex; align-items:center; gap:7px;
    padding:8px 14px; border-radius:3px;
    font-family: "Times New Roman", Times, serif;
    font-size:12.5px; font-weight:600;
    border:1px solid var(--surface-border);
    color:var(--text-muted); background:var(--surface-card);
    box-shadow:var(--shadow-sm); transition:var(--transition);
}
.ei-cal-instruction__step--active {
    border-color:var(--skin-color); color:var(--skin-color); background:var(--accent-soft);
}
.ei-cal-instruction__step--done {
    border-color:#1d5c2e; color:#1d5c2e; background:rgba(29,92,46,0.06);
}

/* ── Calendar card ── */
.ei-cal-wrap {
    background:var(--surface-card) !important;
    background-image:none !important;
    border:1px solid var(--surface-border) !important;
    border-radius:var(--radius-md) !important;
    padding:32px !important;
    max-width:480px !important;
    box-shadow:var(--shadow-md) !important;
    user-select:none;
}

/* ── Header ── */
.ei-cal-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:22px; }
.ei-cal-title {
    font-family: "Times New Roman", Times, serif;
    font-size:17px; font-weight:700; font-style:italic; color:var(--text-primary);
}
.ei-cal-nav {
    background:var(--surface-muted);
    border:1px solid var(--surface-border);
    color:var(--text-secondary);
    width:32px; height:32px; border-radius:3px;
    cursor:pointer; font-size:11px;
    display:flex; align-items:center; justify-content:center;
    transition:var(--transition);
    font-family: "Times New Roman", Times, serif;
}
.ei-cal-nav:hover { background:var(--skin-color); border-color:var(--skin-color); color:#fff; }
.ei-cal-nav:disabled { opacity:0.2; cursor:not-allowed; pointer-events:none; }

/* ── Day name headers ── */
.ei-cal-days-header { display:grid; grid-template-columns:repeat(7,1fr); margin-bottom:8px; }
.ei-cal-days-header span {
    text-align:center; font-size:10px; font-weight:700;
    font-family: "Times New Roman", Times, serif;
    color:var(--text-muted); padding:5px 0;
    text-transform:uppercase; letter-spacing:0.07em;
}

/* ── Calendar grid ── */
.ei-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }

/* ── ALL day cells — base ── */
.ei-cal-day {
    aspect-ratio:1;
    display:flex; align-items:center; justify-content:center;
    font-family: "Times New Roman", Times, serif;
    font-size:13px; font-weight:400;
    border-radius:3px;
    position:relative;
    transition:all 0.14s ease;
}

/* ── EMPTY cells ── */
.ei-cal-day--empty { cursor:default; }

/* ── PAST / OUT-OF-RANGE days ── */
.ei-cal-day--past {
    color:var(--surface-border);
    cursor:not-allowed;
    background:transparent;
    font-weight:300;
    opacity:0.5;
}

/* ── UNAVAILABLE / BLOCKED days — specifically blocked by date range ── */
.ei-cal-day--blocked {
    background: var(--surface-muted);
    color: var(--surface-border);
    cursor: not-allowed;
    border-radius: 3px;
    font-weight: 400;
    opacity: 0.55;
    text-decoration: line-through;
    text-decoration-color: var(--surface-border);
}
.ei-cal-day--blocked:hover {
    background: var(--surface-muted);
    color: var(--surface-border);
    transform: none;
}

/* ── CLOSED days (day-of-week not in available days) ── */
/* More subtle than blocked — just a regular non-working day */
.ei-cal-day--closed {
    color: var(--text-muted);
    cursor: not-allowed;
    background: transparent;
    opacity: 0.32;
    font-weight: 400;
}
.ei-cal-day--closed:hover {
    background: transparent;
    transform: none;
}

/* ── TODAY indicator — always shown, ring around the date ── */
.ei-cal-day--today {
    font-weight: 900;
    border-radius: 5px;
    position: relative;
}
/* Today dot underneath the number */
.ei-cal-day--today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--skin-color);
}
/* Today + available (minAdvance=0) — fully clickable */
.ei-cal-day--today.ei-cal-day--available {
    box-shadow: inset 0 0 0 2px var(--skin-color);
    color: var(--skin-color);
    background: var(--accent-soft);
}
.ei-cal-day--today.ei-cal-day--available:hover {
    background: var(--skin-color);
    color: #fff;
}
.ei-cal-day--today.ei-cal-day--available:hover::after {
    background: rgba(255,255,255,0.8);
}
/* Today + past (minAdvance >= 1) — shown but not selectable */
.ei-cal-day--today.ei-cal-day--past {
    box-shadow: inset 0 0 0 1.5px var(--skin-color);
    color: var(--skin-color);
    opacity: 0.55;
    cursor: default;
    text-decoration: none;
    background: transparent;
}

/* ── AVAILABLE days — clearly active and selectable ── */
.ei-cal-day--available {
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
}
.ei-cal-day--available:hover {
    background: var(--accent-soft);
    border-color: var(--skin-color);
    color: var(--skin-color);
    border-radius: 3px;
    transform: scale(1.05);
}

/* ── START date ── */
.ei-cal-day--start {
    background:var(--skin-color) !important;
    color:#fff !important;
    border:none !important;
    border-radius:3px 0 0 3px;
    z-index:2; font-weight:700;
    box-shadow:2px 0 0 var(--skin-color);
    cursor:pointer;
}
/* ── END date ── */
.ei-cal-day--end {
    background:var(--skin-color) !important;
    color:#fff !important;
    border:none !important;
    border-radius:0 3px 3px 0;
    z-index:2; font-weight:700;
    box-shadow:-2px 0 0 var(--skin-color);
    cursor:pointer;
}
/* ── Same-day start+end ── */
.ei-cal-day--start.ei-cal-day--end {
    border-radius:3px !important;
    box-shadow:0 4px 14px var(--accent-glow) !important;
}
/* ── In-range fill ── */
.ei-cal-day--in-range {
    background:var(--accent-soft);
    color:var(--text-primary);
    border:none !important;
    border-radius:0;
    cursor:pointer;
}
/* ── Hover preview range ── */
.ei-cal-day--hover-range {
    background:var(--accent-soft);
    opacity:0.65; border:none !important; border-radius:0; cursor:pointer;
}
.ei-cal-day--hover-end {
    background:var(--accent-mid) !important;
    color:var(--skin-color) !important;
    border:none !important;
    border-radius:0 3px 3px 0; cursor:pointer;
}

/* ── Legend ── */
.ei-cal-legend {
    display:flex; gap:14px; margin-top:18px;
    padding-top:14px; border-top:1px solid var(--surface-border); flex-wrap:wrap;
}
.ei-cal-legend__item {
    display:flex; align-items:center; gap:6px;
    font-size:11px; color:var(--text-muted);
    font-family: "Times New Roman", Times, serif;
}
.ei-cal-legend__dot { width:11px; height:11px; border-radius:2px; flex-shrink:0; }
.ei-cal-legend__dot--available  {
    background:var(--surface-card);
    border:1.5px solid var(--surface-border);
}
.ei-cal-legend__dot--start      { background:var(--skin-color); border-radius:2px 0 0 2px; }
.ei-cal-legend__dot--range      { background:var(--accent-soft); border:1px solid var(--accent-mid); border-radius:0; }
.ei-cal-legend__dot--end        { background:var(--skin-color); border-radius:0 2px 2px 0; }
.ei-cal-legend__dot--unavailable{
    background:var(--surface-muted);
    border:1px solid var(--surface-border);
    opacity:0.55;
}

/* ── Selection / proceed bar ── */
.ei-cal-selection {
    margin-top:16px; padding:20px 22px;
    background:var(--surface-card) !important;
    background-image:none !important;
    border:1px solid var(--surface-border) !important;
    border-radius:var(--radius-md) !important;
    max-width:480px;
    box-shadow:var(--shadow-md) !important;
    animation:calFadeUp 0.26s ease;
}
@keyframes calFadeUp { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
.ei-cal-selection__dates {
    display:flex; align-items:center; gap:14px; margin-bottom:16px; flex-wrap:wrap;
}
.ei-cal-selection__block { display:flex; flex-direction:column; gap:3px; flex:1; min-width:110px; }
.ei-cal-selection__block--nights {
    text-align:center; border-left:1px solid var(--surface-border);
    padding-left:14px; flex:0; min-width:68px;
}
.ei-cal-selection__label {
    font-family: "Times New Roman", Times, serif;
    font-size:9.5px; font-weight:700;
    text-transform:uppercase; letter-spacing:0.14em; color:var(--text-muted);
}
.ei-cal-selection__value {
    font-family: "Times New Roman", Times, serif;
    font-size:14px; font-weight:700; color:var(--text-primary);
}
.ei-cal-selection__arrow { color:var(--text-muted); font-size:11px; flex-shrink:0; }
.ei-cal-selection__actions { display:flex; align-items:center; gap:10px; }
.ei-cal-clear {
    background:none; border:1px solid var(--surface-border);
    color:var(--text-muted); padding:9px 16px; border-radius:3px;
    cursor:pointer;
    font-family: "Times New Roman", Times, serif;
    font-size:12.5px; font-weight:600; transition:var(--transition);
}
.ei-cal-clear:hover { border-color:var(--skin-color); color:var(--skin-color); }

/* Proceed button on calendar page */
.ei-cal-proceed.btn {
    border-radius:3px;
    font-size:13px;
    letter-spacing:0.05em;
    text-transform:uppercase;
    padding:11px 24px;
}

/* ── Booking date banner (on form page) ── */
.booking-date-banner {
    background:var(--skin-color);
    border-radius:var(--radius-sm); padding:18px 24px;
    display:flex; align-items:center; justify-content:space-between;
    gap:18px; max-width:640px; flex-wrap:wrap;
    box-shadow: var(--shadow-md);
}
.booking-date-banner__left { display:flex; align-items:center; gap:14px; color:#fff; }
.booking-date-banner__left i { font-size:22px; opacity:0.85; }
.booking-date-banner__change {
    font-family: "Times New Roman", Times, serif;
    font-size:12.5px; font-weight:600; color:rgba(255,255,255,0.78);
    display:flex; align-items:center; gap:6px; white-space:nowrap; transition:var(--transition);
}
.booking-date-banner__change:hover { color:#fff; }

/* ── Responsive ── */
@media(max-width:600px){
    .ei-cal-wrap { padding:16px 12px !important; }
    .ei-cal-day  { font-size:12px; }
    .ei-cal-selection { padding:14px 14px !important; }
    .ei-cal-selection__dates { gap:8px; }
    .booking-step span { display:none; }
    .ei-cal-instruction { gap:6px; }
    .ei-cal-instruction__step { padding:7px 10px; font-size:11.5px; }
}
