/**
 * Kayakcentre Booking - Frontend styling
 * Cohesive water-inspired aesthetic with refined details
 */

:root {
    --kcb-primary: #0a6fb6;
    --kcb-primary-dark: #075587;
    --kcb-primary-light: #e8f3fb;
    --kcb-accent: #f4a91d;
    --kcb-accent-dark: #d8910b;
    --kcb-text: #1f2937;
    --kcb-text-soft: #6b7280;
    --kcb-text-muted: #9ca3af;
    --kcb-bg: #ffffff;
    --kcb-bg-soft: #f9fafb;
    --kcb-bg-card: #ffffff;
    --kcb-border: #e5e7eb;
    --kcb-border-strong: #d1d5db;
    --kcb-success: #16a34a;
    --kcb-success-light: #dcfce7;
    --kcb-warning: #d97706;
    --kcb-warning-light: #fef3c7;
    --kcb-danger: #dc2626;
    --kcb-danger-light: #fee2e2;
    --kcb-shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.04);
    --kcb-shadow-md: 0 4px 6px rgba(0,0,0,0.04), 0 10px 15px rgba(10,111,182,0.06);
    --kcb-shadow-lg: 0 20px 25px rgba(0,0,0,0.08), 0 10px 10px rgba(10,111,182,0.06);
    --kcb-radius: 14px;
    --kcb-radius-sm: 10px;
    --kcb-radius-lg: 18px;
    --kcb-font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Importeer Google fonts (display + body) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

.kcb-booking-app,
.kcb-booking-app * {
    box-sizing: border-box;
}

.kcb-booking-app {
    font-family: var(--kcb-font);
    color: var(--kcb-text);
    line-height: 1.5;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.kcb-booking-app h2,
.kcb-booking-app h3 {
    font-family: var(--kcb-font);
    color: var(--kcb-text);
    margin: 0;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.kcb-booking-app p {
    margin: 0;
    color: var(--kcb-text-soft);
}

/* ====== Stappen indicator ====== */
.kcb-steps {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    counter-reset: step;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.kcb-steps::-webkit-scrollbar { display: none; }

.kcb-step {
    flex: 1;
    min-width: 110px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--kcb-bg-soft);
    border-radius: var(--kcb-radius);
    color: var(--kcb-text-muted);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.25s ease;
    position: relative;
    border: 1px solid var(--kcb-border);
}
.kcb-step.is-active {
    background: var(--kcb-primary);
    color: #fff;
    border-color: var(--kcb-primary);
    box-shadow: var(--kcb-shadow-md);
}
.kcb-step.is-completed {
    background: var(--kcb-primary-light);
    color: var(--kcb-primary);
    border-color: var(--kcb-primary-light);
}
.kcb-step-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
}
.kcb-step:not(.is-active) .kcb-step-num {
    background: #fff;
    color: var(--kcb-text-muted);
    border: 1px solid var(--kcb-border);
}
.kcb-step.is-completed .kcb-step-num {
    background: var(--kcb-primary);
    color: #fff;
    border: none;
}
.kcb-step.is-completed .kcb-step-num::after {
    content: '✓';
}
.kcb-step.is-completed .kcb-step-num span {
    display: none;
}

@media (max-width: 600px) {
    .kcb-step-label { display: none; }
    .kcb-step { min-width: 56px; flex: 0 0 56px; padding: 10px; justify-content: center; }
}

/* ====== Layout ====== */
.kcb-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 900px) {
    .kcb-layout { grid-template-columns: 1fr; }
}

/* ====== Panels ====== */
.kcb-panel {
    display: none;
    background: var(--kcb-bg-card);
    border: 1px solid var(--kcb-border);
    border-radius: var(--kcb-radius-lg);
    padding: 32px;
    box-shadow: var(--kcb-shadow-sm);
    animation: kcbFadeIn 0.3s ease;
}
.kcb-panel.is-active { display: block; }

