/* Contact Modal Styles - Modal popups and form styling */

/* Modal Overlay */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 20, 25, 0.8);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

/* Modal Content */
.modal-content {
    position: relative;
    background: white;
    margin: 40px auto;
    padding: 0;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

/* Modal Header */
.modal-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Close Button */
.close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Modal Body */
.modal-body {
    padding: 0;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    scroll-behavior: smooth;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Form Sections */
.form-section {
    padding: 20px 24px;
    border-bottom: 1px solid #e1e4e8;
}

.form-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    font-size: 14px;
}

/* Section Color Themes */
.section-basic {
    background: #f0f9ff;
    border-left: 4px solid #0284c7;
}

.section-basic .section-title {
    color: #075985;
}

.section-classification {
    background: #fef3f2;
    border-left: 4px solid #dc2626;
}

.section-classification .section-title {
    color: #991b1b;
}

.section-account {
    background: #fefce8;
    border-left: 4px solid #ca8a04;
}

.section-account .section-title {
    color: #854d0e;
}

.section-notes {
    background: #faf5ff;
    border-left: 4px solid #9333ea;
}

.section-notes .section-title {
    color: #6b21a8;
}

.section-system {
    background: #f1f5f9;
    border-left: 4px solid #475569;
}

.section-system .section-title {
    color: #1e293b;
}

/* Form Groups */
.form-group {
    margin-bottom: 16px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1e293b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s ease;
    background: white;
    color: #0f172a;
    font-weight: 500;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: #f7f9fc;
    cursor: not-allowed;
    opacity: 1;
    color: #0f172a;
    font-weight: 500;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Organization Input Wrapper */
.org-input-wrapper {
    position: relative;
}

.org-custom-input {
    display: none;
    margin-top: 8px;
}

.org-custom-input.show {
    display: block;
}

/* Auto-populated Indicator */
.auto-populated-indicator {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #10b981;
    font-size: 12px;
    display: none;
}

.auto-populated-indicator.show {
    display: block;
}

/* Modal Footer */
.modal-footer {
    padding: 16px 24px;
    background: #f7f9fc;
    border-top: 1px solid #e1e4e8;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* File Upload */
input[type="file"] {
    display: none;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    color: #1e3c72;
    border: 1px solid #1e3c72;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.file-upload-label:hover {
    background: #1e3c72;
    color: white;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-content {
    background: white;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}

.loading-content i {
    font-size: 32px;
    color: #1e3c72;
    animation: spin 1s linear infinite;
}

.loading-content p {
    margin-top: 12px;
    color: #64748b;
    font-size: 14px;
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
