/* ================================
   MODERN MODAL DESIGN SYSTEM
   ================================ */

/* Modal Overlay */
.modal-modern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Content Container */
.modal-content-modern {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlideUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.modal-header-modern {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 2rem;
    border-bottom: 1px solid #E5E7EB;
    background: linear-gradient(to bottom, #F9FAFB, white);
    gap: 1.5rem;
}

.modal-title-section {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.modal-icon-circle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

.modal-icon-circle i {
    color: white;
    font-size: 1.25rem;
}

.modal-title-section h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.modal-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: #6B7280;
    line-height: 1.4;
}

/* Large Close Button */
.btn-close-modern {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: none;
    border-radius: 10px;
    background: #F3F4F6;
    color: #6B7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-close-modern:hover {
    background: #EF4444;
    color: white;
    transform: scale(1.05);
}

.btn-close-modern:active {
    transform: scale(0.95);
}

/* Modal Body */
.modal-body-modern {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Info Card */
.info-card-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 1px solid #BAE6FD;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.info-icon-modern {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-icon-modern i {
    color: #0284C7;
    font-size: 1.25rem;
}

.info-content-modern {
    flex: 1;
    min-width: 0;
}

.info-label-modern {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0369A1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.info-value-modern {
    font-size: 1rem;
    font-weight: 600;
    color: #0C4A6E;
    word-break: break-word;
}

/* Form Section */
.form-section-modern {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group-modern {
    display: flex;
    flex-direction: column;
}

.form-label-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-label-modern i {
    color: #3B82F6;
    font-size: 0.875rem;
}

.form-description-modern {
    font-size: 0.8125rem;
    color: #6B7280;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.form-select-modern,
.form-input-modern {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #111827;
    background: white;
    transition: all 0.2s ease;
}

.form-select-modern:hover,
.form-input-modern:hover {
    border-color: #D1D5DB;
}

.form-select-modern:focus,
.form-input-modern:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Modal Footer */
.modal-footer-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
    gap: 1rem;
}

.modal-actions-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Button Styles */
.btn-remove-modern {
    padding: 0.625rem 1.25rem;
    border: 2px solid #FEE2E2;
    border-radius: 8px;
    background: white;
    color: #DC2626;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-remove-modern:hover {
    background: #FEE2E2;
    border-color: #FCA5A5;
    transform: translateY(-1px);
}

.btn-remove-modern:active {
    transform: translateY(0);
}

.btn-cancel-modern {
    padding: 0.625rem 1.5rem;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-modern:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.btn-cancel-modern:active {
    transform: scale(0.98);
}

.btn-save-modern {
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-save-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-save-modern:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 640px) {
    .modal-modern {
        padding: 1rem;
    }
    
    .modal-content-modern {
        border-radius: 12px;
        max-height: 95vh;
    }
    
    .modal-header-modern {
        padding: 1.5rem;
    }
    
    .modal-icon-circle {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .modal-icon-circle i {
        font-size: 1rem;
    }
    
    .modal-title-section h2 {
        font-size: 1.25rem;
    }
    
    .modal-subtitle {
        font-size: 0.8125rem;
    }
    
    .btn-close-modern {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 1rem;
    }
    
    .modal-body-modern {
        padding: 1.5rem;
    }
    
    .modal-footer-modern {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem 1.5rem;
    }
    
    .modal-actions-right {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-remove-modern,
    .btn-cancel-modern,
    .btn-save-modern {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .modal-modern {
        display: none !important;
    }
}
