@import url('https://fonts.googleapis.com/css2?family=Readex+Pro:wght@300;400;500;600;700&display=swap');

.bk,
.bk * {
    box-sizing: border-box;
}

.bk {
    --bk-ink: #0d2b2d;
    --bk-primary: #0b6b6c;
    --bk-primary-dark: #08484a;
    --bk-mint: #e4f2f0;
    --bk-secondary: #e5a634;
    --bk-line: #d9e4e2;
    --bk-muted: #668083;
    --bk-danger: #c0392b;
    --bk-radius: 20px;
    width: min(100%, 860px);
    margin: 24px auto;
    overflow: hidden;
    border: 1px solid rgba(8, 72, 74, 0.08);
    border-radius: var(--bk-radius);
    background: #fff;
    box-shadow: 0 10px 30px -20px rgba(8, 72, 74, 0.18), 0 0 0 1px rgba(8, 72, 74, 0.08);
    color: var(--bk-ink);
    direction: rtl;
    font-family: 'Readex Pro', Tahoma, sans-serif;
    line-height: 1.65;
    text-align: right;
}

.bk button,
.bk input,
.bk textarea {
    margin: 0;
    color: inherit;
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
}

.bk button { cursor: pointer; }

.bk button:focus-visible,
.bk input:focus-visible,
.bk textarea:focus-visible {
    outline: 3px solid var(--bk-secondary);
    outline-offset: 3px;
}

.bk-top {
    position: relative;
    overflow: hidden;
    padding: 27px 28px 19px;
    background: linear-gradient(135deg, var(--bk-primary-dark), var(--bk-primary));
    color: #fff;
}

.bk-top::after {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 125%, rgba(229, 166, 52, 0.3), transparent 40%), radial-gradient(circle at 96% -25%, rgba(255, 255, 255, 0.14), transparent 36%);
    content: '';
    pointer-events: none;
}

.bk-top__intro,
.bk-steps { position: relative; z-index: 1; }

.bk-kicker {
    display: inline-block;
    margin-bottom: 3px;
    color: #f5d58f;
    font-size: 0.76rem;
    font-weight: 500;
}

.bk-top h2,
.bk-panel h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.5;
}

.bk-top__intro p {
    margin: 3px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
}

