/* What is Provably Fair modal — load after media-*.css */
/* Spribe: fixed dim backdrop + scrollable modal window on top */
#what-is-provably-fair-modal.modal {
    --color-modal-body: #2d3c27;
    --what-is-pf-green: #62c13b;
    --what-is-pf-text: #b8beb4;
    --what-is-pf-text-muted: #9ea59a;
    position: fixed;
    inset: 0;
    top: 0 !important;
    left: 0;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: transparent;
    box-sizing: border-box;
    z-index: 5010;
}

#what-is-provably-fair-modal .what-is-pf-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

#what-is-provably-fair-modal .what-is-pf-scroll {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 8px;
    box-sizing: border-box;
}

#what-is-provably-fair-modal .what-is-pf-scroll .modal-dialog {
    display: block;
    width: 100%;
    max-width: min(1200px, calc(100vw - 16px));
    min-width: 0;
    height: auto;
    max-height: none;
    margin: 0 auto;
    pointer-events: none;
    flex-shrink: 1;
    box-sizing: border-box;
}

#what-is-provably-fair-modal .modal-content.what-is-pf-content {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
    padding: 0;
    pointer-events: auto;
    outline: 0;
    color: #fff;
    background: #2d3c27;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.72);
}

#what-is-provably-fair-modal .modal-header {
    height: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0 15px;
    background: #2c2d30;
    border-bottom: 1px solid #2c2d30;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

#what-is-provably-fair-modal .text-uppercase {
    text-transform: uppercase;
}

#what-is-provably-fair-modal .text-center {
    text-align: center;
}

#what-is-provably-fair-modal .modal-header .text-uppercase {
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    color: #fff;
    letter-spacing: 0.02em;
}

#what-is-provably-fair-modal .modal-header .close {
    width: auto;
    min-width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #97a4ae;
    text-shadow: 0 1px 0 #97a4ae;
    text-transform: none;
    opacity: 1;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

#what-is-provably-fair-modal .modal-header .close span {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    text-shadow: inherit;
}

#what-is-provably-fair-modal .modal-header .close:hover,
#what-is-provably-fair-modal .modal-header .close:focus {
    color: #97a4ae;
    text-shadow: 0 1px 0 #97a4ae;
    opacity: 1;
}

#what-is-provably-fair-modal .modal-body {
    padding: 12px 14px 14px;
    margin: 0;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: visible;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #fff;
    background-color: #2d3c27;
    text-align: left;
    box-sizing: border-box;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

#what-is-provably-fair-modal .modal-bottom-radius {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

#what-is-provably-fair-modal .d-flex {
    display: flex;
}

#what-is-provably-fair-modal .justify-content-center {
    justify-content: center;
}

#what-is-provably-fair-modal .mb-1 {
    margin-bottom: 8px;
}

/* Spribe Provably Fair logo: div.fairness-i + background SVG 80×90 */
#what-is-provably-fair-modal .modal-body .d-flex.justify-content-center.mb-1 > .fairness-i {
    display: block;
    width: 80px;
    height: 90px;
    min-width: 80px;
    min-height: 90px;
    flex-shrink: 0;
    background: url('/static/img/icon-provabyfair.svg') no-repeat center center / contain;
    background-image: url('/static/img/icon-provabyfair.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

#what-is-provably-fair-modal .what-is-pf-tagline {
    text-align: center;
    margin: 12px 0 20px;
}

#what-is-provably-fair-modal .what-is-pf-tagline span {
    font-family: Inter, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    color: #fff;
}

#what-is-provably-fair-modal .top-text.description {
    margin: 0 0 24px;
    padding: 20px;
    background: #1b2418;
    border-radius: 8px;
    color: #999;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
}

#what-is-provably-fair-modal .top-text.description span {
    display: block;
}

#what-is-provably-fair-modal .modal-body .text-center.text-uppercase {
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    color: #fff;
    margin: 20px 0 12px;
    letter-spacing: 0.04em;
}

#what-is-provably-fair-modal .what-is-pf-subhead {
    font-size: 14px;
    font-weight: 400;
    color: #fff;
    margin: 0 0 8px;
}

#what-is-provably-fair-modal .what-is-pf-subhead--spaced {
    margin-top: 16px;
}

#what-is-provably-fair-modal .description {
    margin: 0 0 12px;
    color: #999;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
}

#what-is-provably-fair-modal .description.mt-2 {
    margin-top: 8px;
}

#what-is-provably-fair-modal .description.mt-2 + .what-is-pf-subhead {
    margin-top: 16px;
}

/* Provably Fair seed diagram (Spribe pf-scheme.svg background) */
#what-is-provably-fair-modal .my-sm-4 {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

#what-is-provably-fair-modal .pf-scheme {
    display: block;
    width: 100%;
    max-width: 500px;
    height: auto;
    aspect-ratio: 500 / 513;
    margin: 0 auto;
    flex-shrink: 1;
    background: url('/static/img/pf-scheme.svg') no-repeat center center / contain;
    box-sizing: border-box;
}

#what-is-provably-fair-modal .description.mt-4 {
    margin-top: 16px;
    margin-bottom: 0;
}

#what-is-provably-fair-modal .description.mt-4 > div {
    margin-bottom: 0;
}

