body.btwai-gs-page {
    overflow: hidden;
}

.btwai-gs-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: block;
    overflow-y: auto;
    padding: 0;
    background: #fff;
}

.btwai-gs-modal {
    --btwai-gs-blue: #2f6df6;
    --btwai-gs-blue-soft: #eef4ff;
    --btwai-gs-dark: #202936;
    --btwai-gs-text: #465265;
    --btwai-gs-muted: #7a8698;
    --btwai-gs-border: #e2e7ef;
    --btwai-gs-soft: #f7f9fc;
    --btwai-gs-success: #24ad68;
    --btwai-gs-error: #d63638;

    width: 100%;
    min-height: 100vh;
    overflow: visible;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    color: var(--btwai-gs-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.btwai-gs-modal * {
    box-sizing: border-box;
}

.btwai-gs-modal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1100px, calc(100% - 48px));
    margin: 0 auto;
    padding: 28px 0 20px;
}

.btwai-gs-brand {
    display: flex;
    align-items: center;
}

.btwai-gs-brand img {
    display: block;
    width: auto;
    height: 26px;
}

.btwai-gs-step-count {
    margin-top: 2px;
    color: var(--btwai-gs-muted);
    font-size: 13px;
    font-weight: 600;
}

.btwai-gs-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #8b95a3;
    font-size: 27px;
    font-weight: 300;
    line-height: 1;
    text-decoration: none;
}

.btwai-gs-close:hover,
.btwai-gs-close:focus {
    background: #f1f4f8;
    color: var(--btwai-gs-dark);
    box-shadow: none;
    outline: none;
}

.btwai-gs-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 28px;
    border-top: 1px solid var(--btwai-gs-border);
    border-bottom: 1px solid var(--btwai-gs-border);
    background: #fbfcfe;
}

.btwai-gs-progress-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border: 2px solid #d4dbe5;
    border-radius: 50%;
    background: #fff;
    color: #929cac;
    font-size: 12px;
    font-weight: 700;
}

.btwai-gs-progress-dot.is-current {
    border-color: var(--btwai-gs-blue);
    background: var(--btwai-gs-blue);
    color: #fff;
}

.btwai-gs-progress-dot.is-complete {
    border-color: var(--btwai-gs-success);
    background: var(--btwai-gs-success);
    color: #fff;
}

.btwai-gs-progress-line {
    width: 90px;
    height: 2px;
    background: #e0e5ed;
}

.btwai-gs-progress-line.is-complete {
    background: var(--btwai-gs-success);
}

.btwai-gs-content {
    width: min(960px, calc(100% - 48px));
    margin: 0 auto;
    padding: 38px 0 34px;
}

.btwai-gs-heading {
    margin-bottom: 22px;
}

.btwai-gs-heading.is-centered {
    max-width: 700px;
    margin: 0 auto 22px;
    text-align: center;
}

.btwai-gs-heading h2 {
    margin: 0 0 6px;
    color: var(--btwai-gs-dark);
    font-size: 24px;
    line-height: 1.2;
}

.btwai-gs-heading p {
    margin: 0;
    color: var(--btwai-gs-muted);
    font-size: 18px;
    line-height: 1.55;
}

.btwai-gs-welcome {
    padding: 8px 22px 2px;
}

.btwai-gs-welcome-icon,
.btwai-gs-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin: 2px auto 16px;
    border-radius: 50%;
}

.btwai-gs-welcome-icon {
    background: var(--btwai-gs-blue-soft);
    color: var(--btwai-gs-blue);
}

.btwai-gs-success-icon {
    background: #e9f8f0;
    color: var(--btwai-gs-success);
}

.btwai-gs-welcome-icon .dashicons,
.btwai-gs-success-icon .dashicons {
    width: 28px;
    height: 28px;
    font-size: 28px;
}

.btwai-gs-welcome-tracking {
    max-width: 780px;
    margin: 20px auto 0;
    padding: 11px 14px;
    border: 1px solid var(--btwai-gs-border);
    border-radius: 11px;
    background: var(--btwai-gs-soft);
}

.btwai-gs-tracking-title {
    margin-bottom: 5px;
    color: var(--btwai-gs-dark);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
}