.bk-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.bk-step {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.bk-step:not(:last-child)::before,
.bk-step:not(:last-child)::after {
    position: absolute;
    top: 19px;
    right: calc(50% + 25px);
    width: calc(100% - 50px);
    height: 3px;
    border-radius: 4px;
    content: '';
}

.bk-step:not(:last-child)::before { background: rgba(255, 255, 255, 0.22); }

.bk-step:not(:last-child)::after {
    background: var(--bk-secondary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.bk-step.is-done:not(:last-child)::after { transform: scaleX(1); }

.bk-dot {
    position: relative;
    z-index: 1;
    display: grid;
    width: 40px;
    aspect-ratio: 1;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: var(--bk-primary);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    font-weight: 600;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.bk-step.is-active .bk-dot {
    transform: scale(1.1);
    border-color: var(--bk-secondary);
    background: var(--bk-secondary);
    box-shadow: 0 0 0 4px rgba(229, 166, 52, 0.22);
    color: var(--bk-ink);
}

.bk-step.is-done .bk-dot {
    border-color: #fff;
    background: #fff;
    color: var(--bk-primary);
}

.bk-lbl {
    color: rgba(255, 255, 255, 0.63);
    font-size: 0.72rem;
    text-align: center;
    white-space: nowrap;
}

.bk-step.is-active .bk-lbl,
.bk-step.is-done .bk-lbl { color: #fff; font-weight: 500; }

.bk-body { min-height: 410px; padding: 30px 32px 25px; }

.bk-panel[hidden],
.bk-actions[hidden] { display: none !important; }

.bk-panel.is-active { animation: bk-enter 0.36s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes bk-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.bk-panel h3 { color: var(--bk-ink); }

.bk-sub {
    margin: 5px 0 22px;
    color: var(--bk-muted);
    font-size: 0.9rem;
}

.bk-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 13px;
}

.bk-type {
    position: relative;
    display: flex;
    min-height: 90px;
    align-items: center;
    gap: 13px;
    padding: 15px;
    border: 2px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: #fff;
    text-align: right;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    animation: bk-pop 0.32s ease both;
    animation-delay: calc(var(--card-index, 0) * 35ms);
}

.bk-type:hover {
    transform: translateY(-2px);
    border-color: var(--bk-primary);
    background: var(--bk-mint);
    box-shadow: 0 8px 16px -12px rgba(11, 107, 108, 0.4);
}

.bk-type.is-selected { border-color: var(--bk-primary); background: var(--bk-mint); }

.bk-type.is-selected::after {
    position: absolute;
    top: 10px;
    left: 10px;
    display: grid;
    width: 20px;
    aspect-ratio: 1;
    place-items: center;
    border-radius: 50%;
    background: var(--bk-primary);
    color: #fff;
    content: '✓';
    font-size: 0.72rem;
    font-weight: 700;
    animation: bk-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.bk-type__icon {
    display: grid;
    width: 46px;
    flex: 0 0 46px;
    aspect-ratio: 1;
    place-items: center;
    border-radius: var(--bk-radius);
    background: var(--bk-mint);
    color: var(--bk-primary);
    font-size: 1.25rem;
    font-weight: 600;
    transition: background 0.25s, color 0.25s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bk-type__icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bk-type.is-selected .bk-type__icon { transform: rotate(-8deg) scale(1.08); background: var(--bk-primary); color: #fff; }
.bk-type__content { display: block; min-width: 0; }
.bk-type__content strong, .bk-type__content small { display: block; }
.bk-type__content strong { color: var(--bk-ink); font-size: 0.96rem; font-weight: 600; }
.bk-type__content small { margin-top: 3px; color: var(--bk-muted); font-size: 0.77rem; }

.bk-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 25px 14px;
    border: 2px dashed var(--bk-line);
    border-radius: var(--bk-radius);
    color: var(--bk-muted);
    text-align: center;
}

.bk-dt {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
    gap: 22px;
}

.bk-cal { padding: 15px; border: 2px solid var(--bk-line); border-radius: var(--bk-radius); }
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bk-cal-head strong { font-size: 0.94rem; font-weight: 600; text-align: center; }

.bk-nav {
    display: grid;
    width: 36px;
    flex: 0 0 36px;
    aspect-ratio: 1;
    place-items: center;
    padding: 0 !important;
    border: 0 !important;
    border-radius: var(--bk-radius) !important;
    background: var(--bk-mint) !important;
    color: var(--bk-primary) !important;
    font-family: Arial, sans-serif !important;
    font-size: 1.7rem !important;
    line-height: 1;
}

.bk-nav:hover:not(:disabled) { background: var(--bk-mint) !important; color: var(--bk-primary) !important; }
.bk-nav:disabled { cursor: not-allowed; opacity: 0.38; }

.bk-weekdays,
.bk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }

.bk-weekdays span { padding: 4px 0 8px; color: var(--bk-muted); font-size: 0.67rem; text-align: center; }

.bk-day {
    display: grid;
    min-width: 0;
    aspect-ratio: 1;
    place-items: center;
    padding: 0 !important;
    border: 2px solid transparent !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: var(--bk-ink) !important;
    font-size: 0.82rem !important;
    line-height: 1;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.bk-day.is-available:hover:not(:disabled):not(.is-selected) { transform: scale(1.08); background: var(--bk-mint) !important; }
.bk-day.is-today { border-color: var(--bk-primary) !important; }
.bk-day.is-selected { border-color: var(--bk-secondary) !important; background: var(--bk-secondary) !important; font-weight: 700; }
.bk-day:disabled:not(.bk-day--empty) { color: #b9c8c6 !important; cursor: not-allowed; }
.bk-day--empty { visibility: hidden; }

.bk-legend { display: flex; flex-wrap: wrap; gap: 8px 13px; margin-top: 14px; color: var(--bk-muted); font-size: 0.68rem; }
.bk-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bk-legend i { width: 9px; height: 9px; border-radius: 50%; background: #e1e9e8; }
.bk-legend i.is-available { background: var(--bk-primary); }
.bk-legend i.is-selected { background: var(--bk-secondary); }

.bk-slots h4 { margin: 0 0 3px; color: var(--bk-ink); font-size: 0.97rem; font-weight: 600; }
.bk-hint { min-height: 25px; margin: 0 0 12px; color: var(--bk-muted); font-size: 0.79rem; }
.bk-period { margin-top: 14px; }
.bk-period[hidden] { display: none !important; }
.bk-period h5 { margin: 0 0 8px; color: var(--bk-muted); font-size: 0.8rem; font-weight: 500; }
.bk-slot-empty { margin: 12px 0 0; color: var(--bk-muted); font-size: 0.82rem; }
.bk-slot-empty[hidden] { display: none !important; }

.bk-slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }

.bk-slot {
    min-height: 40px;
    padding: 7px 8px !important;
    border: 2px solid var(--bk-line) !important;
    border-radius: var(--bk-radius) !important;
    background: #fff !important;
    color: var(--bk-ink) !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    white-space: nowrap;
    animation: bk-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: calc(var(--slot-index, 0) * 28ms);
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.bk-slot:hover:not(:disabled):not(.is-selected) { transform: translateY(-2px); border-color: var(--bk-primary) !important; background: var(--bk-mint) !important; color: var(--bk-primary) !important; }
.bk-slot.is-selected { border-color: var(--bk-primary) !important; background: var(--bk-primary) !important; color: #fff !important; }
.bk-slot:disabled { border-color: var(--bk-line) !important; background: #f3f6f6 !important; color: #aebdbb !important; text-decoration: line-through; cursor: not-allowed; }

.bk-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.bk-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.bk-field--full { grid-column: 1 / -1; }
.bk-field label { color: var(--bk-ink); font-size: 0.84rem; font-weight: 500; }
.bk-field label span { color: var(--bk-muted); font-size: 0.76rem; font-weight: 300; }

.bk-field input,
.bk-field textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 2px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: #fbfdfd;
    box-shadow: none;
    font-size: 0.9rem;
    text-align: right;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.bk-field input[dir="ltr"] { text-align: left; }
.bk-field textarea { min-height: 90px; resize: vertical; }
.bk-field input:focus, .bk-field textarea:focus { border-color: var(--bk-primary); background: #fff; box-shadow: 0 0 0 4px rgba(11, 107, 108, 0.12); outline: none; }
.bk-field small { display: none; color: var(--bk-danger); font-size: 0.74rem; }
.bk-field.is-invalid input { border-color: var(--bk-danger); }
.bk-field.is-invalid small { display: block; }

.bk-summary { overflow: hidden; border: 2px solid var(--bk-line); border-radius: var(--bk-radius); }
.bk-summary__row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 15px; border-bottom: 1px solid var(--bk-line); }
.bk-summary__row:last-child { border-bottom: 0; }
.bk-summary__row span { flex: 0 0 auto; color: var(--bk-muted); font-size: 0.81rem; }
.bk-summary__row strong { overflow-wrap: anywhere; color: var(--bk-ink); font-size: 0.84rem; font-weight: 500; text-align: left; }
.bk-summary__row.is-highlighted { background: var(--bk-mint); }

.bk-error { margin: 0 0 18px; padding: 11px 14px; border: 1px solid #f2c3bc; border-radius: var(--bk-radius); background: #fff2ef; color: var(--bk-danger); font-size: 0.84rem; }
.bk-success { text-align: center; }
.bk-check { display: block; width: 104px; height: 104px; margin: 0 auto 15px; }
.bk-check .c { fill: none; stroke: var(--bk-primary); stroke-width: 4; stroke-dasharray: 190; stroke-dashoffset: 190; }
.bk-check .t { fill: none; stroke: var(--bk-secondary); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; }
.bk-panel.is-active .bk-check .c { animation: bk-check-draw 0.8s ease forwards; }
.bk-panel.is-active .bk-check .t { animation: bk-check-draw 0.5s ease 0.7s forwards; }
.bk-success .bk-summary { margin: 18px 0; text-align: right; }
.bk-reference { color: var(--bk-primary); font-weight: 600; }

.bk-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 27px; padding-top: 19px; border-top: 1px solid var(--bk-line); }

.bk-btn {
    display: inline-flex;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px !important;
    border: 0 !important;
    border-radius: var(--bk-radius) !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    line-height: 1.3;
    transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.bk-btn--primary { background: var(--bk-primary) !important; box-shadow: 0 7px 15px -10px var(--bk-primary); color: #fff !important; }
.bk-btn--primary:hover:not(:disabled) { transform: translateY(-1px); background: var(--bk-mint) !important; color: var(--bk-primary) !important; }
.bk-btn--primary:disabled { cursor: not-allowed; opacity: 0.42; }
.bk-btn--ghost { background: transparent !important; color: var(--bk-primary) !important; }
.bk-btn--ghost:hover { background: var(--bk-mint) !important; }
.bk-btn.is-loading { pointer-events: none; opacity: 0.72; }
.bk-btn.is-loading::after { width: 15px; aspect-ratio: 1; border: 2px solid currentColor; border-left-color: transparent; border-radius: 50%; content: ''; animation: bk-spin 0.65s linear infinite; }

@keyframes bk-spin { to { transform: rotate(360deg); } }
@keyframes bk-check-draw { to { stroke-dashoffset: 0; } }
@keyframes bk-pop { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 680px) {
    .bk { margin: 14px auto; }
    .bk-top { padding: 22px 14px 17px; }
    .bk-top h2 { font-size: 1.15rem; }
    .bk-steps { margin-top: 22px; }
    .bk-dot { width: 33px; font-size: 0.78rem; }
    .bk-step:not(:last-child)::before, .bk-step:not(:last-child)::after { top: 15px; left: calc(50% + 20px); width: calc(100% - 40px); height: 2px; }
    .bk-lbl { display: none; }
    .bk-step.is-active .bk-lbl { position: absolute; top: 39px; display: block; max-width: 76px; overflow: hidden; font-size: 0.64rem; text-overflow: ellipsis; }
    .bk-body { min-height: 350px; padding: 24px 16px 19px; }
    .bk-dt, .bk-fields { grid-template-columns: 1fr; gap: 16px; }
    .bk-field--full { grid-column: auto; }
    .bk-btn { padding: 10px 19px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .bk *, .bk *::before, .bk *::after { animation-duration: 0.01ms !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
    .bk-check .c, .bk-check .t { animation: none !important; stroke-dashoffset: 0 !important; }
}