/* =====================================================
   WP Verblijf Booking – Frontend Styles
   ===================================================== */

:root {
    --wpvb-primary:    #2c7be5;
    --wpvb-primary-dk: #1a5fb4;
    --wpvb-success:    #28a745;
    --wpvb-danger:     #dc3545;
    --wpvb-warning:    #ffc107;
    --wpvb-text:       #333;
    --wpvb-muted:      #666;
    --wpvb-border:     #dee2e6;
    --wpvb-bg:         #f8f9fa;
    --wpvb-radius:     8px;
    --wpvb-shadow:     0 2px 12px rgba(0,0,0,.1);
}

/* ─── Booking Widget ─── */
.wpvb-booking-widget {
    max-width: 680px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--wpvb-text);
    line-height: 1.6;
}

.wpvb-booking-steps { display: flex; flex-direction: column; gap: 0; }

/* ─── Steps ─── */
.wpvb-step {
    border: 1px solid var(--wpvb-border);
    border-radius: var(--wpvb-radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow .2s;
}
.wpvb-step-active { box-shadow: var(--wpvb-shadow); }

.wpvb-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--wpvb-bg);
    border-bottom: 1px solid var(--wpvb-border);
    font-weight: 600;
}

.wpvb-step-num {
    width: 30px; height: 30px;
    background: var(--wpvb-primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    flex-shrink: 0;
}
.wpvb-step-check { background: var(--wpvb-success) !important; }

.wpvb-step-body {
    padding: 20px;
    display: none;
}
.wpvb-step-active .wpvb-step-body { display: block; }

/* ─── Date row ─── */
.wpvb-date-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}
@media (max-width: 540px) {
    .wpvb-date-row { grid-template-columns: 1fr 1fr; }
    .wpvb-date-row .wpvb-field:last-child { grid-column: span 2; }
}

.wpvb-field { display: flex; flex-direction: column; gap: 4px; }
.wpvb-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--wpvb-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.wpvb-field input,
.wpvb-field textarea,
.wpvb-field select {
    padding: 10px 12px;
    border: 1px solid var(--wpvb-border);
    border-radius: 6px;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}
.wpvb-field input:focus,
.wpvb-field textarea:focus {
    outline: none;
    border-color: var(--wpvb-primary);
    box-shadow: 0 0 0 3px rgba(44,123,229,.15);
}

/* ─── Fields grid ─── */
.wpvb-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.wpvb-field-full { grid-column: span 2; }
@media (max-width: 540px) {
    .wpvb-fields-grid { grid-template-columns: 1fr; }
    .wpvb-field-full { grid-column: span 1; }
}

/* ─── Price summary ─── */
.wpvb-availability-result {
    margin-top: 16px;
    padding: 16px;
    background: var(--wpvb-bg);
    border-radius: var(--wpvb-radius);
    border: 1px solid var(--wpvb-border);
}
.wpvb-price-summary { margin-bottom: 16px; }
.wpvb-price-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 15px;
    border-bottom: 1px dashed var(--wpvb-border);
}
.wpvb-price-row:last-child { border-bottom: none; }
.wpvb-price-total-row { padding-top: 10px; font-size: 17px; }

/* ─── Booking summary box ─── */
.wpvb-booking-summary {
    background: var(--wpvb-bg);
    border: 1px solid var(--wpvb-border);
    border-radius: var(--wpvb-radius);
    padding: 16px;
    margin-bottom: 16px;
    font-size: 14px;
}
.wpvb-booking-summary table { width: 100%; border-collapse: collapse; }
.wpvb-booking-summary td { padding: 5px 0; }
.wpvb-booking-summary td:first-child { color: var(--wpvb-muted); width: 40%; }

