.custom-disclosure-radio legend.gfield_label { font-size: 1.25em; font-weight: bold; margin-bottom: 15px; }

.custom-disclosure-radio .disclosure-warning-banner {
    display: flex; align-items: center; background-color: #fff4f4; color: #d32f2f;
    border-left: 4px solid #d32f2f; border-radius: 4px; font-size: 0.9em;
    max-height: 0; opacity: 0; padding: 0 15px; margin-bottom: 0; overflow: hidden; transition: all 0.4s ease;
}
.custom-disclosure-radio .disclosure-warning-banner svg { flex-shrink: 0; margin-right: 10px; }
.custom-disclosure-radio.scroll-pending .disclosure-warning-banner {
    max-height: 100px; opacity: 1; padding: 12px 15px; margin-bottom: 15px;
}
.custom-disclosure-radio:not(.scroll-pending) .disclosure-warning-banner {
    max-height: 100px; opacity: 1; padding: 12px 15px; margin-bottom: 15px;
    background-color: #f4fff4; color: #2e7d32; border-left-color: #2e7d32;
}

.custom-disclosure-radio .gfield_radio { transition: opacity 0.4s ease, filter 0.4s ease; }
.custom-disclosure-radio.scroll-pending .gfield_radio { opacity: 0.4; filter: grayscale(100%); pointer-events: none; }

.custom-disclosure-radio.disclosure-state-closed .custom-disclosure-inline-container { display: none !important; }
.custom-disclosure-radio.disclosure-state-open .custom-disclosure-inline-container { display: block !important; }

.custom-disclosure-radio .gfield_radio .gchoice { display: flex; align-items: flex-start; margin-bottom: 12px; }
.custom-disclosure-radio .gfield_radio input[type="radio"] { margin-top: 4px; margin-right: 8px; }
.custom-disclosure-radio .gfield_radio label { margin-top: 0; line-height: 1.4; }

/* Sticky Progress Bar */
.disclosure-progress-container { 
    position: sticky; top: 0; left: 0; z-index: 10;
    width: 100%; height: 4px; background: #e0e0e0; 
}
.disclosure-progress-fill { width: 0%; height: 100%; background: #1a1a5a; transition: width 0.1s ease-out; }

/* Scroll Wrappers */
.custom-disclosure-radio .custom-disclosure-inline-container { margin-top: 15px; margin-bottom: 10px; overflow: visible !important; }
.custom-disclosure-radio .custom-disclosure-wrapper { 
    border-radius: 4px; border: 1px solid #ccc; 
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.06); 
    background-color: #fff;
    overflow-y: auto !important; /* Locks scrolling directly to the wrapper */
    overflow-x: hidden !important;
}
.custom-disclosure-wrapper:focus, .disclosure-modal-inner:focus { outline: 2px solid #1a1a5a; outline-offset: -2px; }

.custom-disclosure-radio .custom-disclosure-content { 
    padding: 15px; padding-top: 10px; border: none; margin: 0; box-shadow: none; 
    overflow: visible !important; /* Prevents nested scrolling */
}

.custom-disclosure-wrapper::-webkit-scrollbar,
.disclosure-modal-inner::-webkit-scrollbar { width: 10px; }
.custom-disclosure-wrapper::-webkit-scrollbar-track,
.disclosure-modal-inner::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.custom-disclosure-wrapper::-webkit-scrollbar-thumb,
.disclosure-modal-inner::-webkit-scrollbar-thumb { background: #bbb; border-radius: 10px; border: 2px solid #f1f1f1; }
.custom-disclosure-wrapper::-webkit-scrollbar-thumb:hover,
.disclosure-modal-inner::-webkit-scrollbar-thumb:hover { background: #1a1a5a; }

/* Lightbox Modal */
dialog.disclosure-modal { border: none; border-radius: 6px; padding: 0; box-shadow: 0 5px 20px rgba(0,0,0,0.3); z-index: 9999; max-width: 95vw; overflow: hidden;}
dialog.disclosure-modal::backdrop { background: rgba(0,0,0,0.6); backdrop-filter: blur(2px); cursor: pointer; }

.disclosure-modal-inner { max-height: 60vh; overflow-y: auto; line-height: 1.6; }

.disclosure-modal-actions { display: flex; justify-content: space-between; align-items: center; margin: 20px 25px 25px 25px; border-top: 1px solid #eee; padding-top: 20px; flex-wrap: wrap; gap: 15px; }
.disclosure-modal-primary-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.disclosure-modal-close { background: #f1f1f1; color: #333; border: 1px solid #ccc; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.disclosure-modal-close:hover { background: #e1e1e1; color: #111; }

.disclosure-disagree-btn { background: transparent; color: #333; border: 1px solid #666; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.disclosure-disagree-btn:hover { background: #f1f1f1; border-color: #333; color: #111; }

.disclosure-agree-btn { background: #1a1a5a; color: #fff; border: 1px solid #1a1a5a; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.disclosure-agree-btn:hover:not(:disabled) { background: #0f0f3a; color: #fff; }
.disclosure-agree-btn:disabled { background: #ccc; border-color: #ccc; cursor: not-allowed; opacity: 0.7; }

/* Print Button overrides to prevent aggressive theme styles */
.disclosure-print-btn { 
    background: transparent !important; 
    color: #1a1a5a !important; 
    border: none !important; 
    text-decoration: underline !important; 
    cursor: pointer; 
    padding: 10px 0 !important; 
    box-shadow: none !important;
}
.disclosure-print-btn:hover,
.disclosure-print-btn:focus {
    background: transparent !important; 
    color: #0f0f3a !important; 
    border: none !important; 
    text-decoration: none !important; 
    box-shadow: none !important;
}
.inline-print-btn {
    font-size: 0.85em;
    padding: 0 5px !important;
}

.reveal-disclosure-btn { text-decoration: underline; color: #1a1a5a; cursor: pointer; }
.reveal-disclosure-btn:hover { text-decoration: none; }

@media (max-width: 768px) {
    dialog.disclosure-modal { width: 95vw !important; max-width: 95vw !important; height: 95vh; max-height: 95vh; margin: auto; display: flex; flex-direction: column; }
    .disclosure-modal-inner { max-height: none; flex-grow: 1; }
    .disclosure-modal-actions { flex-direction: column-reverse; }
    .disclosure-modal-primary-actions { flex-direction: column; width: 100%; }
    .disclosure-modal-primary-actions button { width: 100%; }
}