/* YCLIENTS Booking — кастомный виджет для balance-med.ru
   Намеспейс .ybk- чтобы не конфликтовать с сайтом.
   Дизайн 1-в-1 по скринам реального YCLIENTS (шрифт, цвета, разделители). */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --y-color-green:        #86957E;
    --y-color-green-dark:   #6f7e67;
    --y-color-green-soft:   #c7d0bf;
    --y-color-green-bg:     #e9ede3;
    --y-color-bg:           #ffffff;
    --y-color-text:         #1c1c1e;
    --y-color-text-soft:    #3c3c3e;
    --y-color-muted:        #86868b;
    --y-color-line:         #ebebe8;
    --y-color-chip:         #f2f2ef;
    --y-color-chip-hover:   #e8e8e4;
    --y-color-star:         #f5b82e;
    --y-color-danger:       #d33b3b;

    --y-radius-sm:  8px;
    --y-radius-md:  12px;
    --y-radius-lg:  16px;
    --y-radius-pill: 999px;

    --y-shadow-panel: 0 12px 60px rgba(20, 30, 22, 0.22);
    --y-shadow-sticky: 0 -6px 24px rgba(20, 30, 22, 0.10);

    --y-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ==========================================================================
   Trigger — круглая кнопка «Онлайн-запись» с pulse-ring анимацией
   ========================================================================== */
.ybk-trigger {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: var(--y-color-green);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 9998;
    font-family: var(--y-font);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .5px;
    line-height: 1.15;
    text-align: center;
    padding: 0 10px;
    box-shadow: 0 8px 28px rgba(30, 40, 30, 0.28);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.ybk-trigger:hover {
    background: var(--y-color-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(30, 40, 30, 0.34);
}
.ybk-trigger:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}
.ybk-trigger.is-hidden { display: none; }

/* Pulse-rings: два расходящихся обруча вокруг кнопки */
.ybk-trigger::before,
.ybk-trigger::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--y-color-green);
    pointer-events: none;
    animation: ybk-pulse 2.4s ease-out infinite;
    opacity: 0;
}
.ybk-trigger::after {
    animation-delay: 1.2s;
}
@keyframes ybk-pulse {
    0%   { transform: scale(1);   opacity: 0.55; }
    70%  { transform: scale(1.9); opacity: 0;   }
    100% { transform: scale(1.9); opacity: 0;   }
}
@media (prefers-reduced-motion: reduce) {
    .ybk-trigger::before,
    .ybk-trigger::after { animation: none; }
}

/* ==========================================================================
   Overlay + Panel
   ========================================================================== */
.ybk-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 22, 16, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 9999;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.ybk-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.ybk-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: 600px;
    max-width: 100vw;
    background: var(--y-color-bg);
    box-shadow: var(--y-shadow-panel);
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.2, .7, .2, 1);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    font-family: var(--y-font);
    color: var(--y-color-text);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}
.ybk-panel.is-open {
    transform: translateX(0);
}
@media (max-width: 640px) {
    .ybk-panel { width: 100%; }
}

/* ==========================================================================
   Панель: шапка (back + лого + name + address)
   На entry-экране шапки нет (там баннер), на остальных — есть.
   ========================================================================== */
.ybk-header {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 10px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 3;
}
.ybk-panel[data-step="entry"] .ybk-header { display: none; }
.ybk-panel:not([data-step="entry"]) .ybk-header { display: flex; }

.ybk-header__back {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--y-color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s ease;
}
.ybk-header__back:hover { background: var(--y-color-chip); }
.ybk-header__back svg { width: 20px; height: 20px; }

.ybk-header__logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--y-color-green-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.ybk-header__logo img,
.ybk-header__logo svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ybk-header__meta { flex: 1; min-width: 0; }
.ybk-header__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--y-color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ybk-header__address {
    font-size: 13px;
    color: var(--y-color-muted);
    line-height: 1.3;
    margin-top: 2px;
}

.ybk-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--y-color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s ease;
}
.ybk-close:hover { background: var(--y-color-chip); }
.ybk-close svg { width: 20px; height: 20px; }

/* ==========================================================================
   Body — скроллируемая область, padding 57 16 40
   ========================================================================== */
