/* ========================================
   SISTEMA DE AGENDAMENTO SPRINT - ESTILOS MODERNOS
   ======================================== */

/* ========================================
   CONTAINERS PRINCIPAIS
   ======================================== */
.container-agendamento {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e6ed;
    padding: 20px;
    margin-bottom: 20px;
}

/* ========================================
   CALENDÁRIO MODERNO
   ======================================== */

/* Container principal do calendário */
.calendario-agendamento,
.grid-dinamico {
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    background: #ffffff !important;
    overflow: hidden !important;
    border: none !important;
    margin: 20px 0 !important;
}

/* Cabeçalho do calendário */
.calendario-agendamento .linha:first-child,
.grid-dinamico .linha:first-child {
    background: #667eea !important;
    padding: 20px 0 !important;
    border-bottom: none !important;
}

/* Elementos do cabeçalho */
.calendario-agendamento .linha:first-child .coluna,
.grid-dinamico .linha:first-child .coluna {
    color: white !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}

/* Botões de navegação no cabeçalho */
.calendario-agendamento .linha:first-child .coluna:first-child,
.calendario-agendamento .linha:first-child .coluna:last-child,
.grid-dinamico .linha:first-child .coluna:first-child,
.grid-dinamico .linha:first-child .coluna:last-child {
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border-radius: 50% !important;
    padding: 10px !important;
}

.calendario-agendamento .linha:first-child .coluna:first-child:hover,
.calendario-agendamento .linha:first-child .coluna:last-child:hover,
.grid-dinamico .linha:first-child .coluna:first-child:hover,
.grid-dinamico .linha:first-child .coluna:last-child:hover {
    background: rgba(255,255,255,0.2) !important;
    transform: scale(1.1) !important;
}

/* Linha dos dias da semana */
.calendario-agendamento .linha:nth-child(2),
.grid-dinamico .linha:nth-child(2) {
    background: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6 !important;
    font-weight: 600 !important;
}

