.sgp-optin,
.sgp-optin * { box-sizing: border-box; }

.sgp-optin {
    --sgp-accent: #72825f;
    --sgp-bg: #f7f4ed;
    --sgp-text: #253126;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
    width: min(438px, calc(100vw - 32px));
    padding: 10px;
    border: 1px solid rgba(37,49,38,.12);
    border-radius: 22px;
    background: #fff;
    color: var(--sgp-text);
    box-shadow: 0 24px 70px rgba(23,35,26,.20), 0 2px 10px rgba(23,35,26,.08);
    transform: translateY(22px) scale(.98);
    opacity: 0;
    transition: transform .28s ease, opacity .28s ease;
    font-family: inherit;
}

.sgp-optin.is-visible { transform: translateY(0) scale(1); opacity: 1; }

.sgp-optin__panel {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px 44px 16px 16px;
    border-radius: 18px;
    background: var(--sgp-bg);
}

.sgp-optin__image {
    width: 58px;
    height: 58px;
    min-height: 0;
    object-fit: cover;
    object-position: 50% 20%;
    display: block;
    border-radius: 50%;
    background: #eef0eb;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px rgba(37,49,38,.10), 0 5px 14px rgba(37,49,38,.12);
    margin: 0;
}

.sgp-optin__content {
    min-width: 0;
    padding: 1px 0 0;
    background: transparent;
}

.sgp-optin__eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--sgp-accent);
    margin-bottom: 5px;
    text-transform: none;
}

.sgp-optin h3 {
    margin: 0 0 7px;
    font-size: 18px;
    line-height: 1.2;
    color: var(--sgp-text);
    font-weight: 750;
}

.sgp-optin p {
    margin: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--sgp-text);
    opacity: .88;
}

.sgp-optin__actions {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-wrap: wrap;
}

/* Sąmoningai didesnis specifiškumas, kad temos globalūs button:hover stiliai
   neuždažytų mūsų „Ne, ačiū“ ir X. */
.sgp-optin .sgp-optin__yes,
.sgp-optin .sgp-optin__yes:focus,
.sgp-optin .sgp-optin__yes:active {
    appearance: none;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--sgp-accent) !important;
    color: #fff !important;
    padding: 9px 15px !important;
    min-height: 38px;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0,0,0,.09);
    text-decoration: none !important;
}
.sgp-optin .sgp-optin__yes:hover {
    background: var(--sgp-accent) !important;
    color: #fff !important;
    filter: brightness(.94);
    transform: translateY(-1px);
}
.sgp-optin .sgp-optin__yes:disabled { opacity: .65; cursor: wait; }

.sgp-optin .sgp-optin__no,
.sgp-optin .sgp-optin__no:focus,
.sgp-optin .sgp-optin__no:active,
.sgp-optin .sgp-optin__no:hover {
    appearance: none;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--sgp-text) !important;
    padding: 7px 0 !important;
    min-height: 0 !important;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    opacity: .62;
    transform: none !important;
}
.sgp-optin .sgp-optin__no:hover {
    opacity: 1;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

.sgp-optin .sgp-optin__close,
.sgp-optin .sgp-optin__close:hover,
.sgp-optin .sgp-optin__close:focus,
.sgp-optin .sgp-optin__close:active {
    position: absolute;
    top: 12px;
    right: 13px;
    z-index: 3;
    width: 28px;
    height: 28px;
    min-width: 0 !important;
    min-height: 0 !important;
    display: grid;
    place-items: center;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--sgp-text) !important;
    opacity: .42;
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transform: none !important;
    filter: none !important;
    text-decoration: none !important;
}

.sgp-optin__meta {
    margin-top: 10px;
    font-size: 10px;
    line-height: 1.35;
    color: var(--sgp-text);
    opacity: .52;
}
.sgp-optin__meta a { color: inherit; text-decoration: underline; }

.sgp-manage {
    padding: 16px 18px;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 14px;
    background: #fff;
}
.sgp-manage__status { margin-bottom: 10px; }
.sgp-manage__button {
    border: 1px solid #72825f;
    border-radius: 999px;
    padding: 9px 15px;
    background: transparent;
    color: #4f6243;
    font: inherit;
    cursor: pointer;
}
.sgp-manage__button--enable { background: #72825f; color: #fff; }

@media (max-width: 640px) {
    .sgp-optin {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
        padding: 8px;
        border-radius: 19px;
    }
    .sgp-optin__panel {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 11px;
        padding: 14px 34px 14px 13px;
        border-radius: 16px;
    }
    .sgp-optin__image {
        width: 50px;
        height: 50px;
    }
    .sgp-optin h3 { font-size: 17px; }
    .sgp-optin p { font-size: 13px; }
    .sgp-optin .sgp-optin__close,
    .sgp-optin .sgp-optin__close:hover,
    .sgp-optin .sgp-optin__close:focus,
    .sgp-optin .sgp-optin__close:active { top: 9px; right: 9px; }
    .sgp-optin__actions { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .sgp-optin { transition: none; }
}