.ybk-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.ybk-body__inner {
    padding: 16px 16px 40px;
    max-width: 600px;
    margin: 0 auto;
}
.ybk-panel[data-step="entry"] .ybk-body__inner {
    padding: 0 0 40px;
}

.ybk-screen-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--y-color-text);
    margin: 8px 0 20px;
    padding: 0 16px;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   Entry-screen: зелёный баннер + 3 пункта
   ========================================================================== */
.ybk-entry-banner {
    position: relative;
    z-index: 2; /* чтобы absolute-чип не заползал под entry-head */
    background: var(--y-color-green);
    color: #fff;
    padding: 32px 24px 68px;
    text-align: center;
    /* overflow НЕ hidden — чип торчит на -44px ниже баннера */
}
.ybk-entry-banner__slogan {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: .92;
    line-height: 1.4;
}
.ybk-entry-banner__brand {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 6px;
    margin-top: 4px;
    line-height: 1;
}
.ybk-entry-banner__leaf {
    margin: 14px auto 0;
    width: 200px;
    height: 140px;
    color: #fff;
}
.ybk-entry-banner__leaf svg {
    width: 100%;
    height: 100%;
    display: block;
}
.ybk-entry-banner__chip {
    position: absolute;
    left: 24px;
    bottom: -44px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--y-color-green);
    border: 5px solid #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #fff;
    text-align: center;
    padding: 10px 6px;
    box-sizing: border-box;
    z-index: 2;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.ybk-entry-banner__chip-leaf {
    width: 26px;
    height: 26px;
    color: #fff;
    display: block;
}
.ybk-entry-banner__chip-leaf svg { width: 100%; height: 100%; display: block; }
.ybk-entry-banner__chip-text {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    line-height: 1.25;
    white-space: nowrap;
}

.ybk-entry-head {
    padding: 52px 16px 20px;
}
.ybk-entry-head__title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--y-color-text);
    letter-spacing: -0.02em;
}
.ybk-entry-head__address {
    font-size: 15px;
    color: var(--y-color-muted);
    margin-top: 6px;
}

.ybk-entry-options {
    display: flex;
    flex-direction: column;
}
.ybk-entry-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 16px;
    background: none;
    border: none;
    border-top: 1px solid var(--y-color-line);
    cursor: pointer;
    font-family: var(--y-font);
    font-size: 17px;
    font-weight: 500;
    color: var(--y-color-text);
    text-align: left;
    width: 100%;
    transition: background .15s ease;
}
.ybk-entry-option:last-child { border-bottom: 1px solid var(--y-color-line); }
.ybk-entry-option:hover { background: #fafaf8; }

.ybk-entry-option__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--y-color-chip);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--y-color-text);
}
.ybk-entry-option__icon svg { width: 24px; height: 24px; }
.ybk-entry-option__label { flex: 1; }
.ybk-entry-option__arrow {
    color: var(--y-color-muted);
    flex-shrink: 0;
}
.ybk-entry-option__arrow svg { width: 20px; height: 20px; }

/* ==========================================================================
   Экран специалистов
   ========================================================================== */
.ybk-staff-list {
    display: flex;
    flex-direction: column;
}
.ybk-staff-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 16px;
    border-top: 1px solid var(--y-color-line);
    cursor: pointer;
    background: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    font-family: var(--y-font);
    text-align: left;
    width: 100%;
    transition: background .15s ease;
}
.ybk-staff-item:last-child { border-bottom: 1px solid var(--y-color-line); }
.ybk-staff-item:hover { background: #fafaf8; }

.ybk-staff-item__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--y-color-green-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--y-color-green-dark);
    font-weight: 600;
    font-size: 16px;
    overflow: hidden;
    flex-shrink: 0;
    object-fit: cover;
}
img.ybk-staff-item__avatar {
    background: var(--y-color-chip);
}

.ybk-staff-item__body { min-width: 0; }
.ybk-staff-item__name {
    font-size: 17px;
    font-weight: 700;
    color: var(--y-color-text);
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.ybk-staff-item__spec {
    font-size: 14px;
    color: var(--y-color-muted);
    margin-top: 2px;
    line-height: 1.3;
}
.ybk-staff-item__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 13px;
    color: var(--y-color-muted);
}
.ybk-staff-item__stars {
    color: var(--y-color-star);
    letter-spacing: 1px;
    font-size: 13px;
    line-height: 1;
}

