/* archive-modals.css - Modal styles for Archive Management System */

/* Base Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
}

.modal-content {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    margin: 3% auto;
    padding: 0;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.35);
    width: 94%;
    max-width: 1000px;
    max-height: 95vh;
    overflow: hidden;
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
}

.close {
    color: rgba(255,255,255,0.8);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: white;
    transform: scale(1.1) rotate(90deg);
}

.modal-body {
    padding: 20px 30px;
    max-height: calc(95vh - 200px);
    overflow-y: auto;
    flex: 1;
    min-height: 300px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-radius: 0 0 20px 20px;
    flex-shrink: 0;
    height: 80px;
    border-top: 2px solid rgba(226, 232, 240, 0.5);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    margin-top: auto;
}

/* Form Styles for Edit Modal */
.form-section {
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.form-section.basic-info {
    border-left-color: #4299e1;
    background: linear-gradient(135deg, rgba(235, 248, 255, 0.8) 0%, rgba(191, 219, 254, 0.6) 100%);
}

.form-section.classification {
    border-left-color: #ed8936;
    background: linear-gradient(135deg, rgba(255, 250, 240, 0.8) 0%, rgba(254, 215, 170, 0.6) 100%);
}

.form-section.search-clone {
    border-left-color: #48bb78;
    background: linear-gradient(135deg, rgba(240, 255, 244, 0.8) 0%, rgba(187, 247, 208, 0.6) 100%);
}

.form-section.group-tax {
    border-left-color: #9f7aea;
    background: linear-gradient(135deg, rgba(250, 245, 255, 0.8) 0%, rgba(196, 181, 253, 0.6) 100%);
}

.form-section.date-system {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.8) 0%, rgba(219, 234, 254, 0.6) 100%);
}

.form-section h4 {
    margin: 0 0 15px 0;
    font-size: 1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row.full-width {
    grid-template-columns: 1fr;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-group.required label::after {
    content: " *";
    color: #f56565;
    font-weight: bold;
}

.read-only {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    color: #4a5568;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

/* Clear Archive Modal Specific */
.modal-content.clear-archive-modal {
    max-width: 700px;
}

#dateCheckboxList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e2e8f0;
}

#dateCheckboxList label {
    cursor: pointer;
    font-size: 0.85rem;
}

#dateCheckboxList input[type="checkbox"] {
    margin-right: 6px;
}

/* Test Data Generator Modal */
.test-data-option {
    border: 2px solid;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.test-data-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.test-data-option.small {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.9) 0%, rgba(209, 250, 229, 0.7) 100%);
}

.test-data-option.large {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.9) 0%, rgba(191, 219, 254, 0.7) 100%);
}

.test-data-option.clear {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.9) 0%, rgba(254, 226, 226, 0.7) 100%);
}

.test-data-option.refresh {
    border-color: #7c3aed;
    background: linear-gradient(135deg, rgba(250, 245, 255, 0.9) 0%, rgba(233, 213, 255, 0.7) 100%);
}

/* Progress Bar for Test Data Generation */
#largeDataProgress {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
}

#progressBar {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    height: 20px;
    border-radius: 10px;
    transition: width 0.3s;
}

/* Search Results in Edit Modal */
#searchResults {
    border: 1px solid rgba(56, 178, 172, 0.3);
    border-radius: 8px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.9) 0%, rgba(204, 251, 241, 0.7) 100%);
    min-height: 100px;
    max-height: 250px;
    overflow-x: auto;
    overflow-y: auto;
    font-size: 0.85rem;
}

#searchResults table {
    width: 100%;
    font-size: 0.9em;
}

#searchResults th {
    background: #f1f5f9;
    padding: 8px;
    text-align: left;
}

#searchResults td {
    padding: 8px;
    border-bottom: 1px solid #e2e8f0;
}

/* Warning and Info Boxes in Modals */
.modal-warning {
    background: linear-gradient(135deg, rgba(254, 249, 195, 0.5) 0%, rgba(254, 215, 170, 0.5) 100%);
    border-left: 4px solid #f59e0b;
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 16px;
}

.modal-danger {
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.9) 0%, rgba(254, 226, 226, 0.7) 100%);
    border-left: 4px solid #dc2626;
    padding: 20px;
    border-radius: 8px;
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .modal-content {
        width: 98%;
        margin: 2% auto;
        max-height: 98vh;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 16px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    #dateCheckboxList {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
