/* Estilos customizados para o calendário de eventos */

body {
    background-color: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.card-header {
    border-radius: 8px 8px 0 0 !important;
    font-weight: 600;
}

/* Calendário */
#calendar {
    max-width: 100%;
    padding: 20px;
}

.fc {
    /* Customização FullCalendar */
}

.fc-event {
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.85rem;
}

.fc-event:hover {
    opacity: 0.8;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.fc-daygrid-event {
    white-space: normal !important;
    align-items: flex-start !important;
}

/* Legenda */
.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 8px;
    display: inline-block;
}

/* Modal de evento */
.event-detail {
    margin-bottom: 15px;
}

.event-detail-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.event-detail-value {
    color: #212529;
    line-height: 1.6;
}

.event-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}

.event-link:hover {
    background: #0056b3;
    color: white;
}

/* Estilos diferenciados por tipo de link */
.event-link-purchase {
    background: #28a745;  /* Verde - link direto de compra */
}

.event-link-purchase:hover {
    background: #218838;
    color: white;
}

.event-link-info {
    background: #17a2b8;  /* Azul claro - site informativo/artista */
}

.event-link-info:hover {
    background: #138496;
    color: white;
}

.event-link-venue {
    background: #6c757d;  /* Cinza - homepage do venue */
}

.event-link-venue:hover {
    background: #5a6268;
    color: white;
}

.event-link-article {
    background: #6f42c1;  /* Roxo - artigo de referência DiarioDoRio */
    margin-left: 10px;
}

.event-link-article:hover {
    background: #5a32a3;
    color: white;
}

/* Botões */
#refresh-btn,
#refresh-deep-btn {
    animation: none;
}

#refresh-btn.spinning,
#refresh-deep-btn.spinning {
    animation: spin 1s linear infinite;
}

#refresh-btn:disabled,
#refresh-deep-btn:disabled,
#judge-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Toast notifications */
.toast {
    min-width: 300px;
}

/* Responsividade */
@media (max-width: 768px) {
    #calendar {
        padding: 10px;
    }

    .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .fc-toolbar-chunk {
        margin-bottom: 10px;
    }

    .legend-item {
        font-size: 0.8rem;
    }
}

/* Loading state */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Badge de estatísticas */
#stats-badge {
    font-size: 0.9rem;
    padding: 8px 12px;
}

/* Filtros */
.form-select-sm, .form-label {
    font-size: 0.9rem;
}

.btn-sm {
    font-size: 0.85rem;
}

/* Quality Judge Button */
#judge-btn {
    animation: none;
    position: relative;
}

#judge-btn.judging {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Quality Score Badges */
.quality-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 4px;
    color: white;
}

.quality-badge-excellent {
    background: #28a745;  /* Verde - 8-10 */
}

.quality-badge-good {
    background: #ffc107;  /* Amarelo - 5-7.9 */
    color: #212529;
}

.quality-badge-poor {
    background: #dc3545;  /* Vermelho - 0-4.9 */
}

/* Quality Alert Box in Modal */
.quality-alert {
    border-left: 4px solid;
    padding: 15px;
    margin-top: 15px;
    border-radius: 6px;
}

.quality-alert.alert-success {
    border-left-color: #28a745;
    background-color: #d4edda;
}

.quality-alert.alert-warning {
    border-left-color: #ffc107;
    background-color: #fff3cd;
}

.quality-alert.alert-danger {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

.quality-alert h6 {
    margin-bottom: 10px;
    font-weight: 700;
}

.quality-alert .row {
    margin-bottom: 5px;
}

.quality-alert small {
    font-size: 0.85rem;
    color: #495057;
}

/* Judge Progress Toast */
.judge-progress {
    font-weight: 600;
    color: #007bff;
}

/* Event with quality score in calendar */
.fc-event-has-quality {
    font-weight: 500;
}

/* =============================================================================
   SEÇÃO DE EVENTO ENRIQUECIDO
   ============================================================================= */

.enriched-section {
    background: linear-gradient(135deg, #f8fff8 0%, #e8f5e9 100%);
    border-radius: 8px;
    animation: fadeInUp 0.5s ease-in-out;
}

.enriched-section h6 {
    font-weight: 600;
    font-size: 1.1rem;
}

.enriched-section strong.text-muted {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.enriched-section p {
    line-height: 1.7;
    color: #333;
    text-align: justify;
}

/* Botão de vídeo YouTube */
.enriched-section .btn-outline-danger {
    border-width: 2px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.enriched-section .btn-outline-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Animação de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botão enrich-event no modal */
#enrich-event-btn {
    font-weight: 500;
    transition: all 0.3s ease;
}

#enrich-event-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.4);
}

#enrich-event-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Botão já enriquecido (verde) */
#enrich-event-btn.btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

/* ─── Em cartaz: exposições e temporadas, fora da grade ─────────────── */
.em-cartaz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border: 0;
    background: #fff;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.em-cartaz-header[aria-expanded="false"] {
    border-bottom: 0;
    border-radius: 8px !important;
}

.em-cartaz-sub {
    font-weight: 400;
    font-size: 0.85rem;
    color: #6c757d;
}

.em-cartaz-ultimos {
    background: #fff8e6;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.em-cartaz-grupos {
    column-width: 260px;
    column-gap: 1.25rem;
}

.em-cartaz-grupo {
    break-inside: avoid;
    margin-bottom: 0.5rem;
}

.em-cartaz-rotulo {
    font-weight: 600;
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 0.15rem;
}

summary.em-cartaz-rotulo {
    cursor: pointer;
}

.em-cartaz-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.em-cartaz-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    border: 0;
    background: none;
    padding: 0.2rem 0.25rem;
    text-align: left;
    font-size: 0.85rem;
    border-radius: 4px;
}