.ybk-staff-item__slots-wrap {
    grid-column: 2 / 4;
    margin-top: 10px;
    min-width: 0;
}
.ybk-staff-item__slots-label {
    font-size: 14px;
    color: var(--y-color-muted);
    margin-bottom: 8px;
    line-height: 1.3;
}
.ybk-staff-item__slots-label b {
    color: var(--y-color-text);
    font-weight: 600;
}
.ybk-staff-item__slots {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.ybk-staff-item__slots::-webkit-scrollbar { display: none; }

.ybk-slot-pill {
    background: var(--y-color-chip);
    border: none;
    border-radius: var(--y-radius-pill);
    padding: 10px 18px;
    font-family: var(--y-font);
    font-size: 15px;
    font-weight: 500;
    color: var(--y-color-text);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease;
    flex-shrink: 0;
}
.ybk-slot-pill:hover { background: var(--y-color-chip-hover); }
.ybk-slot-pill.is-more {
    color: var(--y-color-text);
}

.ybk-staff-item__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.ybk-staff-item__info {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--y-color-muted);
    color: var(--y-color-muted);
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    line-height: 1;
    padding: 0;
}
.ybk-staff-item__info:hover {
    border-color: var(--y-color-text);
    color: var(--y-color-text);
}
.ybk-staff-item__radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #c7c7c7;
    flex-shrink: 0;
}
.ybk-staff-item.is-selected .ybk-staff-item__radio {
    border-color: var(--y-color-green);
    border-width: 6px;
}

/* Any-specialist (первый пункт) */
.ybk-staff-item--any .ybk-staff-item__avatar {
    background: var(--y-color-chip);
    color: var(--y-color-text);
}
.ybk-staff-item--any .ybk-staff-item__avatar svg {
    width: 28px;
    height: 28px;
    stroke: var(--y-color-text);
    fill: none;
}

/* ==========================================================================
   Экран услуг: поиск + чипсы + список с чекбоксами
   ========================================================================== */
.ybk-search {
    position: relative;
    margin: 0 16px 16px;
}
.ybk-search__input {
    width: 100%;
    background: var(--y-color-chip);
    border: 1px solid transparent;
    border-radius: var(--y-radius-md);
    padding: 14px 16px 14px 48px;
    font-family: var(--y-font);
    font-size: 16px;
    color: var(--y-color-text);
    box-sizing: border-box;
    outline: none;
    transition: background .15s ease, border-color .15s ease;
}
.ybk-search__input::placeholder { color: var(--y-color-muted); }
.ybk-search__input:focus {
    background: #fff;
    border-color: var(--y-color-green);
}
.ybk-search__icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--y-color-muted);
    pointer-events: none;
}

.ybk-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 16px 16px;
    margin: 0 -16px;
}
.ybk-chips::-webkit-scrollbar { display: none; }
.ybk-chip {
    background: var(--y-color-chip);
    border: none;
    border-radius: var(--y-radius-pill);
    padding: 10px 18px;
    font-family: var(--y-font);
    font-size: 15px;
    font-weight: 500;
    color: var(--y-color-text);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease;
}
.ybk-chip:hover { background: var(--y-color-chip-hover); }
.ybk-chip.is-active {
    background: var(--y-color-green);
    color: #fff;
}

.ybk-category-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--y-color-text);
    margin: 24px 16px 12px;
    letter-spacing: -0.015em;
}
.ybk-category-image {
    width: calc(100% - 32px);
    margin: 0 16px 12px;
    aspect-ratio: 16 / 9;
    border-radius: var(--y-radius-md);
    object-fit: cover;
    background: var(--y-color-chip);
    display: block;
}