@keyframes kcbFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.kcb-panel-header {
    margin-bottom: 28px;
}
.kcb-panel-header h2 {
    font-size: 26px;
    margin-bottom: 8px;
}
.kcb-panel-header p {
    font-size: 15px;
    color: var(--kcb-text-soft);
}

.kcb-panel-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--kcb-border);
}

/* ====== Buttons ====== */
.kcb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #fff;
    border: 1px solid var(--kcb-border);
    border-radius: 12px;
    color: var(--kcb-text);
    font-family: var(--kcb-font);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}
.kcb-btn:hover {
    background: var(--kcb-bg-soft);
    border-color: var(--kcb-border-strong);
    transform: translateY(-1px);
}
.kcb-btn-primary {
    background: var(--kcb-primary);
    color: #fff;
    border-color: var(--kcb-primary);
    box-shadow: 0 4px 12px rgba(10,111,182,0.25);
}
.kcb-btn-primary:hover {
    background: var(--kcb-primary-dark);
    border-color: var(--kcb-primary-dark);
    box-shadow: 0 6px 16px rgba(10,111,182,0.35);
}
.kcb-btn-primary:disabled {
    background: var(--kcb-text-muted);
    border-color: var(--kcb-text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.kcb-btn-back {
    background: transparent;
    border-color: var(--kcb-border);
    color: var(--kcb-text-soft);
}

/* ====== Kayak grid (stap 1) ====== */
.kcb-kayak-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.kcb-kayak-card {
    background: var(--kcb-bg-card);
    border: 2px solid var(--kcb-border);
    border-radius: var(--kcb-radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}
.kcb-kayak-card:hover {
    border-color: var(--kcb-primary);
    transform: translateY(-3px);
    box-shadow: var(--kcb-shadow-md);
}
.kcb-kayak-card.is-selected {
    border-color: var(--kcb-primary);
    box-shadow: 0 0 0 4px var(--kcb-primary-light), var(--kcb-shadow-md);
}
.kcb-kayak-card.is-selected::after {
    content: '✓';
    position: absolute;
}

.kcb-kayak-image {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--kcb-primary-light) 0%, #d3e8f7 100%);
    position: relative;
    overflow: hidden;
    padding: 12px;
}
.kcb-kayak-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
.kcb-kayak-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kcb-primary);
}
.kcb-kayak-image-placeholder svg {
    width: 80px;
    height: 80px;
}

.kcb-stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--kcb-success-light);
    color: var(--kcb-success);
}
.kcb-stock-badge.is-medium { background: var(--kcb-warning-light); color: var(--kcb-warning); }
.kcb-stock-badge.is-low { background: var(--kcb-danger-light); color: var(--kcb-danger); }

.kcb-kayak-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}
.kcb-kayak-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--kcb-text);
    line-height: 1.3;
}
.kcb-kayak-desc {
    font-size: 13px;
    color: var(--kcb-text-soft);
    line-height: 1.5;
    flex: 1;
}

.kcb-kayak-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--kcb-border);
}
.kcb-from-price {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.kcb-from-label {
    font-size: 11px;
    color: var(--kcb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.kcb-from-amount {
    font-size: 20px;
    font-weight: 800;
    color: var(--kcb-primary);
    margin-top: 2px;
}
.kcb-from-suffix {
    font-size: 11px;
    color: var(--kcb-text-muted);
}
.kcb-btn-select {
    padding: 8px 14px;
    font-size: 13px;
    background: var(--kcb-primary-light);
    color: var(--kcb-primary);
    border-color: transparent;
}
.kcb-kayak-card.is-selected .kcb-btn-select {
    background: var(--kcb-primary);
    color: #fff;
}

/* ====== Datum stap ====== */
.kcb-date-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 600px) {
    .kcb-date-grid { grid-template-columns: 1fr; }
}

.kcb-date-field label,
.kcb-form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--kcb-text);
    margin-bottom: 6px;
}
.req { color: var(--kcb-danger); font-weight: 700; }

