/* ============================================================
   Easy Accommodation Booking – Frontend CSS  v2.0
   ============================================================ */

/* ── CSS custom properties (overridden inline per widget) ── */
.eab-widget {
    --eab-primary:        #2c7be5;
    --eab-radius:         8px;
    --eab-avail:          #d4edda;
    --eab-avail-text:     #155724;
    --eab-unavail:        #e9ecef;
    --eab-unavail-text:   #adb5bd;
    --eab-selected:       #2c7be5;
    --eab-selected-text:  #ffffff;
    --eab-range-bg:       rgba(44,123,229,.12);
    --eab-turnaround:     #fff3cd;
    --eab-turnaround-text:#856404;
    --eab-font:           inherit;

    font-family: var(--eab-font);
    max-width: 640px;
    color: #333;
    line-height: 1.6;
}

/* ── Step bar ─────────────────────────────────────────────── */
.eab-steps-bar {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-radius: var(--eab-radius);
    overflow: hidden;
    border: 1px solid #dee2e6;
}
.eab-step-dot {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #aaa;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    transition: background .2s, color .2s;
}
.eab-step-dot:last-child { border-right: none; }
.eab-step-dot span {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #dee2e6;
    color: #888;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}
.eab-step-dot.eab-step-active { color: var(--eab-primary); background: #fff; }
.eab-step-dot.eab-step-active span { background: var(--eab-primary); color: #fff; }
.eab-step-dot.eab-step-done span { background: #28a745; color: #fff; }

/* ── Steps visibility ─────────────────────────────────────── */
.eab-step { display: none; }
.eab-step-visible { display: block; }

/* ── Calendar ─────────────────────────────────────────────── */
.eab-cal-wrap {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: var(--eab-radius);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.eab-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--eab-primary);
    color: #fff;
    padding: 14px 18px;
}
.eab-cal-nav button {
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    width: 34px; height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.eab-cal-nav button:hover { background: rgba(255,255,255,.35); }
.eab-cal-title { font-weight: 700; font-size: 16px; text-transform: capitalize; }

.eab-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    padding: 10px 12px 4px;
}

/* Day grid */
.eab-cal-grid {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 3px;
    padding: 4px 12px 12px;
}

.eab-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    cursor: default;
    transition: background .12s, color .12s;
    user-select: none;
    z-index: 1;
}
.eab-day-empty { background: none !important; cursor: default; }

/* Past */
.eab-day-past {
    color: #ccc;
    cursor: not-allowed;
}

/* Available */
.eab-day-avail {
    background: var(--eab-avail);
    color: var(--eab-avail-text);
    cursor: pointer;
    font-weight: 600;
}
.eab-day-avail:hover {
    background: var(--eab-primary);
    color: #fff;
    transform: scale(1.08);
}

/* Booked / blocked */
.eab-day-busy {
    background: var(--eab-unavail);
    color: var(--eab-unavail-text);
    text-decoration: line-through;
    cursor: not-allowed;
}

/* Turnaround / wisseldag  – half available, half busy */
.eab-day-turnaround {
    cursor: pointer;
    overflow: hidden;
}
.eab-day-turnaround::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    /* Left half = turnaround color, right half = available */
    background: linear-gradient(90deg,
        var(--eab-turnaround) 50%,
        var(--eab-avail)      50%
    );
    z-index: -1;
}
.eab-day-turnaround span { z-index: 1; color: var(--eab-turnaround-text); font-weight: 600; }

/* Selected single / range start / end */
.eab-day-start,
.eab-day-end {
    background: var(--eab-selected) !important;
    color:       var(--eab-selected-text) !important;
    font-weight: 700;
    border-radius: 50%;
}

/* Range fill between start and end */
.eab-day-inrange {
    background: var(--eab-range-bg);
    color: var(--eab-primary);
    border-radius: 0;
    font-weight: 600;
}
.eab-day-start.eab-day-inrange { border-radius: 50% 0 0 50%; }
.eab-day-end.eab-day-inrange   { border-radius: 0 50% 50% 0; }

/* Today marker */
.eab-day-today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px;
    background: var(--eab-primary);
    border-radius: 50%;
}
.eab-day-start.eab-day-today::after,
.eab-day-end.eab-day-today::after { background: #fff; }

/* Legend */
.eab-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 6px 12px 12px;
    font-size: 12px;
    color: #666;
}
.eab-leg { display: flex; align-items: center; gap: 5px; }
.eab-leg::before {
    content: ''; width: 14px; height: 14px;
    border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.eab-leg-avail::before  { background: var(--eab-avail); }
.eab-leg-sel::before    { background: var(--eab-selected); }
.eab-leg-busy::before   { background: var(--eab-unavail); }
.eab-leg-turn::before   { background: linear-gradient(90deg,var(--eab-turnaround) 50%,var(--eab-avail) 50%); }

.eab-cal-hint {
    text-align: center;
    font-size: 13px;
    color: #888;
    padding: 0 12px 10px;
    font-style: italic;
}

/* ── Date summary box ─────────────────────────────────────── */
.eab-dates-summary {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--eab-radius);
    padding: 14px 16px;
    margin-bottom: 14px;
}
.eab-dates-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.eab-date-chip {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.eab-date-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #888; }
.eab-date-val   { font-size: 15px; font-weight: 700; color: #333; }
.eab-date-arrow { font-size: 20px; color: #ccc; }

.eab-price-box { border-top: 1px dashed #dee2e6; padding-top: 10px; }
.eab-price-line {
    display: flex; justify-content: space-between;
    font-size: 14px; padding: 4px 0;
    border-bottom: 1px dashed #f0f0f0;
}
.eab-price-line:last-child { border-bottom: none; }
.eab-price-total { padding-top: 8px; font-size: 16px; }

/* ── Fields grid ──────────────────────────────────────────── */
.eab-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}
@media(max-width:500px){ .eab-fields-grid { grid-template-columns: 1fr; } }

.eab-field { display: flex; flex-direction: column; gap: 4px; }
.eab-field label {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .4px; color: #666;
}
.eab-required { color: #dc3545; }
.eab-field input,
.eab-field textarea,
.eab-field select {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: calc(var(--eab-radius) - 2px);
    font-size: 15px;
    width: 100%; box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}
.eab-field input:focus,
.eab-field textarea:focus,
.eab-field select:focus {
    outline: none;
    border-color: var(--eab-primary);
    box-shadow: 0 0 0 3px rgba(44,123,229,.15);
}
.eab-field-checkbox { grid-column: span 2; }
.eab-check-label { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; }
.eab-check-label input { margin-top: 3px; flex-shrink: 0; }

/* ── Booking recap ────────────────────────────────────────── */
.eab-booking-recap {
    background: #f8f9fa;
    border-radius: var(--eab-radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex; flex-wrap: wrap; gap: 12px;
}
.eab-recap-item { display: flex; flex-direction: column; gap: 2px; }
.eab-recap-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #888; }
.eab-recap-val   { font-weight: 700; font-size: 15px; }

/* ── Pay-later notice ─────────────────────────────────────── */
.eab-pay-later-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--eab-radius);
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 14px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.eab-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 22px; border-radius: var(--eab-radius);
    font-size: 15px; font-weight: 700; cursor: pointer;
    text-decoration: none; border: 2px solid transparent;
    transition: background .15s, transform .1s, opacity .15s;
    gap: 6px;
}
.eab-btn:disabled { opacity: .45; cursor: not-allowed; }
.eab-btn:not(:disabled):active { transform: scale(.97); }
.eab-btn-primary { background: var(--eab-primary); color: #fff !important; width: 100%; }
.eab-btn-primary:not(:disabled):hover { filter: brightness(1.08); }
.eab-btn-outline  {
    background: #fff; color: var(--eab-primary) !important;
    border-color: var(--eab-primary);
}
.eab-btn-outline:hover { background: var(--eab-primary); color: #fff !important; }

.eab-btn-row { display: flex; gap: 10px; margin-top: 14px; }
.eab-btn-row .eab-btn-primary { flex: 1; }

/* ── Loading / spinner ────────────────────────────────────── */
.eab-cal-loading {
    display: flex; align-items: center; gap: 8px;
    color: #888; font-size: 13px; margin: 8px 0;
}
.eab-spinner {
    width: 16px; height: 16px;
    border: 3px solid #dee2e6;
    border-top-color: var(--eab-primary);
    border-radius: 50%;
    animation: eab-spin .65s linear infinite;
    flex-shrink: 0;
}
@keyframes eab-spin { to { transform: rotate(360deg); } }

/* ── Errors ───────────────────────────────────────────────── */
.eab-avail-err, .eab-form-err {
    padding: 10px 14px;
    background: #fde8ea;
    color: #721c24;
    border-radius: var(--eab-radius);
    font-size: 14px;
    margin: 8px 0;
}

/* ── Terms ────────────────────────────────────────────────── */
.eab-terms-row { font-size: 13px; margin-bottom: 12px; display: flex; align-items: flex-start; gap: 7px; }
.eab-terms-row input { margin-top: 3px; flex-shrink: 0; }

/* ── Meta bar ─────────────────────────────────────────────── */
.eab-meta-bar {
    display: flex; flex-wrap: wrap; gap: 14px;
    font-size: 13px; color: #888; margin-top: 8px;
}

/* ── Confirmation step ────────────────────────────────────── */
.eab-step-3 { text-align: center; padding: 20px 0; }
.eab-confirm-icon {
    width: 64px; height: 64px;
    background: #28a745; color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: 700;
    margin: 0 auto 16px;
}
.eab-confirm-title { font-size: 22px; margin: 0 0 8px; color: #28a745; }
.eab-confirm-sub   { color: #666; margin-bottom: 16px; }
.eab-confirm-details {
    background: #f8f9fa; border-radius: var(--eab-radius);
    padding: 16px; text-align: left; font-size: 14px;
    display: flex; flex-wrap: wrap; gap: 14px;
}
.eab-confirm-item { display: flex; flex-direction: column; gap: 2px; }
.eab-confirm-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #888; }
.eab-confirm-val   { font-weight: 700; }

/* ── Accommodation cards ──────────────────────────────────── */
.eab-acc-grid { display: grid; gap: 22px; }
.eab-cols-1 { grid-template-columns: 1fr; }
.eab-cols-2 { grid-template-columns: repeat(2,1fr); }
.eab-cols-3 { grid-template-columns: repeat(3,1fr); }
@media(max-width:720px) { .eab-cols-2,.eab-cols-3 { grid-template-columns: 1fr; } }

.eab-acc-card {
    border: 1px solid #dee2e6;
    border-radius: var(--eab-radius);
    overflow: hidden;
    background: #fff;
    transition: box-shadow .2s, transform .2s;
}
.eab-acc-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); transform: translateY(-2px); }
.eab-acc-img-wrap { display: block; position: relative; aspect-ratio: 4/3; overflow: hidden; }
.eab-acc-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.eab-acc-card:hover .eab-acc-img { transform: scale(1.04); }
.eab-acc-img-ph { width: 100%; height: 100%; background: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 48px; }
.eab-acc-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 20px; }
.eab-acc-body { padding: 14px; }
.eab-acc-title { margin: 0 0 8px; font-size: 16px; }
.eab-acc-title a { text-decoration: none; color: #333; }
.eab-acc-specs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #888; margin-bottom: 8px; }
.eab-acc-tags  { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.eab-tag { background: #f0f0f0; border-radius: 20px; padding: 2px 8px; font-size: 12px; }
.eab-acc-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #eee; padding-top: 10px; margin-top: 8px; }
.eab-price-from { font-size: 16px; }
.eab-price-from small { color: #888; font-size: 12px; }
