/* ==========================================================================
   Z83 Form Container & Basic Elements
   ========================================================================== */
.z83-form-container { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; max-width: 1000px; margin: auto; color: #333; }
.z83-form-container fieldset { border: 2px solid #eee; padding: 30px; margin-bottom: 40px; border-radius: 12px; background: #fff; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.z83-form-container legend { font-weight: bold; font-size: 1.4em; padding: 0 20px; color: #2c3e50; border-bottom: none; width: auto; }
.z83-form-container .form-row { display: flex; flex-wrap: wrap; gap: 25px; margin-bottom: 20px; }
.z83-form-container .form-group { flex: 1; min-width: 280px; display: flex; flex-direction: column; }
.z83-form-container label { font-weight: 600; margin-bottom: 10px; font-size: 0.95em; }
.z83-form-container input:not([type="radio"]):not([type="checkbox"]), 
.z83-form-container select, 
.z83-form-container textarea { padding: 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 1em; transition: border 0.3s; width: 100%; box-sizing: border-box; }
.z83-form-container input:focus { border-color: #f68021; outline: none; }
.z83-form-container input[readonly], .z83-form-container input:disabled { background-color: #f4f4f4; color: #666; cursor: not-allowed; border-color: #ddd; }
.z83-form-container .radio-group { display: flex; gap: 20px; padding: 10px 0; }
.z83-form-container label.required::after { content: " *"; color: #e74c3c; font-weight: bold; }

/* ==========================================================================
   Repeaters & Buttons
   ========================================================================== */
.repeater-block { border: 1px solid #ddd; padding: 25px; margin-bottom: 20px; border-radius: 8px; background: #fcfcfc; position: relative; }
.btn-add { background: #2271b1; color: #fff; padding: 12px 20px; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; }
.btn-remove { background: #d63638; color: #fff; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; margin-top: 15px; }
.submit-btn { background: #f68021; color: #fff; padding: 20px; border: none; border-radius: 8px; font-size: 1.3em; font-weight: bold; cursor: pointer; width: 100%; box-shadow: 0 4px 15px rgba(246, 128, 33, 0.3); transition: background 0.3s; }
.submit-btn:hover { background: #e06d12; }

/* ==========================================================================
   Conditionals & Signature Pad
   ========================================================================== */
/* INCREASED SPECIFICITY TO HIDE ON PAGE LOAD */
.z83-form-container .form-row.conditional-details,
.z83-form-container .conditional-details { display: none; background: #fff9c4; padding: 20px; border-left: 5px solid #fbc02d; margin-top: 10px; border-radius: 4px; width: 100%; box-sizing: border-box; }
.other-language-group { display: none; margin-top: 10px; }

/* NEATER SIGNATURE PAD */
.signature-pad-wrapper { 
    border: 2px dashed #b5bcc2; 
    border-radius: 8px; 
    background: #fdfdfd; 
    height: 200px; 
    margin-bottom: 10px; 
    position: relative; 
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.05);
}
.signature-pad-wrapper::before {
    content: "Sign inside this box";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ccc;
    font-size: 1.5em;
    pointer-events: none;
    font-weight: bold;
}
#signature-canvas { width: 100%; height: 100%; touch-action: none; cursor: crosshair; position: relative; z-index: 10; }
.signature-pad-clear { 
    position: absolute; 
    bottom: 10px; 
    right: 10px; 
    background: #fff; 
    border: 1px solid #dcdcde; 
    padding: 6px 12px; 
    cursor: pointer; 
    border-radius: 4px; 
    color: #d63638; 
    font-weight: 600; 
    z-index: 20;
    transition: background 0.2s;
}
.signature-pad-clear:hover { background: #f0f0f1; }

/* ==========================================================================
   Pre-Screening Modal
   ========================================================================== */
#z83-prescreen-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 100000; display: flex; align-items: center; justify-content: center; }
#z83-prescreen-modal { background: #fff; padding: 40px; border-radius: 12px; max-width: 600px; width: 90%; box-shadow: 0 5px 25px rgba(0,0,0,0.5); }
#z83-prescreen-modal h2 { margin-top: 0; color: #2c3e50; }
.z83-question-block { margin-bottom: 20px; padding: 15px; background: #f9f9f9; border-radius: 8px; border-left: 4px solid #2271b1; }
.z83-question-block p { font-weight: bold; margin-bottom: 10px; }
#z83-prescreen-actions { margin-top: 25px; text-align: right; }
#z83-prescreen-message { padding: 15px; margin-top: 15px; border-radius: 4px; text-align: center; font-weight: bold; display: none; }
#z83-prescreen-message.success { background: #d4edda; color: #155724; }
#z83-prescreen-message.error { background: #f8d7da; color: #721c24; }

/* ==========================================================================
   Admin Details Print Table
   ========================================================================== */
.detail-table { margin-bottom: 30px; } 
.detail-table th { width: 30%; text-align: left; } 
.detail-table td { background: #fff; }