/* ==========================================================================
   USER STUDY TRACKER - ESTILOS VISUAIS
   Reflexões & Estudos Bíblicos - Favoritos, Já Lidos, Filtros & Gaveta
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. BOTÕES DE AÇÃO NOS CARDS (HERO E GRADE DE ESTUDOS)
   -------------------------------------------------------------------------- */
.hero-multi-card-inner,
.grid-item-inner {
    position: relative;
}

/* Container de ações flutuantes no topo do Card */
.card-tracker-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Botão Favoritar */
.post-action-favorite-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 0;
}

.post-action-favorite-btn:hover {
    background: rgba(225, 29, 72, 0.85);
    color: #ffffff;
    border-color: rgba(244, 63, 94, 0.6);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.4);
}

.post-action-favorite-btn.active {
    background: #e11d48;
    color: #ffffff;
    border-color: #f43f5e;
    box-shadow: 0 0 16px rgba(225, 29, 72, 0.55);
}

.post-action-favorite-btn.active i {
    animation: heartPulse 0.35s ease;
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* Botão Marcar Lido */
.post-action-read-btn {
    height: 30px;
    padding: 0 10px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.post-action-read-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.post-action-read-btn.active {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.55);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

/* Badge de "Lido" no Card */
.card-read-indicator-badge {
    display: none;
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 3px 9px;
    border-radius: 9999px;
    background: rgba(5, 150, 105, 0.88);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    align-items: center;
    gap: 4px;
}

/* Quando o post é lido: tratamento visual sofisticado */
.hero-multi-card.is-read-post .card-read-indicator-badge,
.estudos-grid-item.is-read-post .card-read-indicator-badge {
    display: inline-flex;
}

.hero-multi-card.is-read-post .hero-multi-card-inner,
.estudos-grid-item.is-read-post .grid-item-inner {
    border-color: rgba(52, 211, 153, 0.28) !important;
}

.hero-multi-card.is-read-post .hero-card-img,
.estudos-grid-item.is-read-post .grid-item-thumb {
    filter: brightness(0.92) contrast(0.96);
}

/* --------------------------------------------------------------------------
   2. BARRA DE FILTROS EM PÍLULAS (ACERVO DA PÁGINA INICIAL)
   -------------------------------------------------------------------------- */
.estudos-filter-pills-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 36px;
    padding: 8px 12px;
}

.filter-pill {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 9999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.filter-pill i {
    font-size: 13px;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.filter-pill .filter-count {
    background: rgba(15, 23, 42, 0.7);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-pill:hover {
    background: rgba(51, 65, 85, 0.85);
    color: #ffffff;
    border-color: rgba(234, 179, 8, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.filter-pill:hover i {
    color: #eab308;
}

.filter-pill.active {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.22) 0%, rgba(202, 138, 4, 0.12) 100%);
    border-color: #eab308;
    color: #fef08a;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.25);
}

.filter-pill.active i {
    color: #facc15;
}

.filter-pill.active .filter-count {
    background: rgba(234, 179, 8, 0.25);
    color: #fef08a;
    border-color: rgba(234, 179, 8, 0.5);
}

/* Aviso de Filtro Vazio */
.estudos-empty-filter {
    text-align: center;
    padding: 48px 24px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    margin: 20px 0;
    color: #94a3b8;
}

.estudos-empty-filter i {
    font-size: 38px;
    color: #eab308;
    margin-bottom: 12px;
    opacity: 0.8;
}

.estudos-empty-filter .empty-title {
    font-size: 17px;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0 6px;
}

.estudos-empty-filter .empty-desc {
    font-size: 13px;
    margin: 0;
}

/* --------------------------------------------------------------------------
   3. BOTÕES NA BARRA DE LEITURA (TOOLBAR NO SINGLE POST)
   -------------------------------------------------------------------------- */
.reading-toolbar #btn-toggle-favorite.active {
    background: rgba(225, 29, 72, 0.15) !important;
    color: #f43f5e !important;
    border-color: rgba(244, 63, 94, 0.4) !important;
}

.reading-toolbar #btn-toggle-favorite.active i {
    color: #f43f5e !important;
}

.reading-toolbar #btn-toggle-read.active {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border-color: rgba(52, 211, 153, 0.4) !important;
}

.reading-toolbar #btn-toggle-read.active i {
    color: #34d399 !important;
}

