.nwss-tryon-entry {
    clear: both;
    display: block !important;
    visibility: visible !important;
    width: 100%;
    height: auto !important;
    margin: 14px 0 8px;
    opacity: 1 !important;
    overflow: visible !important;
}

.nwss-tryon-open.button {
    display: block !important;
    visibility: visible !important;
    width: 100%;
    min-height: 48px;
    padding: 11px 18px;
    border: 2px solid #1ac720;
    border-radius: 12px;
    background: #111;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    box-shadow: 0 4px 0 rgba(26, 199, 32, .28);
    opacity: 1 !important;
}

@media (max-width: 679px) {
    .nwss-tryon-entry {
        display: block !important;
        position: static !important;
        inset: auto !important;
        z-index: auto !important;
        visibility: visible !important;
        width: 100% !important;
        height: auto !important;
        margin: 18px 0 20px !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .nwss-tryon-entry .nwss-tryon-open.button {
        display: block !important;
        min-height: 50px;
        width: 100% !important;
        margin: 0 !important;
        border: 2px solid #1ac720 !important;
        background: #111 !important;
        color: #fff !important;
        font-size: 16px;
        box-shadow: 0 5px 18px rgba(0, 0, 0, .38) !important;
    }
}

.nwss-tryon-open.button:hover,
.nwss-tryon-open.button:focus {
    border-color: #111;
    background: #1ac720;
    color: #000;
}

.nwss-tryon-modal[hidden] {
    display: none !important;
}

body.nwss-tryon-modal-open {
    overflow: hidden;
}

/* Prevent third-party video players from creating a layer above the try-on. */
body.nwss-tryon-modal-open iframe[src*="youtube" i],
body.nwss-tryon-modal-open iframe[src*="youtu.be" i],
body.nwss-tryon-modal-open .wp-block-embed-youtube,
body.nwss-tryon-modal-open .youtube-player,
body.nwss-tryon-modal-open .fluid-width-video-wrapper,
body.nwss-tryon-modal-open .wp-video {
    visibility: hidden !important;
    pointer-events: none !important;
}

.nwss-tryon-modal {
    position: fixed;
    z-index: 2147483000;
    isolation: isolate;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.nwss-tryon-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
}

.nwss-tryon-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
    border: 3px solid #1ac720;
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    background: #e9ffcc;
    color: #000;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, .35);
    -webkit-overflow-scrolling: touch;
}

.nwss-tryon-panel h2 {
    margin: 0 42px 8px 0;
    color: #000;
    font-size: 24px;
    line-height: 1.2;
}

.nwss-tryon-x {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e00000;
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    line-height: 38px;
    cursor: pointer;
}

.nwss-tryon-instruction,
.nwss-tryon-hint,
.nwss-tryon-disclaimer {
    color: #000;
}

.nwss-tryon-choices {
    margin: 14px 0;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, .28);
    border-radius: 12px;
    background: rgba(255, 255, 255, .55);
}

.nwss-tryon-colors-heading {
    margin-bottom: 7px;
}

