/* ═══════════════════════════════════════════════════════════
   JAPS SUBMIT — Popup form · matches brand palette
   Navy #0d1e3d · Gold #f0a500 · Green #2e8b57
═══════════════════════════════════════════════════════════ */

/* ── TRIGGER BUTTON ─────────────────────────────────────── */
.japs-submit-trigger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #f0a500;
    color: #0d1e3d;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 15px 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: all 0.25s;
    box-shadow: 0 4px 20px rgba(240,165,0,0.30);
}
.japs-submit-trigger:hover {
    background: #d99200;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(240,165,0,0.45);
}

/* ── OVERLAY ─────────────────────────────────────────────── */
.japs-submit-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 12, 26, 0.88);
    z-index: 999998;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.japs-submit-overlay.open {
    display: flex;
}

/* ── MODAL ───────────────────────────────────────────────── */
.japs-submit-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 32px 80px rgba(0,0,0,0.45);
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

/* ── MODAL HEADER ────────────────────────────────────────── */
.japs-submit-head {
    background: #0d1e3d;
    padding: 28px 32px 24px;
    border-radius: 14px 14px 0 0;
    position: sticky;
    top: 0;
    z-index: 2;
}
.japs-submit-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(240,165,0,0.15);
    border: 1px solid rgba(240,165,0,0.35);
    color: #f0a500;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 40px;
    margin-bottom: 12px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
.japs-submit-head h2 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.2;
    padding-right: 36px;
}
.japs-submit-head p {
    font-size: 13px;
    color: rgba(255,255,255,0.62);
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
}
.japs-submit-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.10);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.japs-submit-close:hover { background: rgba(240,165,0,0.75); }

/* ── FORM BODY ───────────────────────────────────────────── */
.japs-submit-body {
    padding: 28px 32px 32px;
}

/* Section divider label */
.japs-form-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #2e8b57;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.japs-form-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8ecf2;
}

/* Grid rows */
.japs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.japs-form-row.cols-1 { grid-template-columns: 1fr; }
.japs-form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Field */
.japs-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.japs-form-field label {
    font-size: 11px;
    font-weight: 700;
    color: #0d1e3d;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
.japs-form-field label .japs-req {
    color: #f0a500;
    margin-left: 2px;
}
.japs-form-field input,
.japs-form-field select,
.japs-form-field textarea {
    padding: 10px 13px;
    border: 2px solid #e2e8f0;
    border-radius: 7px;
    font-size: 13px;
    color: #0d1e3d;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    transition: border 0.2s, box-shadow 0.2s;
    background: #fff;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.japs-form-field input:focus,
.japs-form-field select:focus,
.japs-form-field textarea:focus {
    border-color: #0d1e3d;
    box-shadow: 0 0 0 3px rgba(13,30,61,0.08);
}
.japs-form-field input::placeholder,
.japs-form-field textarea::placeholder { color: #b0bac8; }
.japs-form-field textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}
.japs-form-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230d1e3d' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

/* Image upload zone */
.japs-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: border 0.2s, background 0.2s;
    background: #f8fafc;
    position: relative;
}
.japs-upload-zone:hover,
.japs-upload-zone.drag-over {
    border-color: #f0a500;
    background: #fffbf0;
}
.japs-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    border: none !important;
    padding: 0 !important;
}
.japs-upload-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}
.japs-upload-zone p {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #0d1e3d;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
.japs-upload-zone small {
    font-size: 11px;
    color: #94a3b8;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
.japs-upload-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.japs-upload-thumb {
    position: relative;
    width: 72px;
    height: 56px;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}
.japs-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.japs-upload-thumb button {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: rgba(220,38,38,0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
    padding: 0;
}

/* Terms */
.japs-terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 18px 0 0;
    cursor: pointer;
    transition: border 0.2s;
}
.japs-terms-row:hover { border-color: #0d1e3d; }
.japs-terms-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #0d1e3d;
    margin: 1px 0 0;
    flex-shrink: 0;
    cursor: pointer;
}
.japs-terms-row span {
    font-size: 12px;
    color: #475569;
    line-height: 1.65;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
.japs-terms-row span a {
    color: #2e8b57;
    font-weight: 700;
    text-decoration: none;
}
.japs-terms-row span a:hover { text-decoration: underline; }

/* Submit button */
.japs-submit-btn {
    width: 100%;
    margin-top: 18px;
    padding: 15px;
    background: #0d1e3d;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.japs-submit-btn:hover:not(:disabled) {
    background: #f0a500;
    color: #0d1e3d;
    transform: translateY(-1px);
}
.japs-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.japs-submit-btn .japs-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: japs-spin 0.7s linear infinite;
    display: none;
}
.japs-submit-btn.loading .japs-spinner { display: block; }
.japs-submit-btn.loading .japs-btn-label { opacity: 0.5; }
@keyframes japs-spin { to { transform: rotate(360deg); } }

/* Notice (success / error) */
.japs-form-notice {
    display: none;
    padding: 13px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    margin-top: 14px;
    line-height: 1.5;
}
.japs-form-notice.success {
    display: block;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.japs-form-notice.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Field error */
.japs-field-error {
    font-size: 11px;
    color: #dc2626;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    display: none;
}
.japs-form-field.has-error input,
.japs-form-field.has-error select,
.japs-form-field.has-error textarea {
    border-color: #dc2626;
}
.japs-form-field.has-error .japs-field-error { display: block; }

/* ── SUCCESS STATE ────────────────────────────────────────── */
.japs-submit-success {
    display: none;
    padding: 48px 32px;
    text-align: center;
}
.japs-submit-success .japs-tick {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
}
.japs-submit-success h3 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 22px;
    font-weight: 800;
    color: #0d1e3d;
    margin: 0 0 10px;
}
.japs-submit-success p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.7;
    margin: 0 0 24px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
.japs-success-close-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0d1e3d;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 11px 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    transition: background 0.2s;
}
.japs-success-close-btn:hover { background: #f0a500; color: #0d1e3d; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .japs-submit-head,
    .japs-submit-body { padding-left: 20px; padding-right: 20px; }
    .japs-form-row { grid-template-columns: 1fr; }
    .japs-form-row.cols-3 { grid-template-columns: 1fr 1fr; }
    .japs-submit-modal { border-radius: 10px; }
}