.bk-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bk-overlay.bk-open {
    opacity: 1;
    pointer-events: all;
}

.bk-modal {
    position: relative;
    width: min(96vw, 960px);
    max-height: 92vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    padding: clamp(1.2rem, 3vw, 2rem);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.bk-content {
    width: 100%;
}

.bk-overlay.bk-open .bk-modal {
    transform: translateY(0);
}

.bk-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 2.2rem;
    height: 2.2rem;
    border: none;
    background: rgba(193, 194, 232, 0.2);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s;
    z-index: 2;
}

.bk-close:hover {
    background: rgba(193, 194, 232, 0.4);
}

/* Modal title */
.bk-header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 1rem;
}

.bk-title {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 2.8vw, 1.7rem);
    margin: 0;
    padding: 0;
    color: #000000;
    text-align: center;
    letter-spacing: 0;
    line-height: 1.2;
}

.bk-subtitle {
    font-size: 0.82rem;
    color: rgba(0, 0, 0, 0.45);
    margin: 0.3rem 0 0 0;
    padding: 0;
    text-align: center;
    letter-spacing: 0;
}

/* Calendar header */
.bk-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.bk-month {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #000000;
}

.bk-nav {
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(193, 194, 232, 0.5);
    background: #ffffff;
    border-radius: 50%;
    font-size: 0.95rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.bk-nav:hover {
    background: rgba(193, 194, 232, 0.15);
    border-color: rgba(193, 194, 232, 0.9);
    transform: scale(1.08);
}

/* Days grid - horizontal scroll */
.bk-days-grid {
    display: flex;
    gap: 0.7rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.bk-days-grid::-webkit-scrollbar {
    height: 4px;
}

.bk-days-grid::-webkit-scrollbar-track {
    background: rgba(193, 194, 232, 0.1);
    border-radius: 2px;
}

.bk-days-grid::-webkit-scrollbar-thumb {
    background: rgba(193, 194, 232, 0.4);
    border-radius: 2px;
}

.bk-day {
    flex: 0 0 140px;
    border: 1px solid rgba(193, 194, 232, 0.4);
    border-radius: 8px;
    padding: 0.7rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    scroll-snap-align: start;
}

.bk-day:hover {
    border-color: rgba(193, 194, 232, 0.8);
    box-shadow: 0 6px 16px rgba(193, 194, 232, 0.12);
}

.bk-day-full {
    opacity: 0.35;
}

.bk-day-full .bk-day-name,
.bk-day-full .bk-day-date {
    color: rgba(0, 0, 0, 0.3);
}

.bk-day-header {
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(193, 194, 232, 0.25);
}

.bk-day-name {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: capitalize;
    display: block;
}

.bk-day-date {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.5);
}

/* Slots */
.bk-slots {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.bk-slot {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
    border-radius: 5px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.bk-slot-free {
    background: rgba(193, 194, 232, 0.08);
    border: 1px solid rgba(193, 194, 232, 0.3);
}

.bk-slot-free:hover {
    background: rgba(193, 194, 232, 0.18);
    transform: translateX(2px);
}

.bk-slot-selected {
    background: rgba(241, 79, 31, 0.08) !important;
    border-color: rgba(241, 79, 31, 0.4) !important;
}

.bk-slot-booked {
    background: rgba(0, 0, 0, 0.02);
    cursor: default;
}

.bk-slot-booked .bk-slot-time {
    color: rgba(0, 0, 0, 0.25);
}

.bk-slot-booked .bk-slot-status {
    color: rgba(0, 0, 0, 0.25);
}

.bk-slot-past {
    opacity: 0.3;
    cursor: default;
}

.bk-slot-time {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    min-width: 2.8rem;
    font-size: 0.82rem;
}

.bk-slot-status {
    font-size: 0.72rem;
    color: rgba(0, 0, 0, 0.4);
    font-style: italic;
}

.bk-slot input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.bk-slot-radio {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(193, 194, 232, 0.6);
    border-radius: 50%;
    margin-left: auto;
    transition: border-color 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.bk-slot-free:hover .bk-slot-radio {
    border-color: var(--color-cta-orange, #F14F1F);
}

.bk-slot input[type="radio"]:checked + .bk-slot-time + .bk-slot-radio,
.bk-slot-selected .bk-slot-radio {
    border-color: var(--color-cta-orange, #F14F1F);
    box-shadow: inset 0 0 0 3px var(--color-cta-orange, #F14F1F);
}

/* Action */
.bk-action {
    margin-top: 1rem;
    text-align: center;
}

.bk-btn-reserve {
    border: none;
    cursor: pointer;
    font-family: 'Mulish', sans-serif;
}

.bk-btn-reserve:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    animation: none !important;
}

.bk-btn-reserve:not(:disabled) {
    animation: ctaPulse 2.5s ease-in-out infinite;
}

@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(241, 79, 31, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(241, 79, 31, 0); }
}

/* Form */
.bk-form-header {
    margin-bottom: 1.2rem;
}

.bk-back {
    background: none;
    border: none;
    font-size: 0.88rem;
    color: rgba(0, 0, 0, 0.55);
    cursor: pointer;
    padding: 0;
    margin-bottom: 0.6rem;
    transition: color 0.2s;
}

.bk-back:hover {
    color: #000000;
}

.bk-selected-slot {
    padding: 0.7rem 0.9rem;
    background: rgba(193, 194, 232, 0.12);
    border: 1px solid rgba(193, 194, 232, 0.4);
    border-radius: 8px;
    font-size: 0.9rem;
}

.bk-selected-label {
    font-weight: 700;
    font-family: 'Jost', sans-serif;
}

.bk-invoice-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.bk-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.bk-form-row label {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: lowercase;
}

.bk-form-row label small {
    font-weight: 400;
    opacity: 0.6;
}

.bk-form-row input {
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(193, 194, 232, 0.5);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: 'Mulish', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bk-form-row input:focus {
    outline: none;
    border-color: rgba(193, 194, 232, 0.9);
    box-shadow: 0 0 0 3px rgba(193, 194, 232, 0.15);
}

/* Inline row */
.bk-form-row-inline {
    display: flex;
    gap: 0.8rem;
}

.bk-form-row-inline > .bk-form-row {
    flex: 1;
    min-width: 0;
}

/* Tabs */
.bk-tabs {
    display: flex;
    gap: 0;
    border: 1px solid rgba(193, 194, 232, 0.5);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 0.4rem;
}

.bk-tab {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: none;
    background: #ffffff;
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: rgba(0, 0, 0, 0.5);
}

.bk-tab:first-child {
    border-right: 1px solid rgba(193, 194, 232, 0.5);
}

.bk-tab-active {
    background: rgba(193, 194, 232, 0.18);
    color: #000000;
}

.bk-tab:hover:not(.bk-tab-active) {
    background: rgba(193, 194, 232, 0.08);
}

/* Firma content */
.bk-tab-firma {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(193, 194, 232, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.bk-same-address {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    margin-top: 0.6rem;
}

.bk-same-address input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--color-animated-word, #C1C2E8);
}

.bk-firm-address {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-top: 0.4rem;
}

.bk-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.bk-consent input {
    margin-top: 0.15rem;
}

.bk-consent a {
    color: inherit;
    text-decoration: underline;
}

@keyframes ctaPulseLila {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 140, 200, 0.5); }
    50% { box-shadow: 0 0 0 10px rgba(139, 140, 200, 0); }
}

.bk-btn-pay {
    margin-top: 0.4rem;
    border: none;
    cursor: pointer;
    font-family: 'Mulish', sans-serif;
    animation: ctaPulseLila 2.5s ease-in-out infinite;
}

.bk-btn-pay:hover {
    animation: none;
    transform: scale(1.03);
}

.bk-btn-pay:disabled {
    opacity: 0.5;
    animation: none;
}

.bk-form-status {
    text-align: center;
    font-size: 0.85rem;
    min-height: 1.2em;
}

@media (max-width: 640px) {
    .bk-modal {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 1rem;
    }

    .bk-day {
        flex: 0 0 130px;
    }
}
