/**
 * Estilos para o Widget de Agenda de Reuniões
 * 
 * @package DTICAddons
 * @subpackage Agenda
 */

.agenda-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Layout Horizontal - Container wrapper */
.agenda-horizontal-wrapper {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: stretch; /* faz com que todos os filhos tenham a mesma altura do maior */
    justify-content: center;
}

/* Layout Horizontal - Containers individuais */
.agenda-horizontal-wrapper .agenda-container {
    /* Mantém largura padrão, mas impede que os itens cresçam para ocupar todo o espaço
       Isso permite centralizar um número arbitrário de colunas */
    flex: 0 0 auto;
    min-width: 300px;
    max-width: 400px;
    align-self: stretch; /* garante que cada container se estique para a altura do maior */
}

.agenda-layout-vertical {
    flex-direction: column;
    align-items: center;
}

.agenda-layout-vertical .agenda-date {
    margin-bottom: 15px;
}

.agenda-date {
    background-color: #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    min-width: 80px;
    height: 80px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.agenda-day {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
    color: #0b2545; /* tom mais escuro e contrastante */
    margin-bottom: 0;
}

.agenda-month {
    font-size: 12px;
    font-weight: 500;
    color: #000000;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.agenda-meetings {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    flex-grow: 1;
    min-width: 0;
}

.agenda-meeting {
    padding: 0;
    border-bottom: none;
    font-size: 14px;
    line-height: 1em; /* sem espaçamento extra entre linhas */
    color: #333333;
    white-space: normal;
    margin: 0;
    /* Limitador visual: exibe no máximo 10 linhas via max-height */
    max-height: calc(1em * 10);
    overflow: hidden;
}

.agenda-meeting br {
    margin: 0;
    padding: 0;
    line-height: 1em;
}

/* Texto do resumo: remover espaçamento entre linhas e limitar visualmente a 10 linhas */
.agenda-meeting-text {
    display: block;
    line-height: 1em;
    margin: 0;
    padding: 0;
    white-space: normal;
    overflow: hidden;
    max-height: calc(1em * 10); /* fallback visual para navegadores sem -webkit-line-clamp */
}

.agenda-meeting-text br {
    line-height: 1em;
}

.agenda-line {
    display: block;
    margin: 0;
    padding: 0;
    line-height: 1em;
}

/* Link para ver a agenda completa do dia */
.agenda-full-day-link {
    position: absolute;
    right: 10px;
    bottom: 8px;
    font-size: 12px;
    color: #0b56a3;
    text-decoration: none;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 3;
}
.agenda-full-day-link:hover {
    text-decoration: underline;
}

/* Container clicável */
.agenda-container[role="link"] {
    cursor: pointer;
    position: relative;
}

.agenda-meeting:last-child {
    border-bottom: none;
}

.agenda-time {
    font-weight: 700;
    color: #000000;
}

/* Responsividade */
@media (max-width: 768px) {
    .agenda-container {
        /* Manter layout horizontal mesmo no mobile */
        flex-direction: row;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .agenda-date {
        min-width: 60px;
        padding: 10px;
        flex-shrink: 0;
    }
    
    .agenda-day {
        font-size: 18px;
    }
    
    .agenda-month {
        font-size: 12px;
        font-weight: 700;
        color: #0b2545;
        text-transform: lowercase;
        letter-spacing: 0.5px;
        margin-top: 2px;
        min-width: 0;

    /* Centraliza os elementos dentro do container para balancear o visual */
    .agenda-container {
        display: flex;
        align-items: stretch; /* permite que .agenda-meetings preencha a altura total */
    }

    .agenda-container .agenda-meetings {
        padding-left: 16px;
        display: flex;
        flex-direction: column;
        flex: 1 1 auto; /* faz a área de reuniões ocupar o espaço disponível */
    }
    }
        font-size: 12px;
        font-weight: 600;
        color: #000000;
        text-transform: lowercase;
        letter-spacing: 0.5px;
        margin-top: 0;
}

@media (max-width: 480px) {
    .agenda-container {
        padding: 12px;
        gap: 10px;
    }
    
    .agenda-date {
        min-width: 50px;
        padding: 8px;
    }
    
    .agenda-day {
        font-size: 16px;
    }
    
    .agenda-month {
        font-size: 9px;
    }
    
    .agenda-meeting {
        padding: 0;
        border-bottom: none;
        font-size: 14px;
        line-height: 1em; /* sem espaçamento extra entre linhas */
        color: #333333;
        white-space: normal;
        margin: 0;
        /* Cada bloco de reunião não força altura do container; o wrapper garante a igualdade */
    }
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}

.agenda-meeting:hover {
    /* Removido destaque por hover conforme solicitado */
    background: transparent;
    border-radius: 4px;
    padding-left: 0;
    margin-left: 0;
    transition: none;
}

/* Melhorias para acessibilidade */
.agenda-container:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Animações suaves */
.agenda-container,
.agenda-date,
.agenda-meetings,
.agenda-meeting {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Melhorias para telas de alta densidade */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .agenda-container {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Proteção específica para o editor do Elementor */
.elementor-editor-active .agenda-container {
    min-height: 100px;
}

.elementor-editor-active .agenda-date {
    min-width: 80px;
}

.elementor-editor-active .agenda-meetings {
    min-height: 60px;
}