/* --------------------------------------------------------------------------
   4. BOTÃO FLUTUANTE "MEUS ESTUDOS"
   -------------------------------------------------------------------------- */
.escriba-floating-study-btn {
    position: fixed;
    bottom: 26px;
    right: 26px;
    z-index: 9998;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(234, 179, 8, 0.45);
    color: #f8fafc;
    padding: 10px 18px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(234, 179, 8, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.escriba-floating-study-btn i {
    color: #eab308;
    font-size: 15px;
}

.escriba-floating-study-btn:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: #eab308;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6), 0 0 28px rgba(234, 179, 8, 0.35);
}

.study-drawer-badge-count {
    background: #e11d48;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.4);
}

/* --------------------------------------------------------------------------
   5. GAVETA LATERAL (DRAWER) "MEUS ESTUDOS"
   -------------------------------------------------------------------------- */
.study-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.study-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.study-drawer-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: #0b1120;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.7);
    z-index: 100001;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.study-drawer-sidebar.is-open {
    right: 0;
}

/* Header do Drawer */
.drawer-header {
    padding: 24px 22px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-header-icon {
    font-size: 22px;
    color: #eab308;
    background: rgba(234, 179, 8, 0.12);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.drawer-heading {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
}

.drawer-subheading {
    font-size: 12px;
    color: #94a3b8;
}

.btn-close-study-drawer {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close-study-drawer:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Abas de Navegação */
.drawer-tabs-nav {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px;
    gap: 6px;
}

.drawer-tab-btn {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.2s ease;
}

.drawer-tab-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.03);
}

.drawer-tab-btn.active {
    background: rgba(30, 41, 59, 0.9);
    color: #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.drawer-tab-btn.active i.fa-heart {
    color: #f43f5e;
}

.drawer-tab-btn.active i.fa-circle-check {
    color: #34d399;
}

/* Área de Conteúdo */
.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.drawer-tab-panel {
    display: none;
}

.drawer-tab-panel.active {
    display: block;
}

/* Lista de Itens Salvos */
.drawer-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.drawer-item:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(234, 179, 8, 0.3);
    transform: translateX(-2px);
}

.drawer-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drawer-item-thumb.placeholder {
    color: #eab308;
    font-size: 18px;
}

.drawer-item-info {
    flex: 1;
    min-width: 0;
}

.drawer-item-title {
    display: block;
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.drawer-item-title:hover {
    color: #eab308;
}

.drawer-item-meta {
    font-size: 11px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.drawer-item-meta.status-read {
    color: #34d399;
}

.drawer-item-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.drawer-item-remove-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.25);
}

/* Estado Vazio */
.drawer-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.drawer-empty-state i {
    font-size: 42px;
    margin-bottom: 14px;
    opacity: 0.5;
}

.drawer-empty-state .empty-title {
    font-size: 16px;
    font-weight: 700;
    color: #cbd5e1;
    margin: 0 0 6px;
}

.drawer-empty-state .empty-sub {
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

/* --------------------------------------------------------------------------
   6. COMPATIBILIDADE COM O MODO CLARO (LIGHT THEME)
   -------------------------------------------------------------------------- */
.light-theme .study-drawer-sidebar {
    background: #ffffff;
    border-left-color: rgba(0, 0, 0, 0.08);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.15);
}

.light-theme .drawer-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.light-theme .drawer-heading {
    color: #0f172a;
}

.light-theme .drawer-tabs-nav {
    background: #f8fafc;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.light-theme .drawer-tab-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.light-theme .drawer-item {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.06);
}

.light-theme .drawer-item:hover {
    background: #f1f5f9;
}

.light-theme .drawer-item-title {
    color: #0f172a;
}

.light-theme .filter-pill {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.light-theme .filter-pill.active {
    background: #fef9c3;
    border-color: #ca8a04;
    color: #854d0e;
}

/* --------------------------------------------------------------------------
   7. TOAST NOTIFICAÇÃO FLUTUANTE
   -------------------------------------------------------------------------- */
.escriba-tracker-toast {
    position: fixed;
    bottom: 84px;
    right: 26px;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #f8fafc;
    padding: 10px 18px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.escriba-tracker-toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.light-theme .escriba-tracker-toast {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(202, 138, 4, 0.35);
    color: #0f172a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