.ybk-service-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding: 16px;
    border-top: 1px solid var(--y-color-line);
    cursor: pointer;
    background: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    font-family: var(--y-font);
    text-align: left;
    width: 100%;
    transition: background .15s ease;
}
.ybk-service-item:hover { background: #fafaf8; }
.ybk-service-list > .ybk-service-item:last-child { border-bottom: 1px solid var(--y-color-line); }

.ybk-service-item__body { min-width: 0; }
.ybk-service-item__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--y-color-text);
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.ybk-service-item__meta {
    font-size: 14px;
    color: var(--y-color-muted);
    margin-top: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ybk-service-item__meta.is-open {
    -webkit-line-clamp: unset;
    display: block;
}
.ybk-service-item__more {
    color: var(--y-color-text);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
}
.ybk-service-item__price {
    font-size: 17px;
    font-weight: 700;
    color: var(--y-color-text);
    margin-top: 8px;
    letter-spacing: -0.01em;
}

.ybk-checkbox {
    width: 24px;
    height: 24px;
    border: 1.5px solid #c7c7c7;
    border-radius: 6px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ybk-service-item.is-selected .ybk-checkbox {
    background: var(--y-color-green);
    border-color: var(--y-color-green);
    color: #fff;
}
.ybk-checkbox svg {
    width: 16px;
    height: 16px;
}

.ybk-empty-result {
    padding: 40px 16px;
    text-align: center;
    color: var(--y-color-muted);
    font-size: 15px;
}

/* ==========================================================================
   Экран даты/времени: календарь + группы Утро/День/Вечер
   ========================================================================== */
.ybk-calendar {
    padding: 0 16px 8px;
}
.ybk-calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.ybk-calendar__month {
    font-size: 17px;
    font-weight: 700;
    color: var(--y-color-text);
    letter-spacing: -0.01em;
    text-transform: capitalize;
}
.ybk-calendar__nav {
    display: flex;
    gap: 4px;
}
.ybk-calendar__nav button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--y-color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}
.ybk-calendar__nav button:hover { background: var(--y-color-chip); }
.ybk-calendar__nav button:disabled {
    color: #c7c7c7;
    cursor: not-allowed;
}
.ybk-calendar__nav svg { width: 18px; height: 18px; }

.ybk-calendar__weekhead {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}
.ybk-calendar__weekhead div {
    text-align: center;
    font-size: 12px;
    color: var(--y-color-muted);
    text-transform: lowercase;
    letter-spacing: .3px;
}

.ybk-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--y-color-line);
}
.ybk-calendar__day {
    aspect-ratio: 1 / 1;
    max-height: 44px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--y-font);
    font-size: 16px;
    font-weight: 500;
    color: var(--y-color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease;
    padding: 0;
}
.ybk-calendar__day:hover:not(:disabled):not(.is-active) {
    background: var(--y-color-chip);
}
.ybk-calendar__day.is-active {
    background: var(--y-color-green);
    color: #fff;
    font-weight: 700;
}
.ybk-calendar__day:disabled {
    color: #d1d1d1;
    cursor: not-allowed;
}
.ybk-calendar__day.is-out { opacity: .3; }

.ybk-time-group { padding: 16px 16px 0; }
.ybk-time-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--y-font);
    width: 100%;
}
.ybk-time-group__header h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--y-color-text);
    margin: 0;
    letter-spacing: -0.015em;
}
.ybk-time-group__header svg {
    width: 18px;
    height: 18px;
    color: var(--y-color-text);
    transition: transform .2s ease;
}
.ybk-time-group.is-collapsed .ybk-time-group__header svg {
    transform: rotate(180deg);
}
.ybk-time-group__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-bottom: 16px;
}
.ybk-time-group.is-collapsed .ybk-time-group__grid { display: none; }
.ybk-time-slot {
    background: var(--y-color-chip);
    border: none;
    border-radius: var(--y-radius-md);
    padding: 14px 8px;
    font-family: var(--y-font);
    font-size: 16px;
    font-weight: 500;
    color: var(--y-color-text);
    cursor: pointer;
    text-align: center;
    transition: background .15s ease;
}
.ybk-time-slot:hover { background: var(--y-color-chip-hover); }

/* ==========================================================================
   Форма
   ========================================================================== */
.ybk-summary {
    background: var(--y-color-green-bg);
    border-radius: var(--y-radius-md);
    padding: 14px 16px;
    margin: 0 16px 16px;
    font-size: 14px;
    line-height: 1.5;
}
.ybk-summary__row { display: flex; gap: 10px; margin-bottom: 4px; }
.ybk-summary__row:last-child { margin-bottom: 0; }
.ybk-summary__key { color: var(--y-color-muted); min-width: 80px; flex-shrink: 0; }
.ybk-summary__val { color: var(--y-color-text); font-weight: 500; flex: 1; }

