.msa-sticky-ad,
.msa-sticky-ad *,
.msa-sticky-ad *::before,
.msa-sticky-ad *::after {
    box-sizing: border-box;
}

.msa-sticky-ad[hidden] {
    display: none !important;
}

.msa-sticky-ad {
    --msa-green: #1f5b3b;
    --msa-green-dark: #143f2a;
    --msa-green-soft: #edf7f0;
    --msa-lime: #8fcf3c;
    --msa-gold: #d8b65f;
    --msa-ink: #1f2521;
    --msa-muted: #6b746e;

    position: fixed;
    left: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 999998;

    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;

    width: min(980px, calc(100vw - 28px));
    min-height: 96px;
    padding: 16px 18px;

    border: 1px solid rgba(31, 91, 59, 0.22);
    border-radius: 24px;

    background:
        radial-gradient(circle at 8% 20%, rgba(143, 207, 60, 0.14), transparent 28%),
        radial-gradient(circle at 92% 0%, rgba(216, 182, 95, 0.13), transparent 26%),
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(247,251,248,0.98));

    color: var(--msa-ink);
    box-shadow:
        0 24px 60px rgba(16, 52, 34, 0.20),
        0 8px 24px rgba(16, 52, 34, 0.10),
        inset 0 1px 0 rgba(255,255,255,0.85);

    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;

    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 28px) scale(0.98);
    transition:
        opacity 280ms ease,
        transform 320ms cubic-bezier(.2,.8,.2,1),
        visibility 280ms ease;

    isolation: isolate;
    overflow: visible;
}

.msa-sticky-ad::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(31,91,59,0.04), transparent 40%, rgba(143,207,60,0.06));
    pointer-events: none;
}

.msa-sticky-ad.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(1);
}

.msa-sticky-ad.is-closing {
    opacity: 0;
    transform: translate(-50%, 24px) scale(0.98);
}

.msa-sticky-ad__close {
    position: absolute;
    top: -12px;
    inset-inline-end: -10px;

    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;

    border: 1px solid rgba(31, 91, 59, 0.20);
    border-radius: 50%;

    background: #ffffff;
    color: var(--msa-green-dark);
    box-shadow: 0 8px 20px rgba(16, 52, 34, 0.16);

    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.msa-sticky-ad__close:hover {
    transform: rotate(5deg) scale(1.06);
    background: var(--msa-green-dark);
    color: #ffffff;
}

.msa-sticky-ad__close:focus-visible,
.msa-sticky-ad__button:focus-visible {
    outline: 3px solid rgba(143, 207, 60, 0.40);
    outline-offset: 3px;
}

.msa-sticky-ad__close svg,
.msa-sticky-ad__button svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.msa-sticky-ad__logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 64px;
    padding: 4px 10px;
}

.msa-sticky-ad__logo {
    display: block;
    width: 100%;
    max-width: 168px;
    max-height: 62px;
    object-fit: contain;
    object-position: center;
}

