/**
 * Calendário de Atividades - Heatmap de Estudos - Estilos
 */

/* ===== HEATMAP COMPACTO (Widget do Dashboard) ===== */

.heatmap-widget {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.heatmap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.heatmap-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgb(167, 139, 250);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.heatmap-title i,
.heatmap-title [data-lucide] {
    width: 1rem;
    height: 1rem;
}

.heatmap-streak {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(251, 146, 60, 0.2);
    color: rgb(251, 146, 60);
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.heatmap-streak i,
.heatmap-streak [data-lucide] {
    width: 1rem;
    height: 1rem;
}

/* Grid Compacto (Mês) */
.heatmap-grid-compact {
    margin-bottom: 1rem;
}

.heatmap-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.heatmap-weekday {
    text-align: center;
    font-size: 0.75rem;
    color: rgb(148, 163, 184);
    font-weight: 500;
    padding: 0.25rem;
}

.heatmap-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.heatmap-day {
    aspect-ratio: 1;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.heatmap-day:hover {
    transform: scale(1.1);
    z-index: 10;
    border-color: rgb(167, 139, 250);
}

.heatmap-day-empty {
    background: transparent !important;
    border: none;
    cursor: default;
}

.heatmap-day-empty:hover {
    transform: none;
}

.heatmap-day-number {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(226, 232, 240);
}

/* Stats Compactas */
.heatmap-stats-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.heatmap-stat-item {
    text-align: center;
}

.heatmap-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: rgb(167, 139, 250);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.heatmap-stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgb(148, 163, 184);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Footer */
.heatmap-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.heatmap-link {
    color: rgb(96, 165, 250);
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s;
    font-weight: 500;
}

.heatmap-link:hover {
    color: rgb(147, 197, 253);
    text-decoration: underline;
}

.heatmap-link i,
.heatmap-link [data-lucide] {
    width: 0.875rem;
    height: 0.875rem;
}

/* ===== HEATMAP EXPANDIDO (Página de Estatísticas) ===== */

.heatmap-section {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.heatmap-header-expanded {
    margin-bottom: 1.5rem;
}

.heatmap-title-expanded {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgb(226, 232, 240);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.heatmap-title-expanded i,
.heatmap-title-expanded [data-lucide] {
    width: 1.5rem;
    height: 1.5rem;
    color: rgb(167, 139, 250);
}

.heatmap-stats-expanded {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.heatmap-stat-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.heatmap-stat-card:hover {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.heatmap-stat-card i,
.heatmap-stat-card [data-lucide] {
    color: rgb(167, 139, 250);
    flex-shrink: 0;
}

.heatmap-stat-content {
    flex: 1;
}

.heatmap-stat-value-lg {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: rgb(226, 232, 240);
    line-height: 1;
    margin-bottom: 0.25rem;
}

/* Grid Expandido (Ano) */
.heatmap-grid-expanded {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 0.5rem;
    overflow-x: auto;
}

.heatmap-week {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.heatmap-cell {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(71, 85, 105, 0.2);
}

.heatmap-cell:hover {
    transform: scale(1.5);
    z-index: 10;
    border-color: rgb(167, 139, 250);
}

.heatmap-cell-empty {
    background: transparent !important;
    border: none;
    cursor: default;
}

.heatmap-cell-empty:hover {
    transform: none;
}

/* Legenda */
.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.375rem;
}

.heatmap-legend-label {
    font-size: 0.75rem;
    color: rgb(148, 163, 184);
}

.heatmap-legend-item {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

/* ===== RESPONSIVIDADE ===== */

@media (max-width: 768px) {
    /* Widget compacto */
    .heatmap-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .heatmap-stats-compact {
        grid-template-columns: repeat(3, 1fr);
    }

    .heatmap-day {
        font-size: 0.7rem;
    }

    /* Heatmap expandido */
    .heatmap-stats-expanded {
        grid-template-columns: repeat(2, 1fr);
    }

    .heatmap-title-expanded {
        font-size: 1.25rem;
    }

    .heatmap-stat-value-lg {
        font-size: 1.5rem;
    }

    .heatmap-grid-expanded {
        padding: 0.5rem;
    }

    .heatmap-cell {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .heatmap-widget {
        padding: 1rem;
    }

    .heatmap-stats-compact {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .heatmap-stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem;
        background: rgba(15, 23, 42, 0.4);
        border-radius: 0.375rem;
    }

    .heatmap-stat-value {
        font-size: 1.25rem;
    }

    .heatmap-weekday {
        font-size: 0.65rem;
    }

    .heatmap-day-number {
        font-size: 0.65rem;
    }

    .heatmap-stats-expanded {
        grid-template-columns: 1fr;
    }

    .heatmap-cell {
        width: 8px;
        height: 8px;
    }

    .heatmap-legend {
        justify-content: center;
    }
}

/* ===== ANIMAÇÕES ===== */

@keyframes heatmapFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.heatmap-widget,
.heatmap-section {
    animation: heatmapFadeIn 0.3s ease-out;
}

/* ===== COCKPIT OVERRIDES ===== */

.heatmap-section {
    border-radius: 1.15rem;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 28%),
        linear-gradient(145deg, rgba(8, 15, 31, 0.96), rgba(18, 31, 58, 0.9));
    box-shadow:
        0 22px 48px rgba(2, 8, 23, 0.32),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.heatmap-title-expanded {
    color: rgb(248, 250, 252);
    letter-spacing: 0.02em;
}

.heatmap-title-expanded i,
.heatmap-title-expanded [data-lucide] {
    color: rgb(103, 232, 249);
}

.heatmap-stat-card {
    border-radius: 1rem;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(26, 39, 69, 0.84));
    box-shadow:
        0 18px 34px rgba(2, 8, 23, 0.24),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.heatmap-stat-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 28px 44px rgba(2, 8, 23, 0.34),
        0 0 24px rgba(34, 211, 238, 0.08);
}

.heatmap-grid-expanded {
    padding: 1.25rem;
    border: 1px solid rgba(71, 85, 105, 0.35);
    border-radius: 1rem;
    background:
        linear-gradient(145deg, rgba(7, 15, 31, 0.86), rgba(13, 25, 47, 0.82));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.heatmap-cell {
    border-radius: 0.45rem;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.1);
}

.heatmap-cell:hover {
    transform: translateY(-2px) scale(1.08);
    box-shadow:
        0 0 16px rgba(34, 211, 238, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.heatmap-link {
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    background: linear-gradient(145deg, rgba(8, 15, 31, 0.96), rgba(18, 31, 58, 0.84));
    text-decoration: none;
}

/* Tooltip nativo do navegador - sem customização para evitar duplicação e cortes */