.btwai-gs-switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.btwai-gs-switch-row > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.btwai-gs-switch {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #b6bfcb;
    transition: 0.18s ease;
}

.btwai-gs-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: 0.18s ease;
}

.btwai-gs-switch-row > input:checked + .btwai-gs-switch {
    background: var(--btwai-gs-blue);
}

.btwai-gs-switch-row > input:checked + .btwai-gs-switch::after {
    transform: translateX(18px);
}

.btwai-gs-switch-row strong,
.btwai-gs-switch-row small {
    display: inline;
}

.btwai-gs-switch-row strong {
    margin-right: 6px;
    color: var(--btwai-gs-dark);
    font-size: 15px;
    line-height: 1.4;
}

.btwai-gs-switch-row small {
    color: var(--btwai-gs-muted);
    font-size: 13px;
    line-height: 1.45;
}

.btwai-gs-switch-row small a {
    margin-left: 3px;
}

.btwai-gs-trial-strip {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 24px 0 26px;
    padding: 20px 22px;
    border: 1px solid #f3c75f;
    border-radius: 14px;
    background: #fffaf1;
}

.btwai-gs-trial-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border: 1px solid #f0cc73;
    border-radius: 50%;
    background: #fff5d9;
    font-size: 24px;
}

.btwai-gs-trial-content {
    flex: 1;
    min-width: 0;
}

.btwai-gs-trial-content strong,
.btwai-gs-trial-content span {
    display: block;
}

.btwai-gs-trial-content strong {
    color: #252a31;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.btwai-gs-trial-content span {
    margin-top: 4px;
    color: #6c7582;
    font-size: 15px;
    line-height: 1.5;
}

.btwai-gs-trial-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 9px;
    background: #22272d;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.btwai-gs-trial-button:hover,
.btwai-gs-trial-button:focus {
    background: #11151a;
    color: #fff;
    box-shadow: none;
    outline: none;
}

.btwai-gs-connected-note,
.btwai-gs-provider-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
}

.btwai-gs-connected-note {
    margin: 20px 0 24px;
    border: 1px solid #ccebd9;
    background: #f0faf4;
    color: #287d51;
}

.btwai-gs-provider-note {
    max-width: 760px;
    margin: 0 auto 20px;
    border: 1px solid #d8e5f8;
    background: #f6f9fe;
    color: #58677b;
    text-align: left;
}

