@media (min-width: 768px) {
    .promoterms-modal .modal-dialog {
        width: 760px;
        max-width: calc(100% - 40px);
    }
}

.promoterms-modal .modal-body {
    padding-bottom: 8px;
}

.promoterms-modal .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    background: inherit;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.promoterms-intro,
.promoterms-page-intro {
    margin: 0 0 20px;
}

.promoterms-doc-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
}

.promoterms-doc-meta {
    margin: 0 0 18px;
    font-size: 14px;
    opacity: .7;
}

.promoterms-doc {
    max-width: 68ch;
    font-size: 15px;
    line-height: 1.65;
}

.promoterms-doc h1,
.promoterms-doc h2 {
    margin: 28px 0 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.promoterms-doc h3,
.promoterms-doc h4 {
    margin: 20px 0 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.promoterms-doc > :first-child {
    margin-top: 0;
}

.promoterms-doc p,
.promoterms-doc ul,
.promoterms-doc ol {
    margin: 0 0 12px;
}

.promoterms-doc ul,
.promoterms-doc ol {
    padding-left: 22px;
}

.promoterms-doc li {
    margin-bottom: 4px;
}

.promoterms-doc table {
    width: 100%;
    margin: 4px 0 18px;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.5;
}

.promoterms-doc th,
.promoterms-doc td {
    padding: 8px 12px 8px 0;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(127, 127, 127, .22);
}

.promoterms-doc thead th {
    font-weight: 600;
    border-bottom-width: 2px;
}

.promoterms-doc td:first-child {
    width: 34%;
    font-weight: 600;
}

.promoterms-viewer {
    height: 60vh;
    min-height: 280px;
    overflow: auto;
    padding: 12px;
    background: rgba(127, 127, 127, .09);
    border-radius: 4px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.promoterms-request .promoterms-viewer {
    height: 70vh;
}

.promoterms-viewer:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.promoterms-viewer canvas {
    display: block;
    max-width: 100%;
    margin: 0 auto 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.promoterms-viewer canvas:last-child {
    margin-bottom: 0;
}

.promoterms-status {
    margin: 24px 0;
    text-align: center;
}

.promoterms-status.is-error {
    color: #c0392b;
}

.promoterms-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(127, 127, 127, .22);
}

.promoterms-modal .promoterms-note {
    margin: 10px 0 0;
    font-size: 14px;
    opacity: .75;
}

.promoterms-modal .modal-footer .btn + .btn {
    margin-left: 0;
}

.promoterms-hint {
    flex: 1 1 180px;
    text-align: left;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    opacity: .75;
}

.promoterms-modal .modal-footer .btn {
    flex: none;
    margin: 0;
}

.promoterms-hint[hidden] {
    display: none;
}

.promoterms-request .promoterms-hint {
    margin: 0 0 10px;
}

.promoterms-end {
    height: 1px;
}

@media (max-width: 575px) {
    .promoterms-doc {
        font-size: 16px;
    }

    .promoterms-doc td:first-child {
        width: 40%;
    }

    .promoterms-viewer {
        height: 55vh;
        padding: 8px;
    }

    .promoterms-modal .modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .promoterms-modal .promoterms-hint {
        order: 3;
        margin: 0;
        text-align: center;
    }

    .promoterms-modal .modal-footer .btn,
    .promoterms-modal .modal-footer .btn + .btn {
        width: 100%;
        margin: 0;
    }
}

.promoterms-modal.promoterms-fallback {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1050;
    overflow-y: auto;
    background: rgba(0, 0, 0, .5);
    opacity: 1;
}

.promoterms-modal.promoterms-fallback .modal-dialog {
    max-width: 760px;
    width: calc(100% - 20px);
    margin: 30px auto;
}

.promoterms-modal.promoterms-fallback .modal-content {
    background: #fff;
}

body.promoterms-lock {
    overflow: hidden;
}