/* ─── Buttons ─── */
.wpvb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background .2s, transform .1s;
    gap: 6px;
}
.wpvb-btn:active { transform: scale(.98); }
.wpvb-btn-primary {
    background: var(--wpvb-primary);
    color: #fff !important;
    width: 100%;
}
.wpvb-btn-primary:hover { background: var(--wpvb-primary-dk); }
.wpvb-btn-outline {
    background: #fff;
    color: var(--wpvb-primary) !important;
    border-color: var(--wpvb-primary);
}
.wpvb-btn-outline:hover { background: var(--wpvb-primary); color: #fff !important; }
.wpvb-link { background: none; border: none; color: var(--wpvb-primary); cursor: pointer; font-size: 13px; margin-left: auto; }

/* ─── Messages ─── */
.wpvb-unavailable-msg {
    margin-top: 14px;
    padding: 12px 16px;
    background: #fde8ea;
    color: var(--wpvb-danger);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wpvb-form-error {
    padding: 12px 16px;
    background: #fde8ea;
    color: var(--wpvb-danger);
    border-radius: 6px;
    margin-bottom: 14px;
}

/* ─── Spinner ─── */
.wpvb-loading { display: flex; align-items: center; gap: 8px; color: var(--wpvb-muted); margin-top: 12px; font-size: 14px; }
.wpvb-spinner {
    width: 18px; height: 18px;
    border: 3px solid var(--wpvb-border);
    border-top-color: var(--wpvb-primary);
    border-radius: 50%;
    animation: wpvb-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes wpvb-spin { to { transform: rotate(360deg); } }

/* ─── Terms ─── */
.wpvb-terms { margin-bottom: 16px; font-size: 14px; display: flex; align-items: flex-start; gap: 8px; }
.wpvb-terms input { margin-top: 3px; flex-shrink: 0; }

/* ─── Confirmation ─── */
.wpvb-confirmation { text-align: center; }
.wpvb-confirmation-msg { font-size: 17px; color: var(--wpvb-success); font-weight: 600; margin-bottom: 20px; }
.wpvb-confirmation-details {
    background: var(--wpvb-bg);
    border-radius: var(--wpvb-radius);
    padding: 20px;
    text-align: left;
    font-size: 15px;
}

/* ─── Meta info bar ─── */
.wpvb-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--wpvb-muted);
}

/* ─── Calendar ─── */
.wpvb-calendar-widget {
    max-width: 400px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border: 1px solid var(--wpvb-border);
    border-radius: var(--wpvb-radius);
    overflow: hidden;
    box-shadow: var(--wpvb-shadow);
}
.wpvb-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--wpvb-primary);
    color: #fff;
    padding: 14px 16px;
}
.wpvb-calendar-header button {
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.wpvb-calendar-header button:hover { background: rgba(255,255,255,.35); }
.wpvb-cal-title { font-weight: 700; font-size: 16px; text-transform: capitalize; }

.wpvb-calendar-grid { padding: 12px; }
.wpvb-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--wpvb-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.wpvb-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.wpvb-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    cursor: default;
    transition: background .15s;
}
.wpvb-cal-day.wpvb-day-past { color: #ccc; }
.wpvb-cal-day.wpvb-day-booked {
    background: #fde8ea;
    color: var(--wpvb-danger);
    text-decoration: line-through;
}
.wpvb-cal-day.wpvb-day-free:hover { background: #e8f3fe; cursor: pointer; }
.wpvb-cal-day.wpvb-day-empty { background: none; }

.wpvb-cal-legend {
    display: flex;
    gap: 12px;
    padding: 8px 12px 12px;
    font-size: 12px;
}
.wpvb-leg { display: flex; align-items: center; gap: 5px; }
.wpvb-leg::before {
    content: '';
    width: 14px; height: 14px;
    border-radius: 50%;
    display: inline-block;
}
.wpvb-leg-free::before  { background: var(--wpvb-bg); border: 1px solid var(--wpvb-border); }
.wpvb-leg-booked::before{ background: #fde8ea; }
.wpvb-leg-past::before  { background: #f0f0f0; }

/* ─── Accommodation cards ─── */
.wpvb-accommodations-grid {
    display: grid;
    gap: 24px;
}
.wpvb-cols-1 { grid-template-columns: 1fr; }
.wpvb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wpvb-cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
    .wpvb-cols-2,
    .wpvb-cols-3 { grid-template-columns: 1fr; }
}

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