/* ==========================================
   MODAL STYLES FOR BOOTSTRAP 4
   ========================================== */

/* Modal Backdrop */
.modal-backdrop {
    z-index: 9998 !important;
}

/* Modal Dialog */
.modal {
    z-index: 9999 !important;
}

.modal-dialog {
    max-width: 1140px;
}

/* Modal Header */
.modal-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    color: white;
    border-bottom: none;
    padding: 20px 30px;
    border-radius: 10px 10px 0 0;
}

.modal-header .modal-title {
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.modal-header .close {
    color: white;
    opacity: 1;
    font-size: 32px;
    font-weight: 300;
    text-shadow: none;
    padding: 0;
    margin: 0;
    line-height: 1;
    transition: all 0.3s ease;
}

.modal-header .close:hover {
    color: white;
    opacity: 0.8;
    transform: rotate(90deg);
}

.modal-header .close span {
    font-weight: 300;
}

/* Modal Body */
.modal-body {
    padding: 30px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #1a1a1a;
}

/* Modal Footer */
.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 15px 30px;
}

.modal-footer .btn {
    min-width: 100px;
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 5px;
}

.modal-footer .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
}

.modal-footer .btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

/* Modal Content */
.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 991px) {
    .modal-dialog {
        max-width: 90%;
        margin: 30px auto;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header .modal-title {
        font-size: 20px;
    }

    .modal-body {
        padding: 20px;
        max-height: calc(100vh - 200px);
    }

    .modal-footer {
        padding: 12px 20px;
    }
}

@media (max-width: 767px) {
    .modal-dialog {
        max-width: 95%;
        margin: 20px auto;
    }

    .modal-header {
        padding: 12px 15px;
    }

    .modal-header .modal-title {
        font-size: 18px;
    }

    .modal-header .close {
        font-size: 28px;
    }

    .modal-body {
        padding: 15px;
        max-height: calc(100vh - 180px);
    }

    .modal-footer {
        padding: 10px 15px;
    }

    .modal-footer .btn {
        min-width: 80px;
        padding: 8px 15px;
        font-size: 14px;
    }
}

/* Modal Animation */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* Prevent body scroll when modal open */
body.modal-open {
    overflow: hidden;
}