.kcb-input-wrap {
    position: relative;
}
/* Het SVG icon element verbergen (legacy) */
.kcb-input-icon {
    display: none;
}
/* Date input: kalender-icoon als achtergrond. Werkt voor zowel het originele input als Flatpickr's altInput. */
.kcb-input-wrap input.kcb-date-input,
.kcb-input-wrap input.kcb-time-input,
.kcb-input-wrap input[type="text"],
.kcb-input-wrap input[type="time"] {
    width: 100%;
    padding: 14px 14px 14px 44px !important;
    border: 1px solid var(--kcb-border);
    border-radius: 12px;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 18px 18px;
    font-family: var(--kcb-font);
    font-size: 15px;
    color: var(--kcb-text);
    transition: all 0.2s ease;
}
/* Date inputs krijgen kalender icoon */
.kcb-input-wrap input.kcb-date-input,
.kcb-input-wrap input[type="text"]:not([type="time"]) {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 2v3M16 2v3M3 8h18M5 6h14a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2z' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
/* Time inputs krijgen klok icoon */
.kcb-input-wrap input.kcb-time-input,
.kcb-input-wrap input[type="time"] {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='9' stroke='%236b7280' stroke-width='1.5'/%3E%3Cpath d='M12 7v5l3 2' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
/* Form field inputs hebben geen icoon */
.kcb-form-field input,
.kcb-form-field textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--kcb-border);
    border-radius: 12px;
    background: #fff;
    font-family: var(--kcb-font);
    font-size: 15px;
    color: var(--kcb-text);
    transition: all 0.2s ease;
}
.kcb-input-wrap input:focus,
.kcb-form-field input:focus,
.kcb-form-field textarea:focus {
    outline: none;
    border-color: var(--kcb-primary);
    box-shadow: 0 0 0 4px var(--kcb-primary-light);
}
.kcb-date-input { cursor: pointer; }

.kcb-date-info {
    margin: 20px 0;
}
.kcb-info-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--kcb-primary-light);
    border-radius: var(--kcb-radius);
    color: var(--kcb-primary-dark);
}
.kcb-info-card svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--kcb-primary);
}
.kcb-info-card div {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}
.kcb-info-card strong { font-size: 14px; font-weight: 700; }
.kcb-info-card span { font-size: 13px; opacity: 0.85; }

.kcb-error-msg {
    padding: 12px 16px;
    background: var(--kcb-danger-light);
    color: var(--kcb-danger);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin: 16px 0;
}

/* ====== Extras ====== */
.kcb-extras-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.kcb-extra-item {
    display: grid;
    grid-template-columns: 48px 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--kcb-bg-card);
    border: 2px solid var(--kcb-border);
    border-radius: var(--kcb-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.kcb-extra-item:hover {
    border-color: var(--kcb-primary);
    background: var(--kcb-bg-soft);
}
.kcb-extra-item:has(.kcb-extra-checkbox:checked) {
    border-color: var(--kcb-primary);
    background: var(--kcb-primary-light);
}
.kcb-extra-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.kcb-extra-icon {
    width: 48px;
    height: 48px;
    background: var(--kcb-bg-soft);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kcb-primary);
}
.kcb-extra-icon svg { width: 26px; height: 26px; }
.kcb-extra-item:has(.kcb-extra-checkbox:checked) .kcb-extra-icon {
    background: var(--kcb-primary);
    color: #fff;
}
.kcb-extra-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.kcb-extra-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--kcb-text);
    line-height: 1.3;
}
.kcb-extra-desc {
    font-size: 13px;
    color: var(--kcb-text-soft);
}
.kcb-extra-price {
    font-weight: 700;
    color: var(--kcb-text);
    font-size: 14px;
    white-space: nowrap;
}
.kcb-extra-price span { font-size: 11px; color: var(--kcb-text-muted); font-weight: 500; }
.kcb-extra-toggle {
    width: 24px;
    height: 24px;
    border: 2px solid var(--kcb-border-strong);
    border-radius: 50%;
    background: #fff;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.kcb-extra-item:has(.kcb-extra-checkbox:checked) .kcb-extra-toggle {
    background: var(--kcb-primary);
    border-color: var(--kcb-primary);
}
.kcb-extra-item:has(.kcb-extra-checkbox:checked) .kcb-extra-toggle::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