.ybk-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0 16px;
}
.ybk-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ybk-field__label {
    font-size: 13px;
    color: var(--y-color-muted);
    font-weight: 500;
}
.ybk-field__input,
.ybk-field__textarea {
    border: 1px solid var(--y-color-line);
    border-radius: var(--y-radius-md);
    padding: 14px 16px;
    font-size: 16px;
    font-family: var(--y-font);
    background: #fff;
    color: var(--y-color-text);
    outline: none;
    transition: border-color .15s ease;
    width: 100%;
    box-sizing: border-box;
}
.ybk-field__input:focus,
.ybk-field__textarea:focus {
    border-color: var(--y-color-green);
}
.ybk-field__textarea { min-height: 84px; resize: vertical; }
.ybk-field__error {
    font-size: 12px;
    color: var(--y-color-danger);
    display: none;
}
.ybk-field.is-error .ybk-field__input,
.ybk-field.is-error .ybk-field__textarea { border-color: var(--y-color-danger); }
.ybk-field.is-error .ybk-field__error { display: block; }

/* ==========================================================================
   Fixed button — прилипшая снизу кнопка (Далее / Записаться)
   ========================================================================== */
.ybk-sticky-bar {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0));
    padding: 16px;
    margin-top: 16px;
    display: flex;
    justify-content: center;
    z-index: 2;
}
.ybk-sticky-bar.is-fixed {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: var(--y-shadow-sticky);
    background: #fff;
}
.ybk-fixed-button {
    background: var(--y-color-green);
    color: #fff;
    border: none;
    border-radius: var(--y-radius-md);
    padding: 16px 20px;
    font-family: var(--y-font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    max-width: 568px;
    transition: background .15s ease;
    letter-spacing: -0.01em;
}
.ybk-fixed-button:hover:not(:disabled) { background: var(--y-color-green-dark); }
.ybk-fixed-button:disabled {
    background: var(--y-color-chip);
    color: var(--y-color-muted);
    cursor: not-allowed;
}

/* ==========================================================================
   Состояния: загрузка, пустота, ошибка
   ========================================================================== */
.ybk-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
    color: var(--y-color-muted);
}
.ybk-loader__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--y-color-chip);
    border-top-color: var(--y-color-green);
    border-radius: 50%;
    animation: ybk-spin 0.8s linear infinite;
}
@keyframes ybk-spin { to { transform: rotate(360deg); } }

.ybk-slots-loader {
    width: 14px;
    height: 14px;
    border: 2px solid var(--y-color-chip);
    border-top-color: var(--y-color-muted);
    border-radius: 50%;
    animation: ybk-spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

.ybk-empty {
    text-align: center;
    color: var(--y-color-muted);
    padding: 40px 16px;
    font-size: 15px;
}
.ybk-error-msg {
    background: #fdecec;
    color: #9c3535;
    border-radius: var(--y-radius-md);
    padding: 12px 16px;
    font-size: 14px;
    margin: 0 16px 12px;
}

/* ==========================================================================
   Успех
   ========================================================================== */
.ybk-success {
    text-align: center;
    padding: 48px 24px;
}
.ybk-success__icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--y-color-green-bg);
    color: var(--y-color-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.ybk-success__icon svg { width: 44px; height: 44px; }
.ybk-success__title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--y-color-text);
    letter-spacing: -0.015em;
}
.ybk-success__text {
    font-size: 15px;
    color: var(--y-color-muted);
    line-height: 1.5;
}

/* ==========================================================================
   Модалка информации о спеце
   ========================================================================== */
.ybk-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 22, 16, 0.55);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.ybk-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}
.ybk-modal__card {
    background: #fff;
    border-radius: var(--y-radius-lg);
    padding: 24px;
    max-width: 440px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    font-family: var(--y-font);
}
.ybk-modal__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--y-color-text);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.ybk-modal__text {
    font-size: 15px;
    color: var(--y-color-text-soft);
    line-height: 1.5;
    white-space: pre-wrap;
}
.ybk-modal__close {
    margin-top: 20px;
    width: 100%;
    background: var(--y-color-chip);
    border: none;
    border-radius: var(--y-radius-md);
    padding: 14px;
    font-family: var(--y-font);
    font-size: 15px;
    font-weight: 600;
    color: var(--y-color-text);
    cursor: pointer;
}
.ybk-modal__close:hover { background: var(--y-color-chip-hover); }