.msa-sticky-ad__content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.msa-sticky-ad__title {
    display: block;
    margin: 0;
    color: var(--msa-ink);
    font-size: clamp(17px, 1.6vw, 22px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.msa-sticky-ad__description {
    display: block;
    margin: 0;
    color: var(--msa-muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.msa-sticky-ad__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-width: 148px;
    min-height: 52px;
    padding: 0 22px;

    border: 0;
    border-radius: 16px;

    background: linear-gradient(135deg, var(--msa-green) 0%, var(--msa-green-dark) 100%);
    color: #ffffff !important;
    box-shadow: 0 12px 24px rgba(20, 63, 42, 0.22);

    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;

    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.msa-sticky-ad__button:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(20, 63, 42, 0.28);
    filter: saturate(1.08);
}

.msa-sticky-ad--rtl .msa-sticky-ad__button svg {
    transform: scaleX(-1);
}

@media (max-width: 980px), (hover: none) and (pointer: coarse) {
    .msa-sticky-ad {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 13px;
        width: calc(100vw - 18px);
        min-height: 0;
        padding: 20px 16px 15px;
        border-radius: 21px;
    }

    .msa-sticky-ad__logo-wrap {
        order: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 88px;
        min-height: 88px;
        padding: 0 8px;
        overflow: visible;
    }

    .msa-sticky-ad__logo {
        display: block;
        width: min(100%, 300px);
        max-width: 300px;
        height: 78px;
        max-height: 78px;
        object-fit: contain;
        object-position: center;
    }

    .msa-sticky-ad__content {
        order: 2;
        align-items: center;
        gap: 6px;
        width: 100%;
        text-align: center;
    }

    .msa-sticky-ad__title {
        width: 100%;
        font-size: 19px;
        line-height: 1.3;
        text-align: center;
    }

    .msa-sticky-ad__description {
        display: block;
        width: 100%;
        max-width: 620px;
        margin-inline: auto;
        overflow: visible;
        color: var(--msa-muted);
        font-size: 13px;
        line-height: 1.5;
        text-align: center;
        -webkit-line-clamp: unset;
    }

    .msa-sticky-ad__button {
        order: 3;
        width: 100%;
        min-width: 0;
        min-height: 50px;
        padding: 0 18px;
        border-radius: 14px;
        font-size: 14px;
    }

    .msa-sticky-ad__close {
        top: -9px;
        inset-inline-end: -5px;
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 430px) {
    .msa-sticky-ad {
        gap: 10px;
        bottom: max(8px, env(safe-area-inset-bottom));
        padding: 16px 13px 13px;
        border-radius: 18px;
    }

    .msa-sticky-ad__logo-wrap {
        height: 76px;
        min-height: 76px;
        padding: 0 2px;
    }

    .msa-sticky-ad__logo {
        width: min(100%, 265px);
        max-width: 265px;
        height: 68px;
        max-height: 68px;
    }

    .msa-sticky-ad__title {
        font-size: 16px;
        line-height: 1.35;
    }

    .msa-sticky-ad__description {
        font-size: 12px;
        line-height: 1.45;
    }

    .msa-sticky-ad__button {
        min-height: 46px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .msa-sticky-ad,
    .msa-sticky-ad__close,
    .msa-sticky-ad__button {
        transition: none !important;
    }
}

/*
 * Version 1.2.1 mobile layout.
 * The server adds --device-mobile for mobile user agents and JavaScript adds
 * --mobile-layout for narrow/coarse-pointer devices. This makes the mobile
 * hierarchy deterministic even when a theme or cache serves unusual viewport CSS.
 */
.msa-sticky-ad.msa-sticky-ad--device-mobile,
.msa-sticky-ad.msa-sticky-ad--mobile-layout {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 13px !important;
    width: calc(100vw - 18px) !important;
    min-height: 0 !important;
    padding: 23px 16px 16px !important;
    border-radius: 22px !important;
}

.msa-sticky-ad.msa-sticky-ad--device-mobile .msa-sticky-ad__logo-wrap,
.msa-sticky-ad.msa-sticky-ad--mobile-layout .msa-sticky-ad__logo-wrap {
    order: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 2px 5px !important;
    overflow: visible !important;
}

.msa-sticky-ad.msa-sticky-ad--device-mobile .msa-sticky-ad__logo,
.msa-sticky-ad.msa-sticky-ad--mobile-layout .msa-sticky-ad__logo {
    display: block !important;
    width: min(100%, 300px) !important;
    max-width: 300px !important;
    height: auto !important;
    max-height: 78px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center !important;
}

.msa-sticky-ad.msa-sticky-ad--device-mobile .msa-sticky-ad__content,
.msa-sticky-ad.msa-sticky-ad--mobile-layout .msa-sticky-ad__content {
    order: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 6px !important;
    margin: 0 !important;
    text-align: center !important;
}

.msa-sticky-ad.msa-sticky-ad--device-mobile .msa-sticky-ad__title,
.msa-sticky-ad.msa-sticky-ad--mobile-layout .msa-sticky-ad__title,
.msa-sticky-ad.msa-sticky-ad--device-mobile .msa-sticky-ad__description,
.msa-sticky-ad.msa-sticky-ad--mobile-layout .msa-sticky-ad__description {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    text-align: center !important;
}

.msa-sticky-ad.msa-sticky-ad--device-mobile .msa-sticky-ad__title,
.msa-sticky-ad.msa-sticky-ad--mobile-layout .msa-sticky-ad__title {
    font-size: clamp(18px, 5.2vw, 24px) !important;
    line-height: 1.3 !important;
}

.msa-sticky-ad.msa-sticky-ad--device-mobile .msa-sticky-ad__description,
.msa-sticky-ad.msa-sticky-ad--mobile-layout .msa-sticky-ad__description {
    display: block !important;
    overflow: visible !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    -webkit-line-clamp: unset !important;
}

.msa-sticky-ad.msa-sticky-ad--device-mobile .msa-sticky-ad__button,
.msa-sticky-ad.msa-sticky-ad--mobile-layout .msa-sticky-ad__button {
    order: 3 !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 0 18px !important;
    border-radius: 15px !important;
    font-size: 15px !important;
}

.msa-sticky-ad.msa-sticky-ad--device-mobile .msa-sticky-ad__close,
.msa-sticky-ad.msa-sticky-ad--mobile-layout .msa-sticky-ad__close {
    top: -9px !important;
    inset-inline-end: -4px !important;
    width: 38px !important;
    height: 38px !important;
}

@media (max-width: 430px) {
    .msa-sticky-ad.msa-sticky-ad--device-mobile,
    .msa-sticky-ad.msa-sticky-ad--mobile-layout {
        gap: 10px !important;
        bottom: max(8px, env(safe-area-inset-bottom)) !important;
        padding: 20px 13px 13px !important;
        border-radius: 19px !important;
    }

    .msa-sticky-ad.msa-sticky-ad--device-mobile .msa-sticky-ad__logo,
    .msa-sticky-ad.msa-sticky-ad--mobile-layout .msa-sticky-ad__logo {
        width: min(100%, 265px) !important;
        max-width: 265px !important;
        max-height: 68px !important;
    }

    .msa-sticky-ad.msa-sticky-ad--device-mobile .msa-sticky-ad__title,
    .msa-sticky-ad.msa-sticky-ad--mobile-layout .msa-sticky-ad__title {
        font-size: 18px !important;
    }

    .msa-sticky-ad.msa-sticky-ad--device-mobile .msa-sticky-ad__description,
    .msa-sticky-ad.msa-sticky-ad--mobile-layout .msa-sticky-ad__description {
        font-size: 12px !important;
    }
}
