/** 256BIP:deps — gerado por deps_annotate.py; não editar manualmente
 * used-by: frontend/pages/profile.php
 * uses: (nenhum detectado)
 */

/** Presença compartilhada — perfil, inbox, modais (paridade com app Android) */

.presence-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--bg-2);
}

.profile-presence {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    flex-shrink: 0;
    max-width: 100%;
}

.profile-presence__label {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.profile-presence__label--offline,
.profile-presence__label--invisible {
    color: var(--text-3);
}

.profile-presence__label--online { color: #5cb88a; }
.profile-presence__label--busy { color: #e8a84c; }
.profile-presence__label--sleeping { color: #9b8fd9; }
.profile-presence__label--working { color: #6ba3d6; }
.profile-presence__label--traveling { color: #5eb8b0; }
.profile-presence__label--gym { color: #e8926c; }
.profile-presence__label--studying { color: #8fa8e8; }

.presence-indicator--lg {
    width: 14px;
    height: 14px;
    margin-left: 0;
}

.presence-indicator--online { background-color: #5cb88a; }
.presence-indicator--busy { background-color: #e8a84c; }
.presence-indicator--sleeping { background-color: #9b8fd9; }
.presence-indicator--working { background-color: #6ba3d6; }
.presence-indicator--traveling { background-color: #5eb8b0; }
.presence-indicator--gym { background-color: #e8926c; }
.presence-indicator--studying { background-color: #8fa8e8; }
.presence-indicator--invisible,
.presence-indicator--offline { background-color: var(--text-3); }

.inbox-viewer-status-row {
    width: 100%;
    flex: 1 1 100%;
    margin-bottom: 2px;
}

.inbox-viewer-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-2);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--duration), background var(--duration), color var(--duration);
}

.inbox-viewer-status:hover {
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(99, 102, 241, 0.08);
    color: var(--text);
}

.inbox-viewer-status__chevron {
    font-size: 1rem;
    color: var(--text-3);
    margin-left: 2px;
    flex-shrink: 0;
}

.inbox-viewer-status .profile-presence__label {
    margin-left: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.presence-status-modal {
    width: min(380px, calc(100vw - 32px));
    padding: 24px;
}

.presence-status-modal__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.presence-status-modal__head h2 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--white);
}

.presence-status-modal__close {
    background: transparent;
    border: none;
    color: var(--text-3);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background var(--duration), color var(--duration);
}

.presence-status-modal__close:hover {
    background: var(--surface-2);
    color: var(--white);
}

.presence-status-modal__lead {
    margin: 0 0 20px;
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.5;
}

.presence-status-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(60vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.presence-status-list::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.presence-status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: left;
    transition: all var(--duration) ease;
    width: 100%;
}

.presence-status-item:hover {
    background: var(--surface-2);
    border-color: var(--text-3);
}

.presence-status-item.is-active {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--accent);
}

.presence-status-item__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.presence-status-item__text strong {
    font-size: 0.95rem;
    color: var(--white);
    margin-bottom: 2px;
}

.presence-status-item__text span {
    font-size: 0.8rem;
    color: var(--text-3);
    line-height: 1.35;
}

.presence-status-item__check {
    font-size: 1.25rem;
    color: var(--accent);
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--duration) ease;
    flex-shrink: 0;
}

.presence-status-item.is-active .presence-status-item__check {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 640px) {
    .profile-header__name-row {
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 8px;
    }

    .profile-header__name {
        font-size: 1.35rem;
        max-width: 100%;
    }

    .profile-presence {
        margin-left: 0;
        order: 3;
        flex-basis: 100%;
        padding-top: 2px;
    }

    .profile-header__name-edit--presence {
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 8px;
        width: 100%;
    }

    .profile-header__top {
        gap: 12px;
    }

    .profile-header__avatar {
        width: 68px;
        height: 68px;
        font-size: 1.6rem;
    }

    .inbox-viewer-status-row {
        order: -1;
        margin-bottom: 8px;
    }

    .inbox-viewer-status {
        width: 100%;
        justify-content: flex-start;
    }

    .filter-pills-row {
        flex-wrap: wrap;
    }

    .inbox-item__lastseen {
        max-width: 92px;
    }

    .inbox-item__display {
        flex-wrap: wrap;
        row-gap: 2px;
    }

    .inbox-item__status {
        font-size: 0.64rem;
    }

    .presence-status-modal {
        width: calc(100vw - 24px);
        padding: 18px 16px;
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .presence-status-modal::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .presence-status-list {
        max-height: min(52vh, 360px);
    }
}

@media (max-width: 400px) {
    .profile-presence__label {
        font-size: 0.72rem;
    }

    .inbox-item__meta {
        gap: 4px;
    }

    .inbox-item__lastseen-primary {
        font-size: 0.6rem;
    }
}

/* === Tema claro — overrides (nao altera o escuro) === */
/* Cores de status como TEXTO: os tons pastel sao claros demais sobre fundo claro; escurecer para legibilidade. */
[data-theme="light"] .profile-presence__label--online { color: #0f9d6e; }
[data-theme="light"] .profile-presence__label--busy { color: #c07a15; }
[data-theme="light"] .profile-presence__label--sleeping { color: #6a5bc4; }
[data-theme="light"] .profile-presence__label--working { color: #2f6fe0; }
[data-theme="light"] .profile-presence__label--traveling { color: #1e8f86; }
[data-theme="light"] .profile-presence__label--gym { color: #c65f33; }
[data-theme="light"] .profile-presence__label--studying { color: #4661c9; }
