/* Namespaced Form CSS to prevent WordPress Theme conflicts */
.nx-form-container {
    max-width: 1000px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    font-family: 'Inter', sans-serif;
    color: #343a40;
    line-height: 1.6;
}

.nx-form-header {
    background: #005a90;
    color: white;
    padding: 30px 40px;
    text-align: center;
    border-radius: 8px 8px 0 0;
}
.nx-form-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; color:#fff;}
.nx-form-header p { font-size: 14px; opacity: 0.9; margin:0;}

.nx-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
}
.nx-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    color: #6c757d;
    transition: color 0.3s;
}
.nx-step.active { color: #005a90; }
.nx-step.completed { color: #28a745; }

.nx-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 8px;
    transition: background 0.3s, color 0.3s;
}
.nx-step.active .nx-step-circle { background: #005a90; color: #fff; box-shadow: 0 0 0 4px rgba(0, 90, 144, 0.2); }
.nx-step.completed .nx-step-circle { background: #28a745; color: #fff; }
.nx-step-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;}
.nx-step-line { flex-grow: 1; height: 2px; background: #e9ecef; margin: -25px 15px 0 15px; z-index: 1; }

form#nxApplicationForm { padding: 40px; }
.nx-form-step { display: none; }
.nx-form-step.active { display: block; animation: nxFadeIn 0.4s ease; }
@keyframes nxFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.nx-section-title { font-size: 20px; color: #005a90; margin-bottom: 25px; border-bottom: 2px solid #dee2e6; padding-bottom: 10px; }
.nx-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.nx-full-width { grid-column: 1 / -1; }
.nx-mt-4 { margin-top: 30px; }

.nx-form-group { margin-bottom: 20px; }
.nx-form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 14px; color: #495057; }
.nx-form-group label span { color: #dc3545; }

.nx-form-group input[type="text"], .nx-form-group input[type="email"], .nx-form-group input[type="number"], .nx-form-group input[type="tel"], .nx-form-group input[type="date"], .nx-form-group select, .nx-form-group input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    background: #fdfdfd;
}
.nx-form-group input:focus, .nx-form-group select:focus { border-color: #005a90; outline: none; box-shadow: 0 0 0 3px rgba(0, 90, 144, 0.1); background: #fff; }

.nx-checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; }
.nx-checkbox-container { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; background: #f8f9fa; padding: 10px; border-radius: 6px; border: 1px solid #dee2e6; }
.nx-checkbox-container:hover { border-color: #005a90; }

.nx-error-msg { display: none; color: #dc3545; font-size: 12px; margin-top: 5px; }
.nx-form-group.nx-has-error input, .nx-form-group.nx-has-error select, td.nx-has-error input, td.nx-has-error select { border-color: #dc3545 !important; background: #fff8f8 !important; }
.nx-form-group.nx-has-error .nx-error-msg { display: block; }
small { font-size: 12px; color: #6c757d; display: block; margin-top: 4px; }

.nx-dynamic-section h4 { font-size: 16px; margin-bottom: 15px; color: #343a40; }
.nx-dynamic-section h4 span { color: #dc3545; }
.nx-table-responsive { overflow-x: auto; margin-bottom: 15px; border-radius: 6px; border: 1px solid #dee2e6; }
.nx-dynamic-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.nx-dynamic-table th, .nx-dynamic-table td { padding: 12px; text-align: left; border-bottom: 1px solid #dee2e6; }
.nx-dynamic-table th { background-color: #f1f3f5; font-size: 13px; font-weight: 600; color: #495057; }
.nx-dynamic-table td input, .nx-dynamic-table td select { padding: 8px; width:100%; box-sizing:border-box; border:1px solid #ccc; border-radius:4px;}
.nx-delete-cell { width: 50px; text-align: center !important; }

.nx-form-actions { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid #dee2e6; }
.nx-btn { padding: 12px 24px; border: none; border-radius: 6px; font-weight: 600; font-size: 15px; cursor: pointer; transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.nx-btn-primary { background: #005a90; color: white; }
.nx-btn-primary:hover { background: #004570; transform: translateY(-1px); }
.nx-btn-secondary { background: #e9ecef; color: #495057; }
.nx-btn-secondary:hover { background: #dde2e6; }
.nx-btn-success { background: #28a745; color: white; }
.nx-btn-success:hover { background: #218838; transform: translateY(-1px); }
.nx-btn-outline { background: transparent; border: 1px dashed #005a90; color: #005a90; }
.nx-btn-outline:hover { background: rgba(0,90,144,0.05); }
.nx-btn-sm { padding: 8px 16px; font-size: 13px; margin-bottom: 20px;}
.nx-icon-btn { background: transparent; border: none; color: #dc3545; cursor: pointer; font-size: 16px; padding: 4px; opacity: 0.7; }
.nx-icon-btn:hover { opacity: 1; }

@media (max-width: 768px) {
    .nx-grid-2 { grid-template-columns: 1fr; gap: 15px; }
    .nx-checkbox-grid { grid-template-columns: 1fr; }
    .nx-stepper { padding: 20px; }
    .nx-step-title { display: none; }
}

/* SUCCESS LIGHTBOX */
.nx-lightbox-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 99999; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.nx-lightbox-content { background: #fff; padding: 40px; border-radius: 12px; max-width: 500px; text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.2); animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.nx-check-circle { width: 80px; height: 80px; margin: 0 auto 20px; }
.nx-checkmark { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 6px rgba(40,167,69,0.3)); }
.nx-checkmark-circle { stroke: #28a745; stroke-width: 4; stroke-dasharray: 166; stroke-dashoffset: 166; fill: #28a745; animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards; }
.nx-checkmark-check { transform-origin: 50% 50%; stroke-dasharray: 48; stroke-dashoffset: 48; stroke: #fff; stroke-width: 5; animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards; }
.nx-lightbox-content h2 { color: #28a745; font-size: 26px; margin-bottom: 10px; font-weight: 700; }
.nx-lightbox-content p { color: #555; font-size: 15px; margin-bottom: 0; }
.nx-lightbox-actions { display: flex; gap: 15px; justify-content: center; }

@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.8); } 100% { opacity: 1; transform: scale(1); } }
