/* =============================================
   Contact Modal — Nelc Digital
   Premium dark-mode overlay form
   ============================================= */

/* Overlay */
#contact-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: overlayFadeIn 0.25s ease-out;
}

#contact-modal-overlay.open {
    display: flex;
}

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

/* Modal Panel */
#contact-modal-panel {
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 48px 48px 40px;
    position: relative;
    animation: modalSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);

    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

#contact-modal-panel::-webkit-scrollbar { width: 4px; }
#contact-modal-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

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

/* Close button */
#modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

#modal-close-btn:hover {
    background: rgba(255,255,255,0.14);
}

/* Modal header */
.modal-header {
    text-align: center;
    margin-bottom: 36px;
}

.modal-header h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 40px);
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.modal-header h2 span {
    background: linear-gradient(90deg, #00FFAA 0%, #FF6B35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-header p {
    font-size: 16px;
    color: #a0a0a0;
    font-weight: 400;
}

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

.modal-form-grid .full-width {
    grid-column: 1 / -1;
}

/* Form group */
.modal-form-group {
    display: flex;
    flex-direction: column;
}

/* Input / Select / Textarea shared */
.modal-input,
.modal-select,
.modal-textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 14px;
    padding: 14px 16px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.modal-input::placeholder,
.modal-textarea::placeholder {
    color: #606060;
}

.modal-input:focus,
.modal-select:focus,
.modal-textarea:focus {
    border-color: #3ED5B0;
    background: rgba(62, 213, 176, 0.04);
}

/* Select arrow */
.modal-select-wrapper {
    position: relative;
}

.modal-select-wrapper::after {
    content: '›';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    color: #666;
    font-size: 18px;
    pointer-events: none;
}

.modal-select {
    cursor: pointer;
    padding-right: 36px;
}

.modal-select option {
    background: #1a1a1a;
    color: #ffffff;
}

/* Placeholder state for selects */
.modal-select.placeholder {
    color: #606060;
}

/* Textarea */
.modal-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* Required asterisk styling */
.req {
    color: #3ED5B0;
    margin-left: 2px;
}

/* Submit button */
.modal-submit-btn {
    display: block;
    width: 100%;
    margin-top: 28px;
    padding: 16px;
    background: linear-gradient(90deg, #00FFAA 0%, #FF6B35 100%);
    border: none;
    border-radius: 8px;
    color: #000000;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.modal-submit-btn:active {
    transform: translateY(0);
    opacity: 1;
}

/* Success message */
.modal-success {
    text-align: center;
    padding: 40px 0;
    display: none;
}

.modal-success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal-success h3 {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 8px;
}

.modal-success p {
    color: #a0a0a0;
    font-size: 15px;
}

/* Mobile */
@media (max-width: 640px) {
    #contact-modal-panel {
        padding: 32px 24px 28px;
    }

    .modal-form-grid {
        grid-template-columns: 1fr;
    }

    .modal-form-grid .full-width {
        grid-column: 1;
    }
}
