/*
 * App base
 * Overrides globais do app do usuario.
 * Carrega depois de app.css.
 */

/* ── Indicador de olheiro ativo ─────────────────────────────── */
.header-scout-badge {
    position: fixed;
    left: 0.875rem;
    top: 4.25rem;
    z-index: 45;
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.55rem 0.25rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(168, 85, 247, 0.45);
    background: rgba(168, 85, 247, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgb(216 180 254);
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: default;
    animation: scout-pulse 2.8s ease-in-out infinite;
}

.header-scout-badge.is-active { display: flex; }

.header-scout-badge i { font-size: 0.75rem; color: rgb(192 132 252); }

#btn-notifications.is-enabled {
    border: 1px solid rgba(15, 159, 110, 0.34);
    background: rgba(15, 159, 110, 0.14);
    color: rgb(110 231 183);
}

#btn-notifications.is-blocked {
    border: 1px solid rgba(239, 68, 68, 0.32);
    background: rgba(239, 68, 68, 0.1);
    color: rgb(248 113 113);
}

.app-dashboard-theme-button {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgb(63 63 70);
    border-radius: 999px;
    background: rgb(24 24 27 / 0.82);
    color: rgb(161 161 170);
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.app-dashboard-hero__inner {
    padding-right: 38px;
}

.app-dashboard-theme-button:hover {
    border-color: rgba(15, 159, 110, .42);
    background: rgb(39 39 42 / 0.92);
    color: rgb(244 244 245);
}

body[data-theme] .app-dashboard-theme-button {
    border-color: var(--theme-border);
    background: color-mix(in srgb, var(--theme-surface) 84%, transparent);
    color: var(--theme-muted);
}

body[data-theme] .app-dashboard-theme-button:hover {
    border-color: color-mix(in srgb, var(--theme-primary) 48%, var(--theme-border));
    color: var(--theme-text);
}

.theme-choice-list {
    display: grid;
    gap: 8px;
}

.theme-choice {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 1px solid rgb(63 63 70);
    border-radius: 8px;
    background: rgb(24 24 27);
    color: rgb(212 212 216);
    padding: 0 12px;
    text-align: left;
}

.theme-choice span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgb(39 39 42);
    color: var(--theme-primary, #0f9f6e);
}

.theme-choice strong {
    font-size: 13px;
}

.theme-choice:hover,
.theme-choice.is-active {
    border-color: color-mix(in srgb, var(--theme-primary, #0f9f6e) 48%, rgb(63 63 70));
    background: color-mix(in srgb, var(--theme-primary, #0f9f6e) 12%, rgb(24 24 27));
    color: rgb(244 244 245);
}

body[data-theme] .theme-choice {
    border-color: var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
}

body[data-theme] .theme-choice span {
    background: var(--theme-surface-3);
    color: var(--theme-primary);
}

@keyframes scout-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
    50%       { box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.18); }
}

/* ── PWA Install Banner ─────────────────────────────────────── */
.pwa-banner {
    position: fixed;
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    left: 0.75rem;
    right: 0.75rem;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.875rem;
    border: 1px solid rgb(63 63 70);
    border-radius: 1rem;
    background: rgb(24 24 27);
    box-shadow: 0 -2px 0 0 rgba(15, 159, 110, 0.25), 0 12px 36px rgba(0, 0, 0, 0.55);
    transform: translateY(calc(100% + 5.5rem));
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.3s ease;
    pointer-events: none;
}

.pwa-banner--visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.pwa-banner__icon {
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.625rem;
    overflow: hidden;
    background: rgb(9 9 11);
    border: 1px solid rgb(63 63 70);
    display: grid;
    place-items: center;
}

.pwa-banner__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pwa-banner__body {
    flex: 1;
    min-width: 0;
}

.pwa-banner__body strong {
    display: block;
    color: rgb(244 244 245);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
}

.pwa-banner__body span {
    display: block;
    color: rgb(161 161 170);
    font-size: 0.72rem;
    margin-top: 0.15rem;
    line-height: 1.4;
}

.pwa-banner__cta {
    flex: 0 0 auto;
    padding: 0.45rem 0.9rem;
    border-radius: 0.5rem;
    background: rgb(15 159 110);
    color: rgb(244 244 245);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.15s;
}

.pwa-banner__cta:hover { background: rgb(12 130 89); }
.pwa-banner__cta:active { background: rgb(10 102 71); transform: scale(0.97); }

.pwa-banner__dismiss {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    display: grid;
    place-items: center;
    color: rgb(113 113 122);
    font-size: 0.8rem;
    border-radius: 0.375rem;
    transition: color 0.15s, background 0.15s;
}

.pwa-banner__dismiss:hover {
    color: rgb(244 244 245);
    background: rgba(255, 255, 255, 0.06);
}

@media (min-width: 640px) {
    .pwa-banner {
        left: auto;
        right: 1.5rem;
        bottom: 1.5rem;
        max-width: 360px;
    }
}
