.sbp-personalizer {
    --navy: #10164c;
    --royal: #3540a8;
    --violet: #795ad9;
    --gold: #d9ad50;
    position: relative;
    overflow: hidden;
    margin: 22px 0;
    padding: 26px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, rgba(14, 21, 78, .96), rgba(54, 47, 139, .92)), url('../images/mission-bg.webp') center/cover;
    border: 1px solid rgba(255, 255, 255, .25);
    box-shadow: 0 22px 55px rgba(21, 27, 83, .25)
}

.sbp-personalizer:before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#fff 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: .12;
    pointer-events: none
}

.sbp-personalizer>* {
    position: relative
}

.sbp-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 800;
    letter-spacing: .11em;
    font-size: 12px
}

.sbp-brand img {
    width: 90px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, .2))
}

.sbp-mission-head small {
    color: #f1d886;
    font-weight: 800;
    letter-spacing: .16em
}

.sbp-mission-head h3 {
    color: #fff !important;
    font-size: 30px !important;
    margin: 6px 0 8px !important
}

.sbp-mission-head p {
    max-width: 760px;
    color: #e8ebff
}

.sbp-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 20px 0
}

.sbp-field>span {
    display: block;
    font-weight: 700;
    margin-bottom: 8px
}

.sbp-field input[type=text] {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, .35) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .95) !important;
    color: #111 !important;
    padding: 10px 14px !important
}

.sbp-methods {
    display: flex;
    gap: 8px
}

.sbp-method {
    border: 1px solid rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .09);
    color: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer
}

.sbp-method.active {
    background: #fff;
    color: var(--navy)
}

.sbp-panel {
    background: rgba(255, 255, 255, .08);
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .2)
}

.sbp-upload {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: 1px dashed rgba(255, 255, 255, .5);
    padding: 18px;
    border-radius: 14px
}

.sbp-upload input {
    margin-top: 10px
}

.sbp-upload span {
    font-size: 13px;
    color: #dfe3ff
}

.sbp-avatar-builder h4 {
    color: #fff !important;
    margin: 0 0 9px !important
}

.sbp-choice {
    margin-bottom: 18px
}

.sbp-choice>label {
    margin-right: 18px
}

.sbp-swatch-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 3px 2px 10px;
    scrollbar-width: thin
}

.sbp-swatch {
    flex: 0 0 120px;
    height: 120px;
    border-radius: 13px;
    overflow: hidden;
    border: 2px solid transparent;
    background: #fff;
    cursor: pointer;
    position: relative
}

.sbp-swatch input {
    position: absolute;
    opacity: 0
}

.sbp-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.sbp-swatch:has(input:checked) {
    border-color: #ffe47d;
    box-shadow: 0 0 0 3px rgba(255, 228, 125, .25)
}

.sbp-consent {
    display: flex;
    gap: 10px;
    margin: 18px 0 2px;
    align-items: flex-start
}

.sbp-consent input {
    margin-top: 5px
}

.sbp-state {
    margin-top: 12px;
    padding: 10px 13px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12)
}

.sbp-state.error {
    background: #7c1f35
}

.sbp-state.success {
    background: #176b5e
}

#sbp-photo-preview img {
    max-width: 150px;
    max-height: 150px;
    margin-top: 12px;
    border-radius: 14px;
    border: 2px solid #fff
}

@media(max-width:700px) {
    .sbp-personalizer {
        padding: 18px
    }

    .sbp-grid-two {
        grid-template-columns: 1fr
    }

    .sbp-mission-head h3 {
        font-size: 24px !important
    }

    .sbp-methods {
        flex-wrap: wrap
    }
}

/* v2.0.5: native-radio, no-:has method switching. Works without JavaScript. */
.sbp-method-radio {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important
}

.sbp-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none
}

.sbp-panels .sbp-panel {
    display: none
}

#sbp_method_photo:checked~.sbp-grid-two label[for="sbp_method_photo"],
#sbp_method_avatar:checked~.sbp-grid-two label[for="sbp_method_avatar"] {
    background: #fff;
    color: var(--navy)
}

#sbp_method_photo:checked~.sbp-panels .sbp-panel-photo {
    display: block
}

#sbp_method_avatar:checked~.sbp-panels .sbp-panel-avatar {
    display: block
}

/* v2.1.0: customer chooses the approved boy/girl book character independently of photo/avatar method. */
.sbp-character-select {
    margin: 20px 0 8px
}

.sbp-section-label {
    display: block;
    font-weight: 800;
    margin-bottom: 10px
}

.sbp-character-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.sbp-character-option {
    cursor: pointer
}

.sbp-character-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none
}

.sbp-character-option span {
    display: inline-flex;
    min-width: 110px;
    justify-content: center;
    align-items: center;
    padding: 12px 20px;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .09);
    font-weight: 800
}

.sbp-character-option input:checked+span {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 0 0 3px rgba(255, 228, 125, .20)
}

.sbp-character-radio {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important
}

#sbp_character_boy:checked~.sbp-character-select label[for="sbp_character_boy"] span,
#sbp_character_girl:checked~.sbp-character-select label[for="sbp_character_girl"] span {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 0 0 3px rgba(255, 228, 125, .20)
}

.sbp-hair-options-girl {
    display: none
}

#sbp_character_girl:checked~.sbp-panels .sbp-hair-options-boy {
    display: none
}

#sbp_character_girl:checked~.sbp-panels .sbp-hair-options-girl {
    display: block
}

#sbp_character_boy:checked~.sbp-panels .sbp-hair-options-boy {
    display: block
}

#sbp_character_boy:checked~.sbp-panels .sbp-hair-options-girl {
    display: none
}