.calendario-agendamento .linha:nth-child(2) .coluna,
.grid-dinamico .linha:nth-child(2) .coluna {
    padding: 16px 8px !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #495057 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Células dos dias */
.calendario-agendamento .linha:not(:first-child):not(:nth-child(2)) .coluna,
.grid-dinamico .linha:not(:first-child):not(:nth-child(2)) .coluna {
    border: 1px solid #f1f3f4 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    min-height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    position: relative !important;
}

.calendario-agendamento .linha:not(:first-child):not(:nth-child(2)) .coluna:hover,
.grid-dinamico .linha:not(:first-child):not(:nth-child(2)) .coluna:hover {
    background: #e3f2fd !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    border-color: #2196F3 !important;
}

/* Container dos dias */
.calendario-dia-container {
    transition: all 0.3s ease !important;
}

/* Números dos dias - CampoDisplay dentro do container */
.calendario-dia-container .campo-display {
    font-size: 16px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

/* Dia atual */
.calendario-hoje .campo-display {
    background: #4CAF50 !important;
    color: white !important;
    font-weight: 700 !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4) !important;
    animation: pulseToday 2s infinite !important;
}

.calendario-hoje:hover {
    background: #c8e6c9 !important;
}

/* Fins de semana */
.calendario-fim-semana {
    background: #E8F5E8 !important;
}

.calendario-fim-semana .campo-display {
    background: #E8F5E8 !important;
    color: #2E7D32 !important;
    font-weight: 600 !important;
}

/* Outros meses */
.calendario-outro-mes {
    background: #fafafa !important;
}

.calendario-outro-mes .campo-display {
    background: #fafafa !important;
    color: #bdc3c7 !important;
    font-weight: 400 !important;
    opacity: 0.5 !important;
}

.calendario-outro-mes:hover {
    background: #f5f5f5 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Dia selecionado */
.calendario-agendamento .linha:not(:first-child):not(:nth-child(2)) .coluna.selected,
.grid-dinamico .linha:not(:first-child):not(:nth-child(2)) .coluna.selected {
    background: #2196F3 !important;
    color: white !important;
    border-color: #1976D2 !important;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3) !important;
}

.calendario-agendamento .linha:not(:first-child):not(:nth-child(2)) .coluna.selected .calendario-dia,
.grid-dinamico .linha:not(:first-child):not(:nth-child(2)) .coluna.selected .calendario-dia {
    color: white !important;
    font-weight: 700 !important;
}

/* ========================================
   OPÇÕES DE SINCRONIZAÇÃO
   ======================================== */

/* Container das opções de sincronização */
.toggle-box.sincronizacao {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Elementos das opções */
.toggle-box.sincronizacao .field_toggle_elem {
    transition: all 0.3s ease;
}

.toggle-box.sincronizacao .toggle-box-elem {
    margin: 10px;
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 180px;
    max-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Estilo padrão para "Não sincronizar" (primeira opção) */
.toggle-box.sincronizacao .field_toggle_elem:first-child .toggle-box-elem {
    background: #ffffff !important;
    color: #0078d4 !important;
    border-color: #0078d4 !important;
}

.toggle-box.sincronizacao .field_toggle_elem:first-child .toggle-box-elem svg {
    fill: #0078d4 !important;
}

.toggle-box.sincronizacao .field_toggle_elem:first-child .toggle-box-elem * {
    color: #0078d4 !important;
}

/* Estilo para "Sincronizar com Microsoft Teams" (segunda opção) */
.toggle-box.sincronizacao .field_toggle_elem:last-child .toggle-box-elem {
    background: #ffffff !important;
    color: #0078d4 !important;
    border-color: #0078d4 !important;
}

.toggle-box.sincronizacao .field_toggle_elem:last-child .toggle-box-elem svg {
    fill: #0078d4 !important;
}

.toggle-box.sincronizacao .field_toggle_elem:last-child .toggle-box-elem * {
    color: #0078d4 !important;
}



/* Hover para primeira opção - "Não sincronizar" */
.toggle-box.sincronizacao .field_toggle_elem:first-child:hover .toggle-box-elem {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,120,212,0.25);
    border-color: #0078d4;
}

/* Hover para segunda opção - "Sincronizar com Microsoft Teams" */
.toggle-box.sincronizacao .field_toggle_elem:last-child:hover .toggle-box-elem {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,120,212,0.25);
    border-color: #0078d4;
}

/* Hover genérico */
.toggle-box.sincronizacao .field_toggle_elem:hover .toggle-box-elem {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Primeira opção selecionada - "Não sincronizar" */
.toggle-box.sincronizacao .field_toggle_elem:first-child.selected .toggle-box-elem {
    background: #0078d4 !important;
    color: white !important;
    border: 2px solid #0078d4 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3) !important;
}

.toggle-box.sincronizacao .field_toggle_elem:first-child.selected svg {
    fill: white !important;
    width: 24px !important;
    height: 24px !important;
}

.toggle-box.sincronizacao .field_toggle_elem:first-child.selected .toggle-box-elem * {
    color: white !important;
}

/* Segunda opção selecionada - "Sincronizar com Microsoft Teams" */
.toggle-box.sincronizacao .field_toggle_elem:last-child.selected .toggle-box-elem {
    background: #0078d4 !important;
    color: white !important;
    border: 2px solid #0078d4 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3) !important;
}

.toggle-box.sincronizacao .field_toggle_elem:last-child.selected svg {
    fill: white !important;
    width: 24px !important;
    height: 24px !important;
}

.toggle-box.sincronizacao .field_toggle_elem:last-child.selected .toggle-box-elem * {
    color: white !important;
}

/* Fallback para opção selecionada genérica */
.toggle-box.sincronizacao .selected .toggle-box-elem {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3) !important;
}

.toggle-box.sincronizacao .selected svg {
    width: 24px !important;
    height: 24px !important;
}

/* Ícones das opções */
.toggle-box.sincronizacao svg {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease;
}

/* Textos das opções */
.toggle-box.sincronizacao .toggle-box-elem span,
.toggle-box.sincronizacao .toggle-box-elem div {
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    line-height: 1.4;
    transition: all 0.3s ease;
}

/* ========================================
   HORÁRIOS DISPONÍVEIS
   ======================================== */

/* Container dos horários */
.toggle-box:not(.sincronizacao) {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* Elementos dos horários */
.toggle-box:not(.sincronizacao) .field_toggle_elem.agendamento-sprint {
    transition: all 0.3s ease;
}

.toggle-box:not(.sincronizacao) .toggle-box-elem.agendamento-sprint {
    padding: 2px 8px ;
    border-radius: 8px;
    border: 2px solid #e0e6ed;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 80px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover dos horários disponíveis */
.toggle-box:not(.sincronizacao) .field_toggle_elem:hover .toggle-box-elem.agendamento-sprint {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #28a745 !important;
    background: #f8fff9 !important;
}

/* Horário selecionado */
.toggle-box:not(.sincronizacao) .selected .toggle-box-elem,
.toggle-box:not(.sincronizacao) .field_toggle_elem.selected .toggle-box-elem {
    background: #28a745 !important;
    color: white !important;
    border: 2px solid #28a745 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
}

.toggle-box:not(.sincronizacao) .selected .toggle-box-elem *,
.toggle-box:not(.sincronizacao) .field_toggle_elem.selected .toggle-box-elem * {
    color: white !important;
}

/* ========================================
   HORÁRIOS OCUPADOS
   ======================================== */

/* Container dos horários ocupados */
.horarios-ocupados {
    background: #F3E5F5;
    border: 1px solid #CE93D8;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.horarios-ocupados .texto {
    color: #7B1FA2;
    font-weight: 600;
    margin-right: 10px;
}

/* Badges dos horários ocupados */
.horario-ocupado-badge {
    background: #E1BEE7;
    color: #6A1B9A;
    border: 1px solid #CE93D8;
    border-radius: 6px;
    padding: 6px 12px;
    margin: 2px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

/* ========================================
   FIELDSET CONTAINERS
   ======================================== */

/* Containers com títulos */
.fieldset-container {
    width: 100%;
    margin-bottom: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e6ed;
    padding: 20px;
}

.fieldset-container legend {
    font-weight: 600;
    color: #495057;
    font-size: 16px;
    padding: 0 10px;
    margin-bottom: 15px;
}

/* ========================================
   BOTÕES DE AÇÃO
   ======================================== */

/* Botão de agendar */
.btn-agendar {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-agendar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-agendar:active {
    transform: translateY(0);
}

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

/* Tablets */
@media (max-width: 768px) {
    .calendario-agendamento .linha:not(:first-child):not(:nth-child(2)) .coluna,
    .grid-dinamico .linha:not(:first-child):not(:nth-child(2)) .coluna {
        min-height: 50px !important;
    }
    
    .calendario-dia-container .campo-display {
        font-size: 14px !important;
    }
    
    .toggle-box.sincronizacao .toggle-box-elem {
        min-width: 150px;
        padding: 15px;
    }
    
    .toggle-box.sincronizacao svg {
        width: 24px;
        height: 24px;
    }
    
    .container-agendamento {
        padding: 15px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .calendario-agendamento,
    .grid-dinamico {
        margin: 10px 0 !important;
    }
    
    .calendario-agendamento .linha:first-child .coluna,
    .grid-dinamico .linha:first-child .coluna {
        font-size: 16px !important;
    }
    
    .toggle-box.sincronizacao {
        flex-direction: column;
        align-items: center;
    }
    
    .toggle-box.sincronizacao .toggle-box-elem {
        min-width: 200px;
    }
    
    .toggle-box:not(.sincronizacao) {
        gap: 4px;
    }
    
    .toggle-box:not(.sincronizacao) .toggle-box-elem {
        margin: 4px;
        padding: 10px 12px;
        min-width: 70px;
        font-size: 12px;
    }
    
    .container-agendamento {
        padding: 10px;
        margin-bottom: 15px;
    }
}

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

/* Animação para o dia atual */
@keyframes pulseToday {
    0% { 
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4); 
    }
    50% { 
        box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6); 
    }
    100% { 
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4); 
    }
}

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

.container-agendamento {
    animation: fadeInUp 0.5s ease-out;
}

/* Animação de hover para elementos interativos */
.interactive-element {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-element:hover {
    transform: translateY(-2px);
}

/* ========================================
   ESTADOS ESPECIAIS
   ======================================== */


/* Elemento carregando */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0078d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   UTILITÁRIOS
   ======================================== */

/* Sombras */
.shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.shadow-md { box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 25px rgba(0,0,0,0.15); }

/* Bordas arredondadas */
.rounded-sm { border-radius: 4px; }
.rounded-md { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }

/* Transições */
.transition-all { transition: all 0.3s ease; }
.transition-fast { transition: all 0.15s ease; }
.transition-slow { transition: all 0.5s ease; }

/* Cores de destaque */
.text-primary { color: #0078d4; }
.text-success { color: #28a745; }
.text-warning { color: #ffc107; }
.text-danger { color: #dc3545; }
.text-muted { color: #6c757d; }

.bg-primary { background-color: #0078d4; }
.bg-success { background-color: #28a745; }
.bg-warning { background-color: #ffc107; }
.bg-danger { background-color: #dc3545; }
.bg-light { background-color: #f8f9fa; }