.nwss-tryon-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nwss-tryon-color-option {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.nwss-tryon-color-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.nwss-tryon-color-option span {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 2px solid #aaa;
    border-radius: 9px;
    background: #fff;
    color: #000;
    font-weight: 700;
    line-height: 1.1;
}

.nwss-tryon-color-option input:checked + span {
    border-color: #111;
    background: #1ac720;
    box-shadow: 0 0 0 2px rgba(26, 199, 32, .25);
}

.nwss-tryon-color-option input:focus-visible + span {
    outline: 3px solid #1a73e8;
    outline-offset: 2px;
}

.nwss-tryon-color-option.is-unavailable {
    cursor: not-allowed;
}

.nwss-tryon-color-option.is-unavailable span {
    color: #777;
    background: linear-gradient(to top right, transparent 47%, #d00000 48%, #d00000 52%, transparent 53%), #eee;
    opacity: .72;
}

.nwss-tryon-color-help {
    margin: 8px 0 0;
    color: #222;
    font-size: 12px;
    line-height: 1.35;
}

.nwss-tryon-color-help.is-error {
    color: #d00000;
    font-weight: 700;
}

.nwss-tryon-upload {
    margin: 16px 0 12px;
    padding: 14px;
    border: 2px dashed #777;
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    text-align: center;
}

.nwss-tryon-photo-guide {
    margin: 0 0 14px;
    padding: 12px;
    border: 2px solid #111;
    border-radius: 12px;
    background: #fff;
    color: #000;
    text-align: left;
}

.nwss-tryon-photo-guide-title {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    text-align: center;
}

.nwss-tryon-photo-guide > p {
    margin: 0 0 10px;
    color: #000;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.nwss-tryon-photo-guide-art {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.nwss-tryon-photo-guide figure {
    min-width: 0;
    margin: 0;
    padding: 7px;
    border: 2px solid;
    border-radius: 10px;
    text-align: center;
}

.nwss-tryon-photo-guide figure.is-good {
    border-color: #148719;
    background: #efffed;
}

.nwss-tryon-photo-guide figure.is-bad {
    border-color: #d00000;
    background: #fff0f0;
}

.nwss-tryon-photo-guide svg {
    display: block;
    width: 100%;
    max-width: 132px;
    height: 148px;
    margin: 0 auto;
}

.nwss-tryon-photo-guide .guide-frame {
    fill: #fff;
    stroke: #777;
    stroke-width: 2;
    stroke-dasharray: 5 4;
}

.nwss-tryon-photo-guide .shadow {
    fill: rgba(0, 0, 0, .15);
}

.nwss-tryon-photo-guide .skin,
.nwss-tryon-photo-guide .skin-outline {
    fill: #f5b18f;
}

.nwss-tryon-photo-guide .skin-outline,
.nwss-tryon-photo-guide .arm,
.nwss-tryon-photo-guide .hand {
    stroke: #9e4f3f;
    stroke-width: 1.8;
    stroke-linejoin: round;
}

.nwss-tryon-photo-guide .hair {
    fill: #172229;
    stroke: #0b1014;
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.nwss-tryon-photo-guide .eye {
    fill: #172229;
}

.nwss-tryon-photo-guide .smile {
    fill: none;
    stroke: #b52e2e;
    stroke-width: 2;
    stroke-linecap: round;
}

.nwss-tryon-photo-guide .shirt {
    fill: #07525c;
    stroke: #06343b;
    stroke-width: 2;
    stroke-linejoin: round;
}

.nwss-tryon-photo-guide .shirt-detail {
    fill: none;
    stroke: #d8f0ed;
    stroke-width: 1.3;
    stroke-linecap: round;
    opacity: .8;
}

.nwss-tryon-photo-guide .trousers {
    fill: #176b70;
    stroke: #083f43;
    stroke-width: 2;
    stroke-linejoin: round;
}

.nwss-tryon-photo-guide .trouser-detail {
    fill: none;
    stroke: #0b4e53;
    stroke-width: 1.5;
    stroke-linecap: round;
}

.nwss-tryon-photo-guide .shoe {
    fill: #1e3138;
    stroke: #091519;
    stroke-width: 2;
    stroke-linejoin: round;
}

.nwss-tryon-photo-guide .mark {
    stroke: #fff;
    stroke-width: 2.5;
}

.nwss-tryon-photo-guide .is-good .mark {
    fill: #148719;
}

.nwss-tryon-photo-guide .is-bad .mark {
    fill: #d00000;
}

.nwss-tryon-photo-guide .mark-symbol {
    fill: none;
    stroke: #fff;
    stroke-width: 4.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nwss-tryon-photo-guide figcaption {
    min-height: 34px;
    margin-top: 4px;
    color: #000;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.nwss-tryon-file-label {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

#nwss-tryon-file {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.nwss-tryon-hint {
    margin: 9px 0 0;
    font-size: 13px;
    line-height: 1.4;
}

.nwss-tryon-person-preview {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 300px;
    margin: 12px auto 0;
    border-radius: 10px;
}

.nwss-tryon-photo-validation {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 2px solid;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    text-align: left;
}

.nwss-tryon-photo-validation[hidden] {
    display: none !important;
}

.nwss-tryon-photo-validation.is-checking {
    border-color: #896c00;
    background: #fff6c9;
    color: #5c4800;
}

.nwss-tryon-photo-validation.is-valid {
    border-color: #148719;
    background: #eaffea;
    color: #075d0b;
}

.nwss-tryon-photo-validation.is-invalid {
    border-color: #d00000;
    background: #fff0f0;
    color: #a00000;
}

.nwss-tryon-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 12px 0;
    color: #000;
    font-size: 14px;
    line-height: 1.4;
}

.nwss-tryon-consent input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.nwss-tryon-generate.button.alt {
    width: 100%;
    min-height: 48px;
    border-radius: 11px;
    background: #1ac720;
    color: #000;
    font-size: 16px;
    font-weight: 900;
}

.nwss-tryon-generate.button.alt:disabled {
    opacity: .6;
}

.nwss-tryon-status {
    min-height: 24px;
    margin-top: 12px;
    color: #000;
    font-weight: 700;
    text-align: center;
}

.nwss-tryon-status.is-error {
    color: #d00000;
}

.nwss-tryon-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 3px solid rgba(0, 0, 0, .2);
    border-top-color: #000;
    border-radius: 50%;
    vertical-align: -4px;
    animation: nwss-tryon-spin .8s linear infinite;
}

@keyframes nwss-tryon-spin {
    to { transform: rotate(360deg); }
}

.nwss-tryon-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.nwss-tryon-results[hidden] {
    display: none !important;
}

.nwss-tryon-result-card {
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, .3);
    border-radius: 13px;
    background: rgba(255, 255, 255, .72);
}

.nwss-tryon-result-card h3 {
    margin: 0 0 7px;
    color: #000;
    font-size: 15px;
    line-height: 1.2;
    text-align: center;
}

.nwss-tryon-result-card > img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #111;
    border-radius: 9px;
    background: #fff;
}

.nwss-tryon-result-card.is-error {
    border-color: #d00000;
}

.nwss-tryon-card-error {
    margin: 8px 0;
    color: #d00000;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

.nwss-tryon-actions {
    display: block;
    margin-top: 10px;
}

.nwss-tryon-actions .button {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: 12px;
    text-align: center;
}

.nwss-tryon-actions .button + .button {
    margin-top: 8px;
}

.nwss-tryon-disclaimer {
    margin: 14px 0 0;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

@media (min-width: 680px) {
    .nwss-tryon-modal {
        align-items: center;
        padding: 24px;
    }

    .nwss-tryon-panel {
        border-bottom: 3px solid #1ac720;
        border-radius: 20px;
        padding: 26px;
    }

    .nwss-tryon-open.button {
        width: auto;
        min-width: 300px;
    }
}

@media (max-width: 420px) {
    .nwss-tryon-results {
        gap: 8px;
    }

    .nwss-tryon-result-card {
        padding: 6px;
    }

    .nwss-tryon-actions .button {
        padding-right: 5px;
        padding-left: 5px;
        font-size: 11px;
    }
}
