/* Epil: кнопка «Записаться онлайн» (виджет epil_listing_booking) и окно записи alteg.io (assets/js/booking.js). */
.epil-booking,
.epil-booking-modal {
    /* Ярко-жёлтый градиент; текст тёмный — белый на жёлтом не читается */
    --epil-booking-accent: #ffe14d;
    --epil-booking-accent-dark: #ffb300;
    --epil-booking-on-accent: #1f2937;
    --epil-booking-text: var(--e-global-color-lcolor1, #374b5c);
    --epil-booking-muted: var(--e-global-color-lcolor2, #73818c);
}

.epil-booking {
    margin: 0 0 20px;
}

html body .epil-booking__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 14px 20px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--epil-booking-accent) 0%, var(--epil-booking-accent-dark) 100%);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--epil-booking-accent-dark) 40%, transparent);
    color: var(--epil-booking-on-accent);
    font-family: var(--epil-font-heading, inherit);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

html body .epil-booking__button:hover {
    color: var(--epil-booking-on-accent);
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px color-mix(in srgb, var(--epil-booking-accent-dark) 45%, transparent);
}

html body .epil-booking__button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--epil-booking-accent-dark) 60%, #fff);
    outline-offset: 3px;
}

.epil-booking__icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
}

.epil-booking__note {
    margin: 8px 0 0;
    color: var(--epil-booking-muted);
    font-size: var(--epil-fs-xs, 13px);
    line-height: 1.4;
    text-align: center;
}

/* Окно записи */
.epil-booking-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 24, 39, .55);
}

.epil-booking-modal[hidden] {
    display: none;
}

.epil-booking-modal__panel {
    display: flex;
    flex-direction: column;
    width: min(520px, 100%);
    height: min(760px, 100%);
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
}

.epil-booking-modal__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 20px;
    border-bottom: 1px solid #eef0f4;
}

.epil-booking-modal__title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--epil-booking-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html body .epil-booking-modal__newtab {
    flex: 0 0 auto;
    color: var(--epil-booking-muted);
    font-size: var(--epil-fs-xs, 13px);
    text-decoration: underline;
}

html body .epil-booking-modal__close {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f2f4f8;
    color: var(--epil-booking-text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.epil-booking-modal__body {
    position: relative;
    flex: 1 1 auto;
}

.epil-booking-modal__loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--epil-booking-muted);
    font-size: 14px;
}

.epil-booking-modal__frame {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

html.epil-booking-open,
html.epil-booking-open body {
    overflow: hidden;
}

@media (max-width: 600px) {
    .epil-booking-modal {
        padding: 0;
    }

    .epil-booking-modal__panel {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    /* На узком экране заголовок не помещается — остаются «Открыть в новой вкладке» и «×» (у окна есть aria-label) */
    .epil-booking-modal__title {
        display: none;
    }

    .epil-booking-modal__head {
        justify-content: flex-end;
    }
}
