/* Estilos para DatePickerRange - Melhorias de UX */

/* CORREÇÃO PRINCIPAL: Reexibir os botões nativos de navegação */
.DayPickerNavigation_button__default,
.DayPickerNavigation_button__horizontal {
    position: absolute;
    top: 18px;
    width: 32px !important;
    height: 32px !important;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    z-index: 2;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.DayPickerNavigation_button__default:hover,
.DayPickerNavigation_button__horizontal:hover {
    background: rgba(13, 110, 253, 0.1);
    border-color: var(--bs-primary, #0d6efd);
}

/* Posicionamento dos botões */
.DayPickerNavigation_leftButton__horizontal {
    left: 12px !important;
}

.DayPickerNavigation_rightButton__horizontal {
    right: 12px !important;
}

/* Estilizar os SVGs das setas */
.DayPickerNavigation_svg__horizontal {
    fill: var(--bs-gray-700, #495057) !important;
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}

.DayPickerNavigation_button__default:hover .DayPickerNavigation_svg__horizontal,
.DayPickerNavigation_button__horizontal:hover .DayPickerNavigation_svg__horizontal {
    fill: var(--bs-primary, #0d6efd) !important;
}

/* Fallback: Se os SVGs não aparecerem, adicionar pseudo-elementos */
.DayPickerNavigation_leftButton__horizontal::after {
    content: "‹";
    font-size: 24px;
    color: var(--bs-gray-700, #495057);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.DayPickerNavigation_rightButton__horizontal::after {
    content: "›";
    font-size: 24px;
    color: var(--bs-gray-700, #495057);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.DayPickerNavigation_button__default:hover::after,
.DayPickerNavigation_button__horizontal:hover::after {
    color: var(--bs-primary, #0d6efd);
}

/* Garantir que os botões sejam sempre clicáveis */
.DayPickerNavigation {
    position: relative;
    z-index: 1;
}

/* Garantir que os botões de navegação fiquem visíveis (classe alternativa) */
.DaysPickerNavigation_button__horizontalDefault {
    border: none;
    background: transparent;
    font-size: 20px;
    color: var(--bs-gray-700, #495057);
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s ease;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.DaysPickerNavigation_button__horizontalDefault:hover {
    color: var(--bs-primary, #0d6efd);
}

/* Melhorar visibilidade do calendário */
.DateRangePickerInput {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background: white;
}

.DateRangePickerInput__withBorder {
    border-radius: 0.375rem;
}

.DateInput_input {
    font-size: 14px;
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
}

.DateInput_input__focused {
    border-bottom: 2px solid var(--bs-primary, #0d6efd);
}

/* Estilo para o popup do calendário */
.DateRangePicker_picker {
    z-index: 1050 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}

/* Melhorar aparência dos dias selecionados */
.CalendarDay__selected,
.CalendarDay__selected:active,
.CalendarDay__selected:hover {
    background: var(--bs-primary, #0d6efd);
    border: 1px solid var(--bs-primary, #0d6efd);
    color: white;
}

.CalendarDay__selected_span {
    background: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.2);
    color: var(--bs-dark);
}

.CalendarDay__hovered_span,
.CalendarDay__hovered_span:hover {
    background: rgba(13, 110, 253, 0.05);
    border: 1px solid rgba(13, 110, 253, 0.1);
    color: var(--bs-dark);
}

/* Botão de limpar datas */
.DateRangePickerInput_clearDates {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--bs-secondary, #6c757d);
    font-size: 18px;
    line-height: 1;
}

.DateRangePickerInput_clearDates:hover {
    color: var(--bs-danger, #dc3545);
}

/* Garantir que o portal funcione corretamente */
.DateRangePicker {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Melhorar layout de dois meses */
.DayPicker_transitionContainer {
    min-height: 354px;
}

.DayPicker_weekHeaders {
    font-weight: 600;
    color: var(--bs-gray-700);
}

/* Estilo para dias desabilitados */
.CalendarDay__blocked_out_of_range,
.CalendarDay__blocked_out_of_range:active,
.CalendarDay__blocked_out_of_range:hover {
    background: #f8f9fa;
    color: #dee2e6;
    cursor: not-allowed;
}

/* Melhorar responsividade em telas pequenas */
@media (max-width: 768px) {
    .DateRangePicker_picker {
        left: 0 !important;
        right: 0 !important;
        margin: 0 10px;
        width: calc(100% - 20px) !important;
    }
    
    .DayPicker_transitionContainer {
        width: 100% !important;
    }
}

/* Ajuste para o tema Anthropic */
.DateRangePickerInput {
    background-color: var(--section-bg, #fbfaf8);
    border-color: var(--border-main, #e5e4e0);
}

.DateRangePicker_picker {
    background-color: var(--section-bg, #fbfaf8);
}

.CalendarDay__default {
    color: var(--text-primary, #1f1e1b);
}

.CalendarDay__default:hover {
    background: var(--hover-bg, #f7f6f3);
}