/* ===================================================
   KSM Booking Widget — Two-Stage Calendar Form
   =================================================== */

.ksm-booking-widget * {
    box-sizing: border-box;
}

/* ── Card shell ── */
.ksm-bk-card {
    display: flex;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 20px rgba(0,0,0,.09);
    overflow: hidden;
    min-height: 460px;
}

/* ── Left info panel ── */
.ksm-bk-left {
    width: 280px;
    min-width: 180px;
    padding: 28px 22px;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.ksm-bk-back {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #dc2626;
    background: #fff;
    color: #dc2626;
    cursor: pointer;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}
.ksm-bk-back:hover { background: #fee2e2; }

.ksm-bk-cat {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 8px;
}

.ksm-bk-headline {
    font-size: 21px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 18px;
    line-height: 1.3;
}

.ksm-bk-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    margin-bottom: 10px;
}
.ksm-bk-meta svg { flex-shrink: 0; color: #6b7280; }

/* ── Right interactive panel ── */
.ksm-bk-right {
    flex: 1;
    padding: 26px 24px;
    min-width: 0;
    overflow: hidden;
}

.ksm-bk-s-heading {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 18px;
}

/* ── Calendar nav ── */
.ksm-bk-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.ksm-bk-cal-nav button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 26px;
    color: #374151;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}
.ksm-bk-cal-nav button:hover:not([disabled]) {
    background: #fee2e2;
    color: #dc2626;
}
.ksm-bk-cal-nav button[disabled] {
    color: #d1d5db;
    cursor: default;
}
.ksm-bk-cal-title {
    font-weight: 700;
    font-size: 15px;
    color: #111827;
}

/* ── Calendar grid ── */
.ksm-bk-cal-hdr {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 2px;
}
.ksm-bk-cal-hdr > div {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    padding: 4px 0;
}

.ksm-bk-cal-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.ksm-bk-cal-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1px 0 4px;
    position: relative;
}

.ksm-day-num {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    color: #9ca3af;
    font-weight: 400;
}

.ksm-can-book { cursor: pointer; }
.ksm-can-book .ksm-day-num {
    background: #fee2e2;
    color: #dc2626;
    font-weight: 600;
}
.ksm-can-book:hover .ksm-day-num { background: #fca5a5; }
.ksm-is-sel .ksm-day-num {
    background: #dc2626 !important;
    color: #fff !important;
}

.ksm-today-dot {
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #dc2626;
}

/* ── Calendar + time-slot row ── */
.ksm-bk-cal-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.ksm-bk-cal-wrap { flex: 1; min-width: 0; }

.ksm-bk-timeslot-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 108px;
    padding-top: 46px;
}

.ksm-time-btn {
    border: 2px solid #dc2626;
    border-radius: 6px;
    padding: 10px 8px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #dc2626;
    line-height: 1.3;
}
.ksm-time-btn:hover { background: #fee2e2; }
.ksm-time-sel {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
    color: #fff !important;
}

.ksm-go-btn {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    width: 100%;
}
.ksm-go-btn:hover { background: #b91c1c; }

/* Timezone row removed (not used) */

/* ── Stage 2: personal details form ── */
.ksm-bk-form-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px 18px 4px;
    margin-bottom: 14px;
}
.ksm-bk-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.ksm-bk-form-row label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.ksm-bk-form-row input {
    padding: 9px 11px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    outline: none;
    width: 100%;
}
.ksm-bk-form-row input:focus { border-color: #dc2626; }
.ksm-bk-form-row input::placeholder { color: #9ca3af; font-weight: 400; }

/* Notes row — single column, textarea mirrors inputs exactly */
.ksm-bk-form-row--full {
    grid-template-columns: 1fr;
}
.ksm-bk-form-row textarea {
    padding: 9px 11px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    outline: none;
    width: 100%;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
    font-family: inherit;
    line-height: inherit;
}
.ksm-bk-form-row textarea:focus { border-color: #dc2626; }
.ksm-bk-form-row textarea::placeholder { color: #9ca3af; font-weight: 400; }

.ksm-bk-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: #374151;
    line-height: 1.5;
    margin-bottom: 8px;
}
.ksm-bk-terms input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #dc2626;
    width: auto;
    padding: 0;
    border: none;
}
.ksm-bk-terms a { color: #2563eb; }

.ksm-bk-sub-row { display: flex; justify-content: flex-end; }
.ksm-bk-sub-btn {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.ksm-bk-sub-btn:hover { background: #b91c1c; }

/* Confirmation card rows: use inline SVG icons consistently */
.ksm-bk-confirm-card .ksm-bk-confirm-row { display:flex; align-items:center; gap:10px; font-size:13px; }
.ksm-bk-confirm-card .ksm-bk-confirm-row svg { width:18px; height:18px; flex-shrink:0; color:#6b7280; }
.ksm-bk-confirm-card .ksm-bk-confirm-row span { font-weight:600; }

/* ── Responsive ── */
@media (max-width: 660px) {
    .ksm-bk-card { flex-direction: column; }
    .ksm-bk-left { width: auto; min-width: auto; border-right: none; border-bottom: 1px solid #e5e7eb; padding: 18px; }
    .ksm-bk-right { padding: 18px; }
    .ksm-bk-cal-row { flex-direction: column; }
    .ksm-bk-timeslot-col { flex-direction: row; flex-wrap: wrap; padding-top: 0; min-width: 0; }
    .ksm-bk-form-row { grid-template-columns: 1fr; }
}

/* Kanban stage badge */
.ksm-kanban-card { position: relative; }
.ksm-stage-badge { position: absolute; top: 8px; right: 8px; padding: 4px 8px; border-radius: 6px; font-weight:700; font-size:12px; color:#fff; line-height:1; }
.ksm-stage-s1 { background: #0891b2; }
.ksm-stage-s2 { background: #d97706; }
.ksm-stage-done { background: #059669; }

/* WP admin filter links spacing when this stylesheet is used in admin context */
.subsubsub {
    margin: 8px 25px 0;
}
