.ndv-legal-agreement-box,
.ndv-legal-agreement {
    max-height: 420px;
    overflow: auto;
    padding: 16px;
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #1d2327;
    margin: 0 0 20px;
}

.ndv-legal-agreement-box *,
.ndv-legal-agreement * {
    color: inherit;
}

.ndv-legal-cart-requirements ul {
    margin: 8px 0 12px 20px;
}

.ndv-legal-product-ack {
    margin: 1rem 0;
    padding: 12px 14px;
    border: 1px solid #d6d9dc;
    background: #fff;
    color: #1d2327;
}

.ndv-legal-product-ack label,
.ndv-legal-product-ack span,
.ndv-legal-product-ack p {
    color: #1d2327;
}

.ndv-legal-product-ack input {
    margin-right: 6px;
}

.ndv-legal-read-button,
.ndv-legal-read-modal__agree {
    color: #fff !important;
    background: #111827 !important;
    border: 1px solid #111827 !important;
}

.ndv-legal-read-button {
    margin: 0 12px 8px 0 !important;
}

.ndv-legal-read-note {
    margin: 8px 0 0;
}

.ndv-legal-modal-open {
    overflow: hidden;
}

.ndv-legal-read-modal[hidden] {
    display: none !important;
}

.ndv-legal-read-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    color: #1d2327;
}

.ndv-legal-read-modal *,
.ndv-legal-read-modal *::before,
.ndv-legal-read-modal *::after {
    box-sizing: border-box;
}

.ndv-legal-read-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.ndv-legal-read-modal__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(960px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin: 16px auto;
    background: #fff;
    color: #1d2327;
    border: 1px solid #dcdcde;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.ndv-legal-read-modal__header,
.ndv-legal-read-modal__footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid #dcdcde;
    background: #f6f7f7;
    color: #1d2327;
}

.ndv-legal-read-modal__footer {
    border-top: 1px solid #dcdcde;
    border-bottom: 0;
}

.ndv-legal-read-modal__header h2 {
    margin: 0;
    color: #1d2327;
    font-size: 20px;
}

.ndv-legal-read-modal__close {
    width: 36px;
    height: 36px;
    border: 1px solid #8c8f94;
    background: #fff;
    color: #1d2327;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.ndv-legal-read-modal__body {
    flex: 1 1 auto;
    min-height: 260px;
    overflow: auto;
    padding: 18px;
    background: #fff;
    color: #1d2327;
}

.ndv-legal-read-modal__body h1,
.ndv-legal-read-modal__body h2,
.ndv-legal-read-modal__body h3,
.ndv-legal-read-modal__body p,
.ndv-legal-read-modal__body li,
.ndv-legal-read-modal__hint {
    color: #1d2327 !important;
}

.ndv-legal-read-modal__agree:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed;
}

.ndv-legal-electronic-details {
    margin: 24px 0 0;
    padding: 16px;
    border: 1px solid #dcdcde;
    background: #f6f7f7;
    color: #1d2327;
}

.ndv-legal-electronic-details h3 {
    margin-top: 0;
    color: #1d2327;
}

.ndv-legal-electronic-details table {
    width: 100%;
    border-collapse: collapse;
}

.ndv-legal-electronic-details th,
.ndv-legal-electronic-details td {
    padding: 8px 10px;
    border-top: 1px solid #dcdcde;
    color: #1d2327;
    text-align: left;
    vertical-align: top;
}

.ndv-legal-electronic-details th {
    width: 190px;
    font-weight: 700;
}

.ndv-legal-sign-action {
    margin: 12px 0 0;
}

.ndv-legal-sign-button,
.woocommerce-error .ndv-legal-sign-button,
.woocommerce-info .ndv-legal-sign-button {
    display: inline-block;
    color: #fff !important;
    background: #111827 !important;
    border: 1px solid #111827 !important;
    padding: 10px 16px;
    text-decoration: none;
}

.woocommerce-error .ndv-legal-sign-button:hover,
.woocommerce-info .ndv-legal-sign-button:hover {
    color: #fff !important;
    background: #374151 !important;
}

