/* AVE Design Studio — выезжающая плашка с CTA (js/side-cta.js) */

.ave-sidecta {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99980;
    width: 320px;
    max-width: calc(100vw - 20px);
    padding: 22px 22px 20px;
    box-sizing: border-box;
    background: #fff;
    color: #3b3e47;
    border-radius: 14px;
    border-top: 4px solid #c80000;
    box-shadow: 0 24px 60px rgba(23, 24, 29, .22), 0 2px 8px rgba(23, 24, 29, .08);
    font: 400 14px/1.5 'Open Sans', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    visibility: hidden;
    transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, visibility 0s linear .5s;
}
.ave-sidecta.is-visible {
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, visibility 0s;
}

.ave-sidecta__kicker {
    display: inline-block;
    margin: 0 0 8px;
    padding: 0;
    color: #c80000;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.ave-sidecta__title {
    margin: 0 28px 6px 0;
    padding: 0;
    color: #17181d;
    font: 800 20px/1.25 'Open Sans', Arial, sans-serif;
    letter-spacing: -.01em;
    text-transform: none;
}
.ave-sidecta__text {
    margin: 0 0 16px;
    color: #5b5f6b;
    font-size: 14px;
    line-height: 1.5;
}

.ave-sidecta__btn,
.ave-sidecta__btn:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    padding: 0 18px;
    box-sizing: border-box;
    border-radius: 8px;
    background: #c80000;
    color: #fff;
    font: 700 14px/1.2 'Open Sans', Arial, sans-serif;
    letter-spacing: .01em;
    text-decoration: none;
    transition: background-color .15s ease, transform .1s ease;
}
.ave-sidecta__btn:hover,
.ave-sidecta__btn:focus { background: #a90000; color: #fff; text-decoration: none; }
.ave-sidecta__btn:active { transform: translateY(1px); }
.ave-sidecta__btn:focus-visible { outline: 2px solid #17181d; outline-offset: 2px; }
.ave-sidecta__btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.ave-sidecta__btn:hover svg { transform: translateX(3px); }

.ave-sidecta__close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7a7e8a;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.ave-sidecta__close:hover { background: #f5f6f8; color: #17181d; }
.ave-sidecta__close:focus-visible { outline: 2px solid #c80000; outline-offset: 1px; }
.ave-sidecta__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

html.ave-sidecta-open #totop { opacity: 0; pointer-events: none; }

@media (max-width: 560px) {
    .ave-sidecta {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        padding: 16px 16px 14px;
        transform: translateY(calc(100% + 30px));
    }
    .ave-sidecta__kicker { margin-bottom: 4px; }
    .ave-sidecta__title { font-size: 18px; margin-right: 36px; }
    .ave-sidecta__text { margin-bottom: 12px; font-size: 13px; }
    .ave-sidecta__close { top: 6px; right: 6px; width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .ave-sidecta,
    .ave-sidecta.is-visible { transform: none; transition: opacity .2s ease, visibility 0s; }
}

@media print {
    .ave-sidecta { display: none !important; }
}
