/* Кнопка-триггер */
.spb-trigger {
    position: fixed;
    top: var(--spb-top, 50%);
    z-index: 9990;
    transform: rotate(-90deg);
    background: var(--spb-bg, #ffda3c);
    color: var(--spb-color, #000);
    border: 0;
    outline: none;
    padding: 10px 10px 30px 10px;
    font-size: 20px;
    text-transform: uppercase;
    font-weight: 900;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    transition: .4s;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.spb-trigger:hover { box-shadow: 0 6px 20px rgba(0,0,0,.25); }

.spb-trigger.spb-side-right { right: -70px; }
.spb-trigger.spb-side-right:hover { right: -60px; }

.spb-trigger.spb-side-left { left: -70px; transform: rotate(90deg); }
.spb-trigger.spb-side-left:hover { left: -60px; }

/* Оверлей */
.spb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    animation: spb-fade-in .2s ease;
}
.spb-overlay.spb-open { display: flex; }

@keyframes spb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.spb-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: spb-slide-up .25s ease;
}
@keyframes spb-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.spb-close {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #dcdcde;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    color: #1d2327;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s, border-color .15s;
}
.spb-close:hover { background: #f0f0f1; border-color: #8c8f94; }

.spb-modal-body { padding: 30px; }

@media (max-width: 640px) {
    .spb-modal-body { padding: 18px; }
    .spb-trigger { font-size: 16px; padding: 8px 8px 24px 8px; }
}