/* ============================================================
   Smilora — фіксований віджет «Усі послуги» + «Ціни»
   ============================================================ */

.smilora-side-dock {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(calc(-50% - 36px));
    z-index: 1040;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    pointer-events: none;
}

.smilora-services-widget {
    position: relative;
    height: auto;
    display: block;
    pointer-events: none;
}

.smilora-services-widget__trigger,
.smilora-prices-widget__trigger {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 88px;
    padding: 14px 10px 14px 12px;
    border: none;
    border-radius: 14px 0 0 14px;
    background: var(--primary--color);
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    pointer-events: auto;
    box-shadow: -4px 4px 24px rgba(58, 68, 152, 0.32);
    transition: background-color 0.25s ease, box-shadow 0.25s ease, margin-right 0.25s ease;
    animation: smilora-trigger-appear 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s both;
    text-decoration: none;
}

.smilora-prices-widget__trigger {
    animation-delay: 0.95s;
}

.smilora-services-widget__trigger:hover,
.smilora-prices-widget__trigger:hover {
    background: var(--black--family--color2);
    margin-right: 2px;
    color: #fff;
    text-decoration: none;
}

.smilora-services-widget__trigger:active,
.smilora-prices-widget__trigger:active {
    transform: scale(0.98);
}

.smilora-services-widget__trigger:focus-visible,
.smilora-prices-widget__trigger:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

/* Біла лінія-свічення кожні ~3 сек — синхронно на обох кнопках */
.smilora-services-widget__shine,
.smilora-prices-widget__shine {
    position: absolute;
    top: -120%;
    left: -20%;
    width: 140%;
    height: 55%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 30%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(255, 255, 255, 0.08) 70%,
        transparent 100%
    );
    transform: rotate(-8deg);
    pointer-events: none;
    animation: smilora-trigger-shine 3s ease-in-out infinite;
}

.smilora-services-widget__trigger i,
.smilora-services-widget__trigger-text,
.smilora-prices-widget__trigger i,
.smilora-prices-widget__trigger-text {
    position: relative;
    z-index: 1;
}

.smilora-services-widget__trigger i,
.smilora-prices-widget__trigger i {
    font-size: 16px;
    line-height: 1;
}

.smilora-services-widget__trigger-text,
.smilora-prices-widget__trigger-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
}

.smilora-services-widget.is-open .smilora-services-widget__trigger {
    background: var(--black--family--color2);
    box-shadow: -2px 2px 16px rgba(58, 68, 152, 0.2);
}

/* Backdrop */
.smilora-services-widget__backdrop {
    position: fixed;
    inset: 0;
    z-index: 1045;
    background: rgba(15, 18, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.smilora-services-widget__backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Panel — desktop: половина екрана справа */
.smilora-services-widget__panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1046;
    width: 50vw;
    min-width: 360px;
    max-width: 640px;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    box-shadow: -12px 0 48px rgba(58, 68, 152, 0.18);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.smilora-services-widget__panel.is-open {
    transform: translateX(0);
}

.smilora-services-widget__panel-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--lavender--color2);
    background: var(--bg--color);
}

.smilora-services-widget__panel-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--black--family--color2);
}

.smilora-services-widget__panel-title span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary--color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.smilora-services-widget__panel-close {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: var(--primary--color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    box-shadow: 0 4px 14px rgba(58, 68, 152, 0.12);
}

.smilora-services-widget__panel-close:hover {
    background: var(--primary--color);
    color: #fff;
}

.smilora-services-widget__panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 28px;
    -webkit-overflow-scrolling: touch;
}

.smilora-services-widget__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.smilora-services-widget__item {
    margin: 0;
}

.smilora-services-widget__link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--bg--color);
    text-decoration: none;
    color: var(--black--family--color2);
    transition: background-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.smilora-services-widget__link:hover {
    background: var(--lavender--color2);
    transform: translateX(-3px);
    text-decoration: none;
    color: var(--black--family--color2);
}

.smilora-services-widget__link:active {
    transform: translateX(0) scale(0.99);
}

.smilora-services-widget__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary--color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.smilora-services-widget__info {
    flex: 1;
    min-width: 0;
}

.smilora-services-widget__name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 2px;
}

.smilora-services-widget__desc {
    display: block;
    font-size: 13px;
    line-height: 1.4;
    color: var(--lavender--color3);
}

.smilora-services-widget__arrow {
    flex-shrink: 0;
    color: var(--primary--color);
    font-size: 14px;
    opacity: 0.7;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.smilora-services-widget__link:hover .smilora-services-widget__arrow {
    opacity: 1;
    transform: translateX(3px);
}

body.smilora-services-panel-open {
    overflow: hidden;
}

@keyframes smilora-trigger-appear {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes smilora-trigger-shine {
    0%, 72%, 100% {
        top: -120%;
        opacity: 0;
    }
    8% {
        opacity: 1;
    }
    38% {
        top: 140%;
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Mobile: bottom sheet — знизу вгору, половина екрана */
@media (max-width: 991px) {
    .smilora-side-dock {
        transform: translateY(calc(-50% - 28px));
        gap: 8px;
    }

    .smilora-services-widget__trigger,
    .smilora-prices-widget__trigger {
        min-height: 76px;
        padding: 12px 8px 12px 10px;
        border-radius: 12px 0 0 12px;
    }

    .smilora-services-widget__trigger-text,
    .smilora-prices-widget__trigger-text {
        font-size: 11px;
    }

    .smilora-services-widget__panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        min-width: 0;
        max-width: none;
        height: 50dvh;
        min-height: 300px;
        max-height: 65dvh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -12px 48px rgba(58, 68, 152, 0.2);
        transform: translateY(100%);
    }

    .smilora-services-widget__panel.is-open {
        transform: translateY(0);
    }

    .smilora-services-widget__panel-header {
        padding: 22px 20px 16px;
    }

    .smilora-services-widget__panel-title {
        font-size: 18px;
    }

    .smilora-services-widget__panel-body {
        padding: 12px 14px 24px;
    }

    .smilora-services-widget__link {
        padding: 14px 14px;
        gap: 12px;
    }

    .smilora-services-widget__icon {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .smilora-services-widget__name {
        font-size: 14px;
    }

    .smilora-services-widget__desc {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .smilora-services-widget__panel,
    .smilora-services-widget__backdrop,
    .smilora-services-widget__trigger,
    .smilora-prices-widget__trigger,
    .smilora-services-widget__link,
    .smilora-services-widget__shine,
    .smilora-prices-widget__shine {
        animation: none;
        transition: none;
    }
}
