/* =========================================================================
   Encontra Push — pre-prompt de inscricao.

   Secoes 19 e 56. Estilo enxuto e neutro: o pre-prompt aparece sobre o site
   do publisher, e nao pode brigar com o design dele. Todas as regras sao
   prefixadas com .ep- para nao vazar para o tema.
   ========================================================================= */

.ep-prompt,
.ep-bell {
    --ep-accent: #5b4bd6;
    --ep-button: var(--ep-accent);
    --ep-radius: 14px;
    --ep-bg: #ffffff;
    --ep-text: #1b1d23;
    --ep-muted: #5f6472;
    --ep-border: #e0e2ea;
}

.ep-prompt {
    position: fixed;
    z-index: 2147483000;
    display: flex;
    gap: 12px;
    width: calc(100% - 32px);
    max-width: 420px;
    padding: 16px;
    background: var(--ep-bg);
    color: var(--ep-text);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: 0 12px 40px rgba(16, 18, 26, 0.18);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ep-prompt--visible {
    opacity: 1;
    transform: translateY(0);
}

.ep-prompt--leaving {
    opacity: 0;
    transform: translateY(-8px);
}

.ep-prompt--top-center {
    top: 16px;
    left: 50%;
    margin-left: -210px;
}

.ep-prompt--top-left { top: 16px; left: 16px; }
.ep-prompt--top-right { top: 16px; right: 16px; }

.ep-prompt--bottom-center {
    bottom: 16px;
    left: 50%;
    margin-left: -210px;
    transform: translateY(10px);
}

.ep-prompt--bottom-left { bottom: 16px; left: 16px; transform: translateY(10px); }
.ep-prompt--bottom-right { bottom: 16px; right: 16px; transform: translateY(10px); }

.ep-prompt__icon {
    font-size: 22px;
    line-height: 1;
    flex: none;
}

.ep-prompt__content { flex: 1; min-width: 0; }

.ep-prompt__title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 650;
}

.ep-prompt__body {
    margin: 0;
    color: var(--ep-muted);
    font-size: 13.5px;
}

.ep-prompt__steps {
    margin: 8px 0 0;
    padding-left: 20px;
    color: var(--ep-muted);
    font-size: 13.5px;
}

.ep-prompt__steps li { margin-bottom: 3px; }

.ep-prompt__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
}

.ep-prompt__btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 13.5px;
    font-weight: 560;
    cursor: pointer;
}

.ep-prompt__btn--primary {
    background: var(--ep-button);
    color: #fff;
}

.ep-prompt__btn--primary:hover { filter: brightness(1.08); }

.ep-prompt__btn--ghost {
    background: transparent;
    color: var(--ep-muted);
    border-color: var(--ep-border);
}

.ep-prompt__btn--ghost:hover { background: rgba(0, 0, 0, 0.04); }

.ep-prompt__btn:focus-visible {
    outline: 2px solid var(--ep-accent);
    outline-offset: 2px;
}

/*
 * Tema (Aparencia > Tema):
 *   --theme-light  sempre claro, mesmo com o sistema em modo escuro;
 *   --theme-dark   sempre escuro;
 *   --theme-auto   acompanha o sistema do visitante.
 * Sem classe de tema (HTML antigo em cache) vale o automatico.
 */
.ep-prompt--theme-dark {
    --ep-bg: #1b1e26;
    --ep-text: #e8eaf0;
    --ep-muted: #9aa0b0;
    --ep-border: #2b2f3a;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
}

.ep-prompt--theme-dark .ep-prompt__btn--ghost:hover { background: rgba(255, 255, 255, 0.06); }

@media (prefers-color-scheme: dark) {
    .ep-prompt:not(.ep-prompt--theme-light):not(.ep-prompt--theme-dark) {
        --ep-bg: #1b1e26;
        --ep-text: #e8eaf0;
        --ep-muted: #9aa0b0;
        --ep-border: #2b2f3a;
        box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
    }

    .ep-prompt:not(.ep-prompt--theme-light):not(.ep-prompt--theme-dark) .ep-prompt__btn--ghost:hover {
        background: rgba(255, 255, 255, 0.06);
    }

    .ep-bell:not(.ep-prompt--theme-light):not(.ep-prompt--theme-dark) {
        --ep-bg: #1b1e26;
        --ep-text: #e8eaf0;
        --ep-muted: #9aa0b0;
        --ep-border: #2b2f3a;
    }
}