.btwai-gs-connected-note .dashicons,
.btwai-gs-provider-note .dashicons {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.btwai-gs-key-panel {
    margin-top: 4px;
    padding: 20px;
    border: 1px solid var(--btwai-gs-border);
    border-radius: 11px;
    background: var(--btwai-gs-soft);
}

.btwai-gs-key-panel:empty {
    display: none;
}

.btwai-gs-label {
    display: block;
    margin-bottom: 5px;
    color: var(--btwai-gs-dark);
    font-size: 17px;
    font-weight: 700;
}

.btwai-gs-key-help {
    margin: 0 0 10px;
    color: var(--btwai-gs-muted);
    font-size: 14px;
    line-height: 1.5;
}

.btwai-gs-input {
    width: 100%;
    max-width: none;
    min-height: 44px;
    margin: 0 !important;
    padding: 9px 11px !important;
    border: 1px solid #cfd8e5 !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #2f3947 !important;
    font-size: 16px !important;
    line-height: 1.45 !important;
}

.btwai-gs-input:focus {
    border-color: #8db2ff !important;
    box-shadow: 0 0 0 2px rgba(47, 109, 246, 0.1) !important;
    outline: none !important;
}

/* AI Content Setup */
.btwai-gs-content-setup {
    display: grid;
    gap: 18px;
}

.btwai-gs-setup-section {
    padding: 20px;
    border: 1px solid var(--btwai-gs-border);
    border-radius: 11px;
    background: var(--btwai-gs-soft);
}

.btwai-gs-setup-section h3 {
    margin: 0 0 18px;
    color: var(--btwai-gs-dark);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.btwai-gs-field + .btwai-gs-field {
    margin-top: 18px;
}

.btwai-gs-setup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.btwai-gs-setup-grid .btwai-gs-field + .btwai-gs-field {
    margin-top: 0;
}

.btwai-gs-textarea {
    min-height: 112px;
    resize: vertical;
}

.btwai-gs-field-help {
    margin: 7px 0 0;
    color: var(--btwai-gs-muted);
    font-size: 13px;
    line-height: 1.5;
}

.btwai-gs-field-help strong {
    color: #5d6878;
    font-weight: 700;
}

.btwai-gs-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.btwai-gs-actions.is-centered {
    justify-content: center;
}

.btwai-gs-button-primary,
.btwai-gs-button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 9px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.btwai-gs-button-primary {
    border: 1px solid var(--btwai-gs-blue);
    background: var(--btwai-gs-blue);
    color: #fff;
}

.btwai-gs-button-primary:hover,
.btwai-gs-button-primary:focus {
    border-color: #255dd4;
    background: #255dd4;
    color: #fff;
    box-shadow: none;
    outline: none;
}

.btwai-gs-button-secondary {
    border: 1px solid #d3dbe6;
    background: #fff;
    color: #3e4a5a;
}

.btwai-gs-button-secondary:hover,
.btwai-gs-button-secondary:focus {
    border-color: #b9c5d5;
    background: #f8fafc;
    color: #263243;
    box-shadow: none;
    outline: none;
}

.btwai-gs-start-button {
    min-width: 150px;
}

.btwai-gs-notice {
    margin-bottom: 18px;
    padding: 11px 13px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.btwai-gs-notice.is-success {
    border-color: #ccebd9;
    background: #f0faf4;
    color: #287d51;
}

.btwai-gs-notice.is-error {
    border-color: #efc7c8;
    background: #fff4f4;
    color: #a92c2f;
}

.btwai-gs-ready {
    text-align: center;
}

.btwai-gs-reward-text {
    color: #455164 !important;
    font-size: 16px !important;
    font-weight: 600;
}

.btwai-gs-ready-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 760px;
    margin: 18px auto 0;
    text-align: left;
}

.btwai-gs-ready-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 88px;
    padding: 15px 16px;
    border: 1px solid var(--btwai-gs-border);
    border-radius: 10px;
    background: #fff;
}

.btwai-gs-ready-item > .dashicons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--btwai-gs-blue-soft);
    color: var(--btwai-gs-blue);
    font-size: 21px;
    line-height: 40px;
}

.btwai-gs-ready-item strong,
.btwai-gs-ready-item small {
    display: block;
}

.btwai-gs-ready-item strong {
    color: var(--btwai-gs-dark);
    font-size: 16px;
    line-height: 1.35;
}

.btwai-gs-ready-item small {
    margin-top: 3px;
    color: var(--btwai-gs-muted);
    font-size: 13px;
    line-height: 1.45;
}

/* Step 3: GEO status and recommended next steps. */
.btwai-gs-geo-detected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 760px;
    margin: 20px auto 26px;
    padding: 10px 12px;
    border: 1px solid #ccebd9;
    border-radius: 8px;
    background: #f0faf4;
    color: #287d51;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.btwai-gs-geo-detected .dashicons {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.btwai-gs-geo-promo {
    margin: 20px 0 28px;
}

.btwai-gs-geo-promo .btw-promo-banner-wrap {
    display: block;
    overflow: hidden;
    width: 100%;
    border-radius: 12px;
    text-decoration: none;
}

.btwai-gs-geo-promo .btw-promo-banner-wrap:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 3px;
}

.btwai-gs-geo-promo .btw-promo-img-desktop,
.btwai-gs-geo-promo .btw-promo-img-mobile {
    width: 100%;
    height: auto;
}

.btwai-gs-geo-promo .btw-promo-img-desktop {
    display: block;
}

.btwai-gs-geo-promo .btw-promo-img-mobile {
    display: none;
}

.btwai-gs-next-heading {
    margin-top: 4px !important;
    margin-bottom: 16px !important;
}

.btwai-gs-next-list {
    overflow: hidden;
    border: 1px solid var(--btwai-gs-border);
    border-radius: 10px;
    background: #fff;
    text-align: left;
}

.btwai-gs-next-list > a {
    display: grid;
    grid-template-columns: 40px 1fr 18px;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--btwai-gs-border);
    color: var(--btwai-gs-text);
    text-decoration: none;
}

.btwai-gs-next-list > a:last-child {
    border-bottom: 0;
}