.em-cartaz-item:hover,
.em-cartaz-item:focus-visible {
    background: #f1f3f5;
}

.em-cartaz-cor {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.em-cartaz-titulo {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.em-cartaz-meta {
    flex: none;
    color: #6c757d;
    font-size: 0.75rem;
}

.em-cartaz-nota {
    flex: none;
    font-size: 0.7rem;
}

/* O painel não pode empurrar o calendário para fora da primeira tela. */
#em-cartaz-body {
    max-height: 340px;
    overflow-y: auto;
}

.em-cartaz-mais {
    cursor: pointer;
    font-size: 0.8rem;
    color: #6c757d;
    padding: 0.15rem 0.25rem;
}

/* Horário numa linha só: com white-space normal no evento, "19:30" quebrava em "19:3 / 0". */
.fc-daygrid-event .fc-event-time {
    flex: none;
    white-space: nowrap;
}

/* Dia de entrada franca do museu (utils/gratuidades.py). */
.em-cartaz-gratis {
    background: #d1f2e0;
    color: #146c43;
    font-weight: 500;
    margin-left: 0.35rem;
}

/* ─── Modo Dia + mapa (27/09/2026) ─────────────────────────────────── */

.modo-barra { display: flex; justify-content: flex-end; gap: .5rem; }

.dia-barra { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.dia-titulo { flex: 1 1 0; min-width: 0; text-align: center; line-height: 1.2; }
.dia-titulo strong { font-size: 1.05rem; }
.dia-data { width: auto; max-width: 160px; }

.dia-chips { display: flex; gap: .35rem; overflow-x: auto; padding-top: .5rem; scrollbar-width: thin; }
.dia-chip {
    flex: none; border: 1px solid #dee2e6; background: #fff; border-radius: 999px;
    padding: .2rem .7rem; font-size: .85rem; white-space: nowrap; color: #212529;
}
.dia-chip.fds { border-color: #b6d4fe; }
.dia-chip:hover { background: #f1f3f5; }
.dia-chip.ativo { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.dia-chip-n { opacity: .7; font-size: .75rem; margin-left: .15rem; }

.dia-lista { list-style: none; margin: 0; padding: 0; }
.dia-item {
    display: flex; align-items: center; gap: .5rem; padding: .45rem .5rem;
    border-bottom: 1px solid #eef0f2; border-radius: 6px; background: #fff;
}
.dia-item.destaque { background: #e7f1ff; }
.dia-hora { flex: none; width: 3.1rem; font-weight: 600; font-variant-numeric: tabular-nums; color: #495057; }
.dia-corpo {
    flex: 1 1 auto; min-width: 0; border: 0; background: none; padding: 0; text-align: left;
    display: flex; flex-direction: column; color: inherit;
}
.dia-tit { font-weight: 500; line-height: 1.25; display: flex; align-items: baseline; gap: .4rem; }
.dia-tit .em-cartaz-cor { position: relative; top: -1px; }
.dia-local { font-size: .8rem; color: #6c757d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dia-corpo:hover .dia-tit { text-decoration: underline; }
.dia-nota { flex: none; }
.dia-pino { flex: none; border: 0; background: none; color: #0d6efd; padding: .25rem .35rem; }
.dia-sem-mapa { flex: none; color: #ced4da; padding: .25rem .35rem; }

.dia-em-cartaz { margin-top: .75rem; }
.dia-em-cartaz summary { cursor: pointer; padding: .4rem .5rem; font-weight: 500; }

.dia-mapa-caixa { position: sticky; top: .75rem; }
#dia-mapa { height: calc(100vh - 230px); min-height: 420px; border-radius: 8px; z-index: 0; }

.dia-popup-casa { font-weight: 600; margin-bottom: .25rem; }
.dia-popup ul { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.dia-popup-ev { border: 0; background: none; padding: .15rem 0; text-align: left; color: #0d6efd; }
.dia-popup-ev:hover { text-decoration: underline; }

.dia-abas { display: none; }

@media (max-width: 991.98px) {
    .dia-abas { display: flex; }
    .dia-conteudo[data-aba="lista"] .dia-col-mapa { display: none; }
    .dia-conteudo[data-aba="mapa"] .dia-col-lista { display: none; }
    #dia-mapa { height: calc(100vh - 250px); min-height: 360px; }
    .dia-mapa-caixa { position: static; }
    .modo-barra { justify-content: stretch; }
    .modo-barra .btn-group { flex: 1 1 auto; }
    .dia-data { max-width: none; flex: 1 1 100%; }
}

.dia-toggle { background: #fff; padding: .25rem .5rem; font-size: .8rem; }
.dia-toggle label { display: flex; align-items: center; gap: .35rem; margin: 0; cursor: pointer; white-space: nowrap; }