/* =========================================================================
   Sino de noticias (Encontra Push > Sino de noticias).

   Botao fixo na lateral + painel. Usa as mesmas variaveis do pre-prompt
   (--ep-accent, --ep-button, --ep-radius, tema claro/escuro).
   ========================================================================= */

.ep-bell {
    --ep-bell-offset: 20px;

    position: fixed;
    bottom: var(--ep-bell-offset);
    z-index: 2147482999; /* logo abaixo do pre-prompt */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ep-text);
}

.ep-bell--right { right: 20px; }
.ep-bell--left { left: 20px; }

.ep-bell__button {
    position: relative;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ep-button);
    color: #fff;
    box-shadow: 0 8px 24px rgba(16, 18, 26, 0.28);
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.ep-bell__button:hover { filter: brightness(1.08); transform: scale(1.04); }

.ep-bell__button:focus-visible {
    outline: 3px solid var(--ep-accent);
    outline-offset: 3px;
}

.ep-bell__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 2px solid #fff;
    border-radius: 11px;
    background: #d92d20;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
}

.ep-bell__badge[hidden] { display: none; }

.ep-bell__panel {
    position: absolute;
    bottom: 68px;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: min(560px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--ep-bg);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: 0 16px 44px rgba(16, 18, 26, 0.24);
}

.ep-bell__panel[hidden] { display: none; }

.ep-bell--right .ep-bell__panel { right: 0; }
.ep-bell--left .ep-bell__panel { left: 0; }

.ep-bell__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--ep-accent);
    color: #fff;
}

.ep-bell__title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 650;
}

.ep-bell__close {
    flex: none;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 20px;
    line-height: 30px;
    cursor: pointer;
}

.ep-bell__close:hover { background: rgba(255, 255, 255, 0.28); }

.ep-bell__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 6px 0;
}

.ep-bell__text {
    margin: 12px 16px;
    color: var(--ep-muted);
}

.ep-bell__steps {
    margin: 0 16px 12px;
    padding-left: 20px;
    color: var(--ep-muted);
}

.ep-bell__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ep-bell__item {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 16px 10px 26px;
    color: var(--ep-text);
    text-decoration: none;
}

.ep-bell__item:hover { background: rgba(127, 127, 127, 0.08); }

/* Ponto de "nao lida" a esquerda, como nos widgets de referencia. */
.ep-bell__item--unread::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
    background: var(--ep-accent);
}

.ep-bell__thumb {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--ep-border);
}

.ep-bell__item-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ep-bell__item-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 600;
}

.ep-bell__item--unread .ep-bell__item-title { font-weight: 700; }

.ep-bell__item-time {
    margin-top: 2px;
    color: var(--ep-muted);
    font-size: 12.5px;
}

.ep-bell__foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px 14px;
    border-top: 1px solid var(--ep-border);
}

.ep-bell__foot:empty { display: none; }

.ep-bell__status {
    margin: 0;
    color: var(--ep-muted);
    font-size: 13px;
    text-align: center;
}

.ep-bell__btn {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.ep-bell__btn:disabled { opacity: 0.6; cursor: default; }

.ep-bell__btn--primary {
    background: var(--ep-button);
    color: #fff;
}

.ep-bell__btn--primary:hover { filter: brightness(1.08); }

.ep-bell__btn--ghost {
    background: transparent;
    color: var(--ep-muted);
    border-color: var(--ep-border);
}

.ep-bell__link {
    align-self: flex-end;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ep-accent);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ep-bell__link:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .ep-bell--right { right: 14px; }
    .ep-bell--left { left: 14px; }

    .ep-bell__button { width: 52px; height: 52px; }

    .ep-bell__panel { bottom: 64px; }

    /* No celular o painel ocupa a largura toda, alinhado ao lado do sino. */
    .ep-bell--right .ep-bell__panel { right: -2px; }
    .ep-bell--left .ep-bell__panel { left: -2px; }
}

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

@media (max-width: 480px) {
    .ep-prompt {
        left: 16px;
        right: 16px;
        margin-left: 0;
        max-width: none;
        width: auto;
    }
}

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