@media (max-width: 600px) {
    .kcb-extra-item {
        grid-template-columns: 40px 1fr auto;
        gap: 12px;
        padding: 14px;
    }
    .kcb-extra-icon { width: 40px; height: 40px; }
    .kcb-extra-toggle { display: none; }
    .kcb-extra-price { grid-column: 2 / 4; font-size: 12px; opacity: 0.8; }
}

/* ====== Form ====== */
.kcb-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.kcb-form-field.kcb-full-width { grid-column: 1 / -1; }

@media (max-width: 600px) {
    .kcb-form-grid { grid-template-columns: 1fr; }
    .kcb-form-field.kcb-full-width { grid-column: auto; }
}

.kcb-form-field textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* ====== Terms checkbox ====== */
.kcb-terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--kcb-bg-soft);
    border: 1px solid var(--kcb-border);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
}
.kcb-terms-checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.kcb-terms-box {
    width: 22px;
    height: 22px;
    border: 2px solid var(--kcb-border-strong);
    border-radius: 6px;
    background: #fff;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 1px;
}
.kcb-terms-checkbox input:checked ~ .kcb-terms-box {
    background: var(--kcb-primary);
    border-color: var(--kcb-primary);
}
.kcb-terms-checkbox input:checked ~ .kcb-terms-box::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.kcb-terms-label { font-size: 14px; line-height: 1.5; }
.kcb-terms-label a {
    color: var(--kcb-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ====== Submit spinner ====== */
.kcb-spinner {
    width: 18px;
    height: 18px;
    animation: kcbSpin 0.8s linear infinite;
}
@keyframes kcbSpin {
    to { transform: rotate(360deg); }
}

/* ====== Sidebar / summary ====== */
.kcb-sidebar {
    position: sticky;
    top: 20px;
}
@media (max-width: 900px) {
    .kcb-sidebar { position: static; }
}

.kcb-summary {
    background: var(--kcb-bg-card);
    border: 1px solid var(--kcb-border);
    border-radius: var(--kcb-radius-lg);
    padding: 24px;
    box-shadow: var(--kcb-shadow-sm);
}

.kcb-summary-title {
    font-size: 18px;
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--kcb-border);
    color: var(--kcb-text);
}

.kcb-summary-empty {
    text-align: center;
    padding: 28px 12px;
    color: var(--kcb-text-muted);
}
.kcb-summary-empty svg {
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    color: var(--kcb-primary);
}
.kcb-summary-empty p {
    font-size: 14px;
    color: var(--kcb-text-muted);
}

.kcb-summary-row {
    display: block;
    padding: 10px 0;
}
.kcb-summary-label {
    display: block;
    font-size: 11px;
    color: var(--kcb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 4px;
}
.kcb-summary-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--kcb-text);
    text-align: left;
    line-height: 1.3;
}

.kcb-summary-kayak-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--kcb-bg-soft);
    border-radius: 10px;
    margin-bottom: 4px;
    width: 100%;
}
.kcb-summary-kayak-thumb {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--kcb-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kcb-primary);
}
.kcb-summary-kayak-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    display: block;
}
.kcb-summary-kayak-thumb svg {
    width: 32px;
    height: 32px;
}
.kcb-summary-kayak-info {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}
.kcb-summary-kayak-info-label {
    display: block;
    font-size: 11px;
    color: var(--kcb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 4px;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}
.kcb-summary-kayak-info-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--kcb-text);
    line-height: 1.3;
    word-break: normal !important;
    overflow-wrap: break-word;
    white-space: normal;
    hyphens: none;
}

.kcb-summary-divider {
    height: 1px;
    background: var(--kcb-border);
    margin: 12px 0;
}

