/* Modal Bootstrap Fix para Calendário */

/* Garantir que modais funcionem corretamente */
.modal {
    display: none !important;
}

.modal.show {
    display: block !important;
}

.modal.fade {
    transition: opacity 0.15s linear;
}

.modal.fade:not(.show) {
    opacity: 0;
}

.modal.fade.show {
    opacity: 1;
}

/* Override de z-index para garantir que modal apareça */
.modal {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

/* Tema escuro para modal - FORÇAR CORES */
.modal-content {
    background-color: #2d2d30 !important;
    border: 1px solid #3c3c3c !important;
    color: #ffffff !important;
}

.modal-header {
    background-color: #1a1a1a !important;
    border-bottom: 1px solid #3c3c3c !important;
    color: #ffffff !important;
}

.modal-title {
    color: #ffffff !important;
    font-weight: bold !important;
}

.modal-body {
    background-color: #2d2d30 !important;
    color: #ffffff !important;
}

.modal-body .info-row {
    color: #ffffff !important;
    margin-bottom: 0.75rem !important;
}

.modal-body .info-row span {
    color: #ffffff !important;
}

.modal-body .info-row i {
    color: #ff6b35 !important;
}

.modal-footer {
    background-color: #2d2d30 !important;
    border-top: 1px solid #3c3c3c !important;
}

/* Fix para btn-close do Bootstrap 5 */
.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: #ffffff !important;
    /*background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='m.235 1.175 4.941 4.94 4.94-4.94a.7.7 0 1 1 .99.99L6.16 6.11l4.94 4.94a.7.7 0 1 1-.99.99L5.17 7.1.235 12.04a.7.7 0 1 1-.99-.99L4.18 6.11-.764 1.175a.7.7 0 0 1 .99-.99Z'/%3e%3c/svg%3e") center/1em auto no-repeat;*/
    border: 0;
    border-radius: 0.25rem;
    opacity: 0.8;
}

.btn-close:hover {
    color: #ffffff !important;
    text-decoration: none;
    opacity: 1;
    background-color: #ff6b35 !important;
}

.btn-close:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
    opacity: 1;
}

/* Garantir que backdrop tenha cor correta */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

/* Fix para eventos clicáveis */
[data-bs-toggle="modal"] {
    cursor: pointer !important;
}

[data-bs-toggle="modal"]:hover {
    opacity: 0.9 !important;
}

/* Responsividade melhorada */
@media (max-width: 576px) {
    .modal-dialog {
        max-width: none;
        margin: 0.5rem;
    }
}

/* Animações suaves */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}