/* Mobile / narrow — card with side inset like Spribe */
@media (max-width: 768px) {
    #what-is-provably-fair-modal .what-is-pf-scroll {
        padding: 8px;
        padding-top: max(8px, env(safe-area-inset-top, 0px));
        padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
    }

    #what-is-provably-fair-modal .what-is-pf-scroll .modal-dialog {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0 auto;
    }

    #what-is-provably-fair-modal .modal-content.what-is-pf-content {
        width: 100%;
        min-width: 0;
        border-radius: 10px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
        overflow: hidden;
    }

    #what-is-provably-fair-modal .modal-header {
        height: 40px;
        min-height: 40px;
        padding: 0 10px 0 14px;
        border-radius: 10px 10px 0 0;
    }

    #what-is-provably-fair-modal .modal-header .text-uppercase {
        flex: 1 1 auto;
        min-width: 0;
        padding-right: 8px;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #what-is-provably-fair-modal .modal-header .close {
        flex-shrink: 0;
        min-width: 40px;
        min-height: 40px;
    }

    #what-is-provably-fair-modal .modal-body {
        padding: 16px 14px 20px;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        border-radius: 0 0 10px 10px;
        overflow-x: hidden;
        overflow-wrap: break-word;
        word-wrap: break-word;
        background-color: #2d3c27;
    }

    #what-is-provably-fair-modal .modal-body .d-flex.justify-content-center.mb-1 > .fairness-i {
        width: 72px;
        height: 81px;
        min-width: 72px;
        min-height: 81px;
    }

    #what-is-provably-fair-modal .what-is-pf-tagline {
        margin: 12px 0 16px;
    }

    #what-is-provably-fair-modal .what-is-pf-tagline span {
        font-size: 14px;
        line-height: 1.4;
        padding: 0 4px;
    }

    #what-is-provably-fair-modal .top-text.description {
        margin: 0 0 20px;
        padding: 16px 14px;
        font-size: 14px;
        background: #1b2418;
        border-radius: 8px;
        color: #97a4ae;
    }

    #what-is-provably-fair-modal .modal-body .text-center.text-uppercase {
        font-size: 14px;
        margin: 18px 0 12px;
        letter-spacing: 0.04em;
        color: #fff;
    }

    #what-is-provably-fair-modal .what-is-pf-subhead {
        font-size: 14px;
        color: #97a4ae;
    }

    #what-is-provably-fair-modal .description {
        font-size: 14px;
        line-height: 1.5;
        color: #97a4ae;
    }

    #what-is-provably-fair-modal .my-sm-4 {
        width: 100%;
        margin: 14px 0;
        overflow: hidden;
        padding: 0 2px;
        box-sizing: border-box;
    }

    #what-is-provably-fair-modal .pf-scheme {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 500 / 513;
        margin: 0 auto;
    }

    #what-is-provably-fair-modal .description.mt-4 {
        margin-top: 16px;
    }

    #what-is-provably-fair-modal .description.mt-4 > div {
        margin-bottom: 8px;
    }

    #what-is-provably-fair-modal .description.mt-4 > div:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 380px) {
    #what-is-provably-fair-modal .what-is-pf-scroll {
        padding: 6px;
    }

    #what-is-provably-fair-modal .modal-body {
        padding: 14px 12px 18px;
    }

    #what-is-provably-fair-modal .modal-body .d-flex.justify-content-center.mb-1 > .fairness-i {
        width: 64px;
        height: 72px;
        min-width: 64px;
        min-height: 72px;
    }

    #what-is-provably-fair-modal .what-is-pf-tagline span,
    #what-is-provably-fair-modal .top-text.description,
    #what-is-provably-fair-modal .what-is-pf-subhead,
    #what-is-provably-fair-modal .description,
    #what-is-provably-fair-modal .modal-body .text-center.text-uppercase {
        font-size: 13px;
    }
}

@media (max-width: 1024px) {
    #what-is-provably-fair-modal .what-is-pf-scroll .modal-dialog {
        max-width: calc(100vw - 16px);
    }

    #what-is-provably-fair-modal .pf-scheme {
        max-width: min(500px, calc(100vw - 28px));
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #what-is-provably-fair-modal .what-is-pf-scroll {
        padding: 12px;
    }
}

/* Overrides: beat global .modal / .modal-header span */
#what-is-provably-fair-modal.modal {
    background: transparent !important;
    top: 0 !important;
    align-items: stretch !important;
}

#what-is-provably-fair-modal .modal-header .text-uppercase,
#what-is-provably-fair-modal .what-is-pf-tagline span,
#what-is-provably-fair-modal .modal-body .text-center.text-uppercase,
#what-is-provably-fair-modal .what-is-pf-subhead {
    font-weight: 400 !important;
}

@media (max-width: 768px) {
    #what-is-provably-fair-modal .what-is-pf-scroll {
        padding: 8px !important;
    }

    #what-is-provably-fair-modal .what-is-pf-scroll .modal-dialog {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    #what-is-provably-fair-modal .modal-content.what-is-pf-content {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 10px !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65) !important;
    }

    #what-is-provably-fair-modal .modal-header {
        border-radius: 10px 10px 0 0 !important;
    }

    #what-is-provably-fair-modal .modal-body {
        padding: 16px 14px 20px !important;
        border-radius: 0 0 10px 10px !important;
    }

    #what-is-provably-fair-modal .what-is-pf-subhead,
    #what-is-provably-fair-modal .description {
        color: #97a4ae !important;
    }

    #what-is-provably-fair-modal .pf-scheme {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 500 / 513;
    }
}
