/* Modal System Styles - Reusable */
.modal-message {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.modal-message-content {
    position: relative;
    background-color: #fff;
    margin: 15% auto;
    padding: 0;
    width: 400px;
    max-width: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
}

.modal-message-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
}

.modal-message-header i {
    font-size: 24px;
    margin-right: 10px;
}

.modal-message-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-message-body {
    padding: 20px;
    font-size: 14px;
    line-height: 1.5;
    max-height: 300px;
    overflow-y: auto;
}

.modal-message-footer {
    padding: 15px 20px;
    border-top: 1px solid #e5e5e5;
    text-align: right;
}

.modal-message-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 10px;
}

.modal-message-btn:hover {
    opacity: 0.9;
}

/* Modal Types */
.modal-success .modal-message-header {
    background-color: #d4edda;
    color: #155724;
}
.modal-success .modal-message-btn {
    background-color: #28a745;
    color: white;
}

.modal-error .modal-message-header {
    background-color: #f8d7da;
    color: #721c24;
}
.modal-error .modal-message-btn {
    background-color: #dc3545;
    color: white;
}

.modal-warning .modal-message-header {
    background-color: #fff3cd;
    color: #856404;
}
.modal-warning .modal-message-btn {
    background-color: #ffc107;
    color: #212529;
}

.modal-info .modal-message-header {
    background-color: #d1ecf1;
    color: #0c5460;
}
.modal-info .modal-message-btn {
    background-color: #17a2b8;
    color: white;
}

.modal-confirm .modal-message-header {
    background-color: #e2e3e5;
    color: #383d41;
}
.modal-confirm .modal-message-btn-primary {
    background-color: #007bff;
    color: white;
}
.modal-confirm .modal-message-btn-secondary {
    background-color: #6c757d;
    color: white;
}

/* Loader Styles */
.ajax-loader {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.ajax-loader-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.ajax-loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.ajax-loader-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.modal-loader {
    display: none;
    position: absolute;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
}

.modal-loader-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.modal-loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

/* Utility */
.btn:disabled,
.btn.disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}