.kcb-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: var(--kcb-text-soft);
}
.kcb-summary-line span:last-child {
    font-weight: 600;
    color: var(--kcb-text);
}

.kcb-summary-extras {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.kcb-summary-extra-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: var(--kcb-text-soft);
}
.kcb-summary-extra-line span:last-child {
    color: var(--kcb-text);
    font-weight: 500;
}

.kcb-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    margin-top: 8px;
    border-top: 2px solid var(--kcb-primary);
    font-size: 18px;
    font-weight: 800;
    color: var(--kcb-primary);
}

.kcb-summary-info {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--kcb-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.kcb-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--kcb-text-soft);
}
.kcb-info-row svg {
    width: 18px;
    height: 18px;
    color: var(--kcb-success);
    flex-shrink: 0;
}
.kcb-info-row a {
    color: var(--kcb-primary);
    font-weight: 600;
    text-decoration: none;
}

/* ====== Modal ====== */
.kcb-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.kcb-modal.is-open { display: flex; }
.kcb-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 30, 45, 0.6);
    backdrop-filter: blur(4px);
}
.kcb-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: var(--kcb-radius-lg);
    max-width: 640px;
    width: calc(100% - 32px);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--kcb-shadow-lg);
    animation: kcbModalIn 0.25s ease;
}
@keyframes kcbModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.kcb-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--kcb-text-muted);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.kcb-modal-close:hover { background: var(--kcb-bg-soft); color: var(--kcb-text); }
.kcb-modal-content {
    padding: 32px 28px 16px;
    overflow-y: auto;
    flex: 1;
}
.kcb-modal-content,
.kcb-modal-content * {
    column-count: auto !important;
    columns: auto !important;
    float: none !important;
}
.kcb-modal-content h2 {
    font-size: 22px;
    margin: 0 0 20px;
    color: var(--kcb-primary);
    font-weight: 700;
    line-height: 1.3;
}
.kcb-modal-content h3 {
    font-size: 16px;
    margin: 24px 0 8px;
    color: var(--kcb-text);
    font-weight: 700;
    line-height: 1.4;
}
.kcb-modal-content h3:first-child {
    margin-top: 0;
}
.kcb-modal-content p {
    color: var(--kcb-text);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px;
    display: block;
    width: 100%;
}
.kcb-modal-content ul,
.kcb-modal-content ol {
    margin: 0 0 12px 24px;
    padding: 0;
    line-height: 1.6;
    color: var(--kcb-text);
    font-size: 14px;
}
.kcb-modal-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--kcb-border);
    text-align: right;
    background: var(--kcb-bg-soft);
    border-radius: 0 0 var(--kcb-radius-lg) var(--kcb-radius-lg);
}

/* ====== Flatpickr custom theming ====== */
.flatpickr-calendar {
    border-radius: var(--kcb-radius) !important;
    border: 1px solid var(--kcb-border) !important;
    box-shadow: var(--kcb-shadow-lg) !important;
    font-family: var(--kcb-font) !important;
    padding: 8px !important;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange {
    background: var(--kcb-primary) !important;
    border-color: var(--kcb-primary) !important;
    color: #fff !important;
}
.flatpickr-day.inRange {
    background: var(--kcb-primary-light) !important;
    border-color: var(--kcb-primary-light) !important;
    color: var(--kcb-primary-dark) !important;
    box-shadow: -5px 0 0 var(--kcb-primary-light), 5px 0 0 var(--kcb-primary-light) !important;
}
.flatpickr-day:hover { background: var(--kcb-bg-soft) !important; }
.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    color: var(--kcb-text-muted) !important;
    background: transparent !important;
    text-decoration: line-through;
    cursor: not-allowed;
}
.flatpickr-day.flatpickr-disabled {
    background: var(--kcb-danger-light) !important;
    color: var(--kcb-danger) !important;
    text-decoration: line-through;
}

/* Empty state */
.kcb-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px;
    color: var(--kcb-text-muted);
    background: var(--kcb-bg-soft);
    border-radius: var(--kcb-radius);
}