.btwai-gs-next-list > a:hover,
.btwai-gs-next-list > a:focus {
    background: #f8faff;
    color: var(--btwai-gs-text);
    box-shadow: none;
    outline: none;
}

.btwai-gs-next-list > a > .dashicons {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: var(--btwai-gs-blue-soft);
    color: var(--btwai-gs-blue);
    font-size: 21px;
}

.btwai-gs-next-list strong,
.btwai-gs-next-list small {
    display: block;
}

.btwai-gs-next-list strong {
    color: var(--btwai-gs-dark);
    font-size: 16px;
    line-height: 1.35;
}

.btwai-gs-next-list small {
    margin-top: 2px;
    color: var(--btwai-gs-muted);
    font-size: 14px;
    line-height: 1.45;
}

.btwai-gs-next-arrow {
    color: #9aa4b2;
    font-size: 19px;
}

.btwai-gs-next-list > a:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid #1d4ed8 !important;
    outline-offset: -3px;
}

.btwai-gs-close:focus-visible,
.btwai-gs-button-primary:focus-visible,
.btwai-gs-button-secondary:focus-visible,
.btwai-gs-trial-button:focus-visible {
    outline: 3px solid #1d4ed8 !important;
    outline-offset: 3px;
    box-shadow: none !important;
}

.btwai-gs-switch-row > input:focus-visible + .btwai-gs-switch {
    outline: 3px solid #1d4ed8;
    outline-offset: 3px;
}

@media (max-width: 782px) {
    .btwai-gs-modal-top,
    .btwai-gs-content {
        width: calc(100% - 36px);
    }

    .btwai-gs-modal-top {
        padding-top: 20px;
    }

    .btwai-gs-content {
        padding-top: 28px;
    }

    .btwai-gs-progress {
        padding-left: 15px;
        padding-right: 15px;
    }

    .btwai-gs-progress-line {
        width: 56px;
    }

    .btwai-gs-heading h2 {
        font-size: 26px;
    }

    .btwai-gs-heading p {
        font-size: 16px;
    }

    .btwai-gs-welcome {
        padding-left: 0;
        padding-right: 0;
    }

    .btwai-gs-welcome-tracking {
        max-width: none;
        padding: 12px 13px;
    }

    .btwai-gs-welcome-tracking .btwai-gs-switch-row {
        align-items: flex-start;
    }

    .btwai-gs-switch-row strong,
    .btwai-gs-switch-row small {
        display: block;
    }

    .btwai-gs-switch-row strong {
        margin-right: 0;
    }

    .btwai-gs-switch-row small {
        margin-top: 2px;
    }

    .btwai-gs-trial-strip {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 17px;
    }

    .btwai-gs-trial-button {
        width: 100%;
    }

    .btwai-gs-ready-grid {
        grid-template-columns: 1fr;
    }

    .btwai-gs-geo-promo .btw-promo-img-desktop {
        display: none;
    }

    .btwai-gs-geo-promo .btw-promo-img-mobile {
        display: block;
    }

    .btwai-gs-next-list > a {
        grid-template-columns: 36px 1fr 16px;
        gap: 10px;
        min-height: 74px;
        padding: 13px 14px;
    }

    .btwai-gs-next-list > a > .dashicons {
        width: 36px;
        height: 36px;
        font-size: 19px;
    }

    .btwai-gs-next-list strong {
        font-size: 15px;
    }

    .btwai-gs-next-list small {
        font-size: 13px;
    }

    .btwai-gs-setup-section {
        padding: 17px;
    }

    .btwai-gs-setup-grid {
        grid-template-columns: 1fr;
    }

    .btwai-gs-setup-grid .btwai-gs-field + .btwai-gs-field {
        margin-top: 0;
    }

    .btwai-gs-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .btwai-gs-actions.is-centered {
        flex-direction: column;
    }

    .btwai-gs-button-primary,
    .btwai-gs-button-secondary {
        width: 100%;
        min-height: 46px;
    }
}

@media (max-width: 480px) {
    .btwai-gs-progress-line {
        width: 36px;
    }

    .btwai-gs-brand img {
        max-width: 180px;
        height: auto;
        max-height: 26px;
    }

   .btwai-gs-trial-content strong {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btwai-gs-switch,
    .btwai-gs-switch::after {
        transition: none;
    }
}