/* DSG-DPA styling is intentionally scoped to the WooCommerce AVV area. */
.dsg-dpa-account {
    max-width: 900px;
    min-width: 0;
    width: 100%;
}
.dsg-dpa-account,
.dsg-dpa-account *,
.dsg-dpa-account *::before,
.dsg-dpa-account *::after {
    box-sizing: border-box;
}
.dsg-dpa-account h2 { margin-bottom: 1rem; }
.dsg-dpa-account .dsg-dpa-card {
    border: 1px solid #d8dde3;
    border-radius: 7px;
    padding: 1.25rem;
    margin: 1.4rem 0;
    background: #fafbfd;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.dsg-dpa-file { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; min-width: 0; }
.dsg-dpa-file small { color: #646d78; }
.dsg-dpa-file .button {
    margin-left: auto;
    max-width: 100%;
    white-space: normal;
}
.dsg-dpa-contract-form { margin-top: 1rem; min-width: 0; max-width: 100%; }
.dsg-dpa-contract-form input[type="text"] {
    width: 100%;
    max-width: 500px;
    display: block;
    margin-top: 4px;
}
.dsg-dpa-small { font-size: .85em; color: #636c77; }

/* Atomion injects span.atomion-checkbox-style around the input. The theme
   wrapper must never inherit the flex: 1 intended for the declaration text. */
.dsg-dpa-account .dsg-dpa-check label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    max-width: 100%;
}
.dsg-dpa-account .dsg-dpa-check label > input[type="checkbox"] {
    flex: 0 0 auto;
    margin: 4px 0 0;
}
.dsg-dpa-account .dsg-dpa-check label > span:not(.atomion-checkbox-style) {
    flex: 1 1 0%;
    min-width: 0;
    overflow-wrap: anywhere;
}
.dsg-dpa-account .dsg-dpa-check label > span.atomion-checkbox-style {
    display: inline-block;
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    margin-right: 0;
    top: 2px;
}
.dsg-dpa-account .dsg-dpa-check label > span.atomion-checkbox-style input[type="checkbox"] {
    margin: 0;
}

/* Some WooCommerce/Atomion themes make .button.alt wider than its padded
   card. Keep the submit button within the form on desktop and mobile. */
.dsg-dpa-account .dsg-dpa-contract-form > button.dsg-dpa-submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    float: none !important;
    clear: both;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: .5rem 0 0 !important;
    padding: .65em 1.15em;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-align: center;
    box-sizing: border-box;
}
@media (max-width: 600px) {
    .dsg-dpa-account .dsg-dpa-contract-form > button.dsg-dpa-submit {
        width: 100% !important;
    }
}

.dsg-dpa-success { border-left: 4px solid #26845a; background: #f4fbf6; }
.dsg-dpa-history-title { margin-top: 2rem; }
.dsg-dpa-highlight { border-left: 3px solid #d4962b; padding: .6em .8em; background: #fffaf0; }
.dsg-dpa-table-wrap { overflow-x: auto; }
.dsg-dpa-edit-notice { margin: 20px 0; padding: 14px; background: #f5f8fa; border-left: 4px solid #3579a6; }
.dsg-dpa-edit-notice a { white-space: nowrap; }