.ndv-legal-checkout-sign-fallback {
    max-width: 1120px;
    margin: 12px auto 24px;
    padding: 14px 16px;
    border: 1px solid #f0c36d;
    background: #fff8e5;
    color: #1d2327;
}

.ndv-legal-checkout-sign-fallback strong,
.ndv-legal-checkout-sign-fallback span {
    color: #1d2327;
}

.ndv-legal-checkout-sign-fallback .ndv-legal-sign-button {
    margin-left: 8px;
}

.ndv-legal-product-required .ppc-button-wrapper,
.ndv-legal-product-required [id^="ppc-button"],
.ndv-legal-cart-required .wc-block-components-express-payment,
.ndv-legal-cart-required .wc-block-components-express-payment__event-buttons,
.ndv-legal-cart-required .ppc-button-wrapper,
.ndv-legal-cart-required [id^="ppc-button"] {
    display: none !important;
}

.ndv-legal-signing,
.ndv-legal-signing .gform_wrapper,
.ndv-legal-signing .gform_body,
.ndv-legal-signing .gfield,
.ndv-legal-signing .gfield_label,
.ndv-legal-signing .gfield_description,
.ndv-legal-signing .ginput_container,
.ndv-legal-signing .gchoice label {
    color: #1d2327 !important;
}

.ndv-legal-signing {
    max-width: 920px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.96);
    color: #1d2327;
}

.ndv-legal-signing input[type="text"],
.ndv-legal-signing input[type="email"],
.ndv-legal-signing input[type="tel"],
.ndv-legal-signing input[type="date"],
.ndv-legal-signing textarea {
    background: #fff !important;
    color: #1d2327 !important;
    border: 1px solid #8c8f94 !important;
}

.ndv-legal-signing .gfield_required,
.ndv-legal-signing .gfield_required_text,
.ndv-legal-signing .validation_message {
    color: #b32d2e !important;
}

.ndv-legal-form-section {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #dcdcde;
    background: #fff;
    color: #1d2327;
}

.ndv-legal-form-section h2,
.ndv-legal-form-section h3,
.ndv-legal-form-section p,
.ndv-legal-form-section li,
.ndv-legal-form-section dt,
.ndv-legal-form-section dd {
    color: #1d2327;
}

.ndv-legal-form-section h2,
.ndv-legal-form-section h3 {
    margin-top: 0;
}

.ndv-legal-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 14px;
}

.ndv-legal-meta dt {
    font-weight: 700;
}

.ndv-legal-readonly input {
    background: #f6f7f7 !important;
}

.ndv-legal-wide-field input {
    max-width: none !important;
    width: min(100%, 720px) !important;
}

.ndv-legal-initial-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ndv-legal-initial-field .gfield_label {
    flex: 0 0 auto;
    margin: 0 !important;
}

.ndv-legal-initial-field .ginput_container {
    flex: 0 0 96px;
    margin: 0 !important;
}

.ndv-legal-initial-field input {
    width: 96px !important;
    text-align: center;
    text-transform: uppercase;
}

.ndv-legal-signing .ginput_container_signature canvas,
.ndv-legal-signing .ginput_container_signature img {
    background: #fff !important;
}

.ndv-legal-signing .gform_footer {
    text-align: left !important;
}

.ndv-legal-signing .gform_footer input[type="submit"],
.ndv-legal-signing .gform_button,
.ndv-legal-signing button[type="submit"] {
    display: inline-block !important;
    min-width: 160px;
    padding: 12px 18px !important;
    border: 1px solid #111827 !important;
    background: #111827 !important;
    color: #fff !important;
    opacity: 1 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    visibility: visible !important;
}

.ndv-legal-signing .gform_footer input[type="submit"]:hover,
.ndv-legal-signing .gform_button:hover,
.ndv-legal-signing button[type="submit"]:hover {
    background: #374151 !important;
    color: #fff !important;
}

.ndv-legal-my-agreements {
    color: #fff;
}

.ndv-legal-my-agreements h2,
.ndv-legal-my-agreements table,
.ndv-legal-my-agreements th,
.ndv-legal-my-agreements td,
.ndv-legal-my-agreements small {
    color: #fff;
}

.ndv-legal-my-agreements a {
    color: #fff;
}

.ndv-legal-receipt-button {
    margin: 2px 4px 2px 0;
}
