/* jQuery UI Datepicker estilo Bootstrap 5 */

.ui-datepicker {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    width: 280px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /*box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);*/
}

.ui-datepicker .ui-datepicker-header {
    background: none;
    border: none;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.ui-datepicker .ui-datepicker-title {
    margin: 0;
    text-align: center;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    cursor: pointer;
    position: absolute;
    top: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    color: #0d6efd;
    text-decoration: none;
    border: none;
    border-radius: 0.25rem;
}

.ui-datepicker .ui-datepicker-prev {
    left: 0.5rem;
}

.ui-datepicker .ui-datepicker-next {
    right: 0.5rem;
}

.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background-color: #f8f9fa;
    border: none;
}

.ui-datepicker th {
    font-weight: 500;
    color: #212529;
    text-align: center;
    padding: 0.25rem;
    font-size: 0.875rem;
}

.ui-datepicker td {
    padding: 1px;
}

.ui-datepicker td span,
.ui-datepicker td a {
    display: block;
    padding: 0.375rem;
    text-align: center;
    text-decoration: none;
    border-radius: 0.25rem;
    color: #212529;
    border: none;
    background: none;
    font-size: 0.875rem;
}

.ui-datepicker td a:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.ui-datepicker td a.ui-state-active {
    background-color: #0d6efd;
    color: #fff;
}

.ui-datepicker td a.ui-state-highlight {
    background-color: #e9ecef;
    color: #212529;
}

.ui-datepicker .ui-datepicker-buttonpane {
    border-top: 1px solid #dee2e6;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    background: none;
}

.ui-datepicker .ui-datepicker-buttonpane button {
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    color: #fff;
    border-radius: 0.375rem;
    font-weight: 400;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    cursor: pointer;
    margin: 0.25rem;
}

.ui-datepicker .ui-datepicker-buttonpane button:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
    background-color: #6c757d;
    border-color: #6c757d;
}

.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current:hover {
    background-color: #5c636a;
    border-color: #565e64;
}

/* Estados de foco */
.ui-datepicker td a:focus,
.ui-datepicker .ui-datepicker-prev:focus,
.ui-datepicker .ui-datepicker-next:focus,
.ui-datepicker .ui-datepicker-buttonpane button:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Versão para tema escuro (opcional) */
.dark-theme .ui-datepicker {
    background-color: #212529;
    border-color: #495057;
}

.dark-theme .ui-datepicker .ui-datepicker-title {
    color: #fff;
}

.dark-theme .ui-datepicker th {
    color: #e9ecef;
}

.dark-theme .ui-datepicker td span,
.dark-theme .ui-datepicker td a {
    color: #e9ecef;
}

.dark-theme .ui-datepicker td a:hover {
    background-color: #343a40;
}

.dark-theme .ui-datepicker td a.ui-state-highlight {
    background-color: #495057;
    color: #fff;
}

/* Para dispositivos móveis */
@media (max-width: 576px) {
    .ui-datepicker {
        width: 100%;
        max-width: 280px;
    }
}