/* Khanesarmaye Popup Wizard — gold webinar template (selected_wizard = goldWebinar).
   Same design as the Next.js GoldWebinarPopup; all classes prefixed with kgw- to avoid theme clashes. */

.kgw-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 22, 26, 0.7);
    font-family: inherit;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.25s ease,
        visibility 0s linear 0.25s;
}
.kgw-backdrop.kgw-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease;
}
.kgw-shell {
    position: relative;
    width: 100%;
    max-width: 480px;
}
.kgw-open .kgw-shell {
    animation: kgwPopIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes kgwPopIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@keyframes kgwRiseIn {
    from {
        opacity: 0;
        transform: translateY(48px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
#kgw-root [hidden] {
    display: none !important;
}
/* WordPress has no global border-box (Tailwind does in the Next.js apps). */
#kgw-root,
#kgw-root *,
#kgw-root *::before,
#kgw-root *::after {
    box-sizing: border-box;
}

/* "Are you sure?" confirmation, rounded like the card */
.kgw-exit {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.kgw-exit.kgw-visible {
    display: flex;
}
.kgw-exit-card {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    direction: rtl;
}
.kgw-exit-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(3, 0, 56, 0.08);
    color: #eeac43;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.kgw-exit-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 800;
    color: #111827;
}
.kgw-exit-text {
    margin: 0 0 24px;
    font-size: 12px;
    color: #6b7280;
}
.kgw-exit-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.kgw-exit-btns button {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 12px 24px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
.kgw-exit-keep {
    background: linear-gradient(to right, #c07808, #eeac43);
    color: #fff;
    font-weight: 800 !important;
}
.kgw-exit-close {
    background: #f3f4f6;
    color: #374151;
    font-weight: 500;
}
.dark .kgw-exit-card {
    background: #010022;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.dark .kgw-exit-title {
    color: #fff;
}
.dark .kgw-exit-text {
    color: #9ca3af;
}
.dark .kgw-exit-close {
    background: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
}

.kgw-card {
    --ink: #16140f;
    --gold: #a8741a;
    --btn: #d4aa4f;
    --btn2: #c99b3e;
    --body: #5a554b;
    --mut: #8a8478;
    --line: #e4dfd3;
    --field: #faf9f6;
    --otp: #fff;
    --box: #f7f6f2;
    --rowline: #e9e6df;
    --chip: #ecebe4;
    --chipS: #f4e9cc;
    --chipSInk: #7a5310;
    --capOff: #dad6ce;
    --closeHover: #f2f0eb;
    --rule: #eeece7;
    --ok: #1f7a45;
    --err: #b42318;
    --tg: #1a82c4;
    --tg2: #136fa8;
    --tgSoft: #e8f2fa;
    --swOff: #c9c4ba;
    --swOn: #1f9d55;
    --chipBg: #fff;

    position: relative;
    width: 100%;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-radius: 28px;
    padding: 26px 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    text-align: center;
    direction: rtl;
    color: var(--ink);
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5);
    font-family: inherit;
}
.kgw-card * {
    box-sizing: border-box;
}
.kgw-card :focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}
.kgw-cardFinal {
    padding: 26px 24px 22px;
    gap: 0;
}

.dark .kgw-card {
    --ink: #ffffff;
    --gold: #e2b65c;
    --body: rgba(255, 255, 255, 0.72);
    --mut: rgba(255, 255, 255, 0.5);
    --line: rgba(255, 255, 255, 0.14);
    --field: rgba(255, 255, 255, 0.05);
    --otp: rgba(255, 255, 255, 0.06);
    --box: rgba(255, 255, 255, 0.05);
    --rowline: rgba(255, 255, 255, 0.08);
    --chip: rgba(255, 255, 255, 0.1);
    --chipS: rgba(212, 170, 79, 0.22);
    --chipSInk: #f1cf85;
    --capOff: rgba(255, 255, 255, 0.18);
    --closeHover: rgba(255, 255, 255, 0.08);
    --rule: rgba(255, 255, 255, 0.1);
    --ok: #4ade80;
    --err: #f87171;
    --tgSoft: rgba(26, 130, 196, 0.2);
    --swOff: rgba(255, 255, 255, 0.25);
    --chipBg: rgba(255, 255, 255, 0.06);
    background: #010022; /* primary-dark */
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 24px 60px -20px rgba(0, 0, 0, 0.7);
}

.kgw-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: var(--mut);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.kgw-close:hover {
    background: var(--closeHover);
    color: var(--ink);
}

/* ---------- Header ---------- */
.kgw-head {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.kgw-title {
    margin: 0;
    font-weight: 900;
    font-size: 28px;
    line-height: 1.45;
    color: var(--ink);
}
.kgw-title > span {
    display: block;
    white-space: nowrap;
}
.kgw-title em,
.kgw-lead em {
    font-style: normal;
    color: var(--gold);
}
.kgw-lead {
    margin: 6px 0 0;
    font-size: 15px;
    line-height: 1.8;
    font-weight: 500;
    color: var(--body);
}
.kgw-lead p {
    margin: 0;
}

/* ---------- Media + LIVE badge ---------- */
.kgw-media {
    position: relative;
    align-self: stretch;
}
.kgw-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1448 / 1086;
    /* Shrinks on short screens so the whole popup fits without scrolling. */
    max-height: clamp(140px, calc(100vh - 590px), 324px);
    max-height: clamp(140px, calc(100dvh - 590px), 324px);
    object-fit: cover;
    object-position: 50% 22%;
}
.kgw-live {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #e0282e;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.45);
    direction: ltr;
    animation: kgwLive 2.4s ease-in-out infinite;
}
.kgw-live b {
    letter-spacing: 0.04em;
}
.kgw-live span {
    font-weight: 700;
    font-size: 12.5px;
    direction: rtl;
}
.kgw-live i {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}
.kgw-live i::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #fff;
    animation: kgwRipple 1.6s ease-out infinite;
}
@keyframes kgwLive {
    0%,
    100% {
        transform: none;
    }
    50% {
        transform: scale(1.04);
    }
}
@keyframes kgwRipple {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

/* ---------- Action area ---------- */
.kgw-act {
    align-self: stretch;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.kgw-zone {
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Clip the slide, but leave room for focus rings. */
    overflow: hidden;
    padding: 5px;
    margin: -5px;
}
/* RTL slide: the next step comes in from the left, going back comes in from the right. */
.kgw-step {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: kgwSlideNext 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.kgw-back {
    animation-name: kgwSlideBack;
}
.kgw-slideIn {
    animation: kgwSlideNext 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes kgwSlideNext {
    from {
        opacity: 0;
        transform: translateX(-36px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@keyframes kgwSlideBack {
    from {
        opacity: 0;
        transform: translateX(36px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* gold buttons + passing shine */
.kgw-cta,
.kgw-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 0;
    cursor: pointer;
    font: inherit;
    background: var(--btn);
    color: #1c160a;
    text-decoration: none;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition:
        background-color 0.15s ease,
        transform 0.15s ease;
}
.kgw-cta {
    min-height: 58px;
    border-radius: 16px;
    font-size: 19px;
    width: 100%;
}
.kgw-btn {
    flex: none;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 13px;
    font-size: 16px;
}
.kgw-cta:hover,
.kgw-btn:hover {
    background: var(--btn2);
}
.kgw-cta:active,
.kgw-btn:active {
    transform: scale(0.99);
}
.kgw-cta:disabled,
.kgw-btn:disabled {
    cursor: progress;
    opacity: 0.7;
}
.kgw-cta::after,
.kgw-btn::after {
    content: '';
    position: absolute;
    top: -10%;
    bottom: -10%;
    left: 0;
    width: 38%;
    pointer-events: none;
    background: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 250, 230, 0.75) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(280%) skewX(-20deg);
    animation: kgwShine 3.4s cubic-bezier(0.4, 0, 0.2, 1) 1.2s infinite;
}
@keyframes kgwShine {
    0% {
        transform: translateX(280%) skewX(-20deg);
    }
    38% {
        transform: translateX(-140%) skewX(-20deg);
    }
    100% {
        transform: translateX(-140%) skewX(-20deg);
    }
}
.kgw-cta svg {
    animation: kgwNudge 3.4s ease-in-out 1.2s infinite;
}
@keyframes kgwNudge {
    0%,
    30% {
        transform: none;
    }
    38% {
        transform: translateX(-5px);
    }
    46%,
    100% {
        transform: none;
    }
}

/* fields */
.kgw-field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 62px;
    padding: 5px;
    border: 1.5px solid var(--line);
    border-radius: 18px;
    background: var(--field);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}
.kgw-field:focus-within,
.kgw-otp input:focus {
    border-color: var(--btn);
    box-shadow: 0 0 0 4px rgba(212, 170, 79, 0.18);
}
.kgw-bad {
    border-color: var(--err);
}
/* 16px text so phones don't zoom in on focus; smaller placeholder. */
.kgw-in {
    flex: 1;
    min-width: 0;
    height: 50px;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    text-align: right;
}
.kgw-in::placeholder {
    color: var(--mut);
    opacity: 1;
    font-size: 12px;
}
.kgw-in:focus-visible,
.kgw-otp input:focus-visible {
    outline: none;
}
.kgw-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.kgw-stack .kgw-field {
    min-height: 0;
    padding: 0;
    border-radius: 16px;
}
.kgw-stack .kgw-in {
    height: 52px;
    padding: 0 14px;
}
.kgw-otpField {
    justify-content: space-between;
}
.kgw-otp {
    display: flex;
    gap: 8px;
    padding-left: 6px;
    direction: ltr;
}
.kgw-otp input {
    width: 48px;
    height: 50px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--otp);
    text-align: center;
    font: inherit;
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    outline: 0;
    padding: 0;
}
.kgw-sent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}
.kgw-sent > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ok);
    text-align: right;
}
.kgw-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    color: var(--body);
    white-space: nowrap;
}
.kgw-link:hover {
    color: var(--ink);
}
.kgw-note {
    font-size: 13px;
    font-weight: 500;
    color: var(--body);
    align-self: center;
}
.kgw-note b {
    font-weight: 800;
    color: var(--ink);
}
.kgw-err {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--err);
    text-align: right;
}
.kgw-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Offer box ---------- */
.kgw-info {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    background: var(--box);
    border-radius: 16px;
    padding: 4px 16px;
    text-align: right;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--body);
}
.kgw-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
}
.kgw-row + .kgw-row {
    border-top: 1px solid var(--rowline);
}
.kgw-lbl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.kgw-lbl svg {
    flex: none;
    color: var(--mut);
}
.kgw-info b {
    font-weight: 700;
    color: var(--ink);
}
.kgw-cap {
    margin-right: auto;
    flex: none;
    display: inline-flex;
    gap: 2px;
}
.kgw-cap i {
    width: 5px;
    height: 11px;
    border-radius: 2px;
    background: var(--capOff);
}
.kgw-cap i.kgw-on {
    background: #d64545;
}
.kgw-old {
    color: var(--mut);
    text-decoration: line-through;
    text-decoration-color: var(--mut);
    white-space: nowrap;
}
.kgw-clock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.kgw-clock i {
    width: 2px;
}
.kgw-info .kgw-clock b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 0 5px;
    border-radius: 7px;
    background: var(--chip);
    color: var(--ink);
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1;
}
.kgw-info .kgw-clock b.kgw-sec {
    background: var(--chipS);
    color: var(--chipSInk);
}

/* ---------- Final step (Telegram) ---------- */
.kgw-steps {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    align-self: stretch;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    font-size: 12.5px;
    font-weight: 600;
}
.kgw-steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--body);
}
.kgw-steps li::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--btn);
}
.kgw-steps li:first-child::before {
    right: 50%;
}
.kgw-steps li:last-child::before {
    left: 50%;
}
.kgw-dot {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--btn);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kgw-steps li.kgw-current {
    color: var(--ink);
    font-weight: 800;
}
.kgw-steps li.kgw-current .kgw-dot {
    background: #fff;
    border: 2px solid var(--tg);
    color: var(--tg);
}
.dark .kgw-steps li.kgw-current .kgw-dot {
    /* solid so the step line doesn't show through */
    background: #062044;
    border-color: #4fb3f0;
    color: #4fb3f0;
    box-shadow: 0 0 0 4px rgba(79, 179, 240, 0.12);
}
.kgw-rule {
    height: 1px;
    align-self: stretch;
    background: var(--rule);
    margin-top: 18px;
}

/* Text block from the dashboard: <h2> with two spans + a paragraph */
.kgw-finalText {
    align-self: stretch;
}
.kgw-finalText h1,
.kgw-finalText h2,
.kgw-finalText h3 {
    margin: 18px 0 0 !important;
    font-weight: 900 !important;
    font-size: 27px !important;
    line-height: 1.45 !important;
    color: var(--ink) !important;
    text-align: center !important;
}
.kgw-finalText h1 > span,
.kgw-finalText h2 > span,
.kgw-finalText h3 > span {
    display: block;
    white-space: nowrap;
}
.kgw-finalText h1 > span:first-child,
.kgw-finalText h2 > span:first-child,
.kgw-finalText h3 > span:first-child {
    color: var(--gold) !important;
}
.kgw-finalText p {
    margin: 8px 0 16px !important;
    font-size: 14px !important;
    line-height: 1.9 !important;
    font-weight: 500 !important;
    color: var(--body) !important;
    text-align: center !important;
}
.kgw-finalText strong {
    font-weight: 800;
    color: var(--ink);
}
.kgw-finalText em {
    font-style: normal;
    color: var(--gold);
}

.kgw-video {
    position: relative;
    display: block;
    align-self: center;
    /* Cap the height on short screens (keeps 840:470). */
    width: min(100%, calc((100vh - 500px) * 1.787));
    width: min(100%, calc((100dvh - 500px) * 1.787));
    min-width: 60%;
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 840 / 470;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
}
.kgw-video img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.kgw-videoPlaying {
    cursor: default;
}
.kgw-videoPlaying iframe,
.kgw-videoPlaying > div {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

.kgw-fInfo {
    margin-top: 14px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    background: var(--box);
    border-radius: 16px;
    padding: 4px 16px;
    text-align: right;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--body);
}
.kgw-fRow {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}
.kgw-fRow + .kgw-fRow {
    border-top: 1px solid var(--rowline);
}
.kgw-n {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dark .kgw-n {
    color: #16140f;
}
.kgw-handle {
    font-weight: 700;
    color: var(--tg);
}
.dark .kgw-handle {
    color: #4fb3f0;
}
.kgw-vpnChip {
    margin-right: auto;
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 6px 0 10px;
    border-radius: 999px;
    background: var(--chipBg);
    border: 1px solid var(--line);
    direction: ltr;
}
.kgw-vpnChip b {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--ink);
}
.kgw-sw {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: var(--swOn);
    animation: kgwSwBg 3.2s ease-in-out infinite;
}
.kgw-sw::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: kgwKnob 3.2s ease-in-out infinite;
}
@keyframes kgwSwBg {
    0%,
    18% {
        background: var(--swOff);
    }
    32%,
    100% {
        background: var(--swOn);
    }
}
@keyframes kgwKnob {
    0%,
    18% {
        transform: translateX(0);
    }
    32%,
    100% {
        transform: translateX(14px);
    }
}
.kgw-tgi {
    margin-right: auto;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--tg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kgw-tg {
    margin-top: 14px;
    align-self: stretch;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    border-radius: 16px;
    background: var(--tg);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 19px;
    transition:
        background-color 0.15s ease,
        transform 0.15s ease;
}
.kgw-tg:hover {
    background: var(--tg2);
    color: #fff;
}
.kgw-tg:active {
    transform: scale(0.99);
}
.kgw-tg::after {
    content: '';
    position: absolute;
    top: -10%;
    bottom: -10%;
    left: 0;
    width: 38%;
    pointer-events: none;
    background: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(280%) skewX(-20deg);
    animation: kgwShine 3.4s cubic-bezier(0.4, 0, 0.2, 1) 1.2s infinite;
}
.kgw-tg svg {
    animation: kgwFly 3.4s ease-in-out 1.2s infinite;
}
@keyframes kgwFly {
    0%,
    30% {
        transform: none;
    }
    38% {
        transform: translate(-4px, -3px);
    }
    46%,
    100% {
        transform: none;
    }
}
.kgw-hint {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.8;
    color: var(--body);
}
.kgw-hint b {
    display: inline-block;
    padding: 0 7px;
    border-radius: 6px;
    background: var(--tgSoft);
    color: var(--tg);
    font-weight: 800;
}

/* ---------- Phone: compact floating card so it fits without scrolling ---------- */
@media (max-width: 520px) {
    .kgw-backdrop {
        padding: 12px;
    }
    .kgw-open .kgw-shell {
        animation-name: kgwRiseIn;
        animation-duration: 0.42s;
    }
    .kgw-exit {
        border-radius: 24px;
    }
    .kgw-card {
        border-radius: 24px;
        padding: 18px 14px 16px;
        gap: 10px;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }
    .kgw-cardFinal {
        padding: 16px 14px 14px;
        gap: 0;
    }
    .kgw-close {
        top: 8px;
        left: 8px;
        width: 36px;
        height: 36px;
    }
    .kgw-title {
        font-size: 21px;
    }
    .kgw-lead {
        margin-top: 4px;
        font-size: 12px;
        line-height: 1.75;
    }
    .kgw-img {
        max-height: clamp(120px, calc(100vh - 470px), 270px);
        max-height: clamp(120px, calc(100dvh - 470px), 270px);
    }
    .kgw-live {
        top: 8px;
        right: 8px;
        height: 24px;
        padding: 0 9px;
        gap: 5px;
        font-size: 11px;
    }
    .kgw-live span {
        font-size: 10.5px;
    }
    .kgw-live i {
        width: 6px;
        height: 6px;
    }
    .kgw-act {
        gap: 10px;
    }
    .kgw-zone {
        min-height: 108px;
    }
    .kgw-step {
        gap: 6px;
    }
    .kgw-cta {
        min-height: 50px;
        border-radius: 14px;
        font-size: 16px;
    }
    .kgw-btn {
        min-height: 44px;
        padding: 0 14px;
        border-radius: 11px;
        font-size: 14px;
    }
    .kgw-field {
        min-height: 54px;
        padding: 4px;
        border-radius: 15px;
    }
    .kgw-in {
        height: 44px;
        padding: 0 10px;
    }
    .kgw-stack {
        gap: 8px;
    }
    .kgw-stack .kgw-in {
        height: 46px;
        padding: 0 10px;
    }
    .kgw-sent {
        font-size: 11.5px;
    }
    .kgw-otp {
        gap: 5px;
        padding-left: 2px;
    }
    .kgw-otp input {
        width: 38px;
        height: 44px;
        border-radius: 10px;
        font-size: 18px;
    }
    .kgw-note,
    .kgw-err {
        font-size: 12px;
    }
    .kgw-info {
        padding: 2px 12px;
        font-size: 11.5px;
        border-radius: 14px;
    }
    .kgw-row {
        padding: 6px 0;
        gap: 8px;
    }
    .kgw-info .kgw-clock b {
        min-width: 24px;
        height: 22px;
        font-size: 12px;
    }

    /* final step */
    .kgw-steps {
        margin-top: 6px;
        font-size: 11px;
    }
    .kgw-steps li {
        gap: 6px;
    }
    .kgw-steps li::before {
        top: 12px;
    }
    .kgw-dot {
        width: 26px;
        height: 26px;
    }
    .kgw-dot svg {
        width: 13px;
        height: 13px;
    }
    .kgw-rule {
        margin-top: 12px;
    }
    .kgw-finalText h1,
    .kgw-finalText h2,
    .kgw-finalText h3 {
        margin-top: 12px !important;
        font-size: 19px !important;
    }
    .kgw-finalText p {
        margin: 6px 0 10px !important;
        font-size: 12px !important;
        line-height: 1.8 !important;
    }
    .kgw-video {
        /* Cap the video height on short screens (keeps 840:470). */
        align-self: center;
        width: min(100%, calc((100vh - 464px) * 1.787));
        width: min(100%, calc((100dvh - 464px) * 1.787));
        min-width: 60%;
        margin: 0;
        border-radius: 14px;
    }
    .kgw-fInfo {
        margin-top: 10px;
        padding: 2px 12px;
        font-size: 11.5px;
    }
    .kgw-fRow {
        padding: 6px 0;
    }
    .kgw-tg {
        margin-top: 10px;
        min-height: 50px;
        border-radius: 14px;
        font-size: 16px;
    }
    .kgw-hint {
        margin-top: 8px;
        font-size: 11.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kgw-cta,
    .kgw-btn,
    .kgw-tg {
        transition: none;
    }
    .kgw-open .kgw-shell,
    .kgw-step,
    .kgw-slideIn,
    .kgw-cta svg,
    .kgw-tg svg,
    .kgw-live,
    .kgw-live i::after,
    .kgw-sw,
    .kgw-sw::after {
        animation: none;
    }
    .kgw-sw {
        background: var(--swOn);
    }
    .kgw-sw::after {
        transform: translateX(14px);
    }
    .kgw-cta::after,
    .kgw-btn::after,
    .kgw-tg::after {
        display: none;
    }
}

/* ---------- Theme guard ----------
   WordPress themes style input[type=...] and button with selectors that beat single
   classes, so the form controls are restated here under the #kgw-root id. */
#kgw-root button,
#kgw-root a {
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
    line-height: normal;
    text-decoration: none;
}
#kgw-root .kgw-in {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 50px;
    min-height: 0;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 16px;
    line-height: normal;
    color: var(--ink);
    text-align: right;
}
#kgw-root .kgw-in::placeholder {
    color: var(--mut);
    opacity: 1;
    font-size: 12px;
}
#kgw-root .kgw-stack .kgw-in {
    width: 100%;
    height: 52px;
    padding: 0 14px;
}
#kgw-root .kgw-otp input {
    width: 48px;
    height: 50px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--otp);
    box-shadow: none;
    outline: 0;
    font: inherit;
    font-size: 20px;
    font-weight: 800;
    line-height: normal;
    color: var(--ink);
    text-align: center;
}
#kgw-root .kgw-otp input:focus {
    border-color: var(--btn);
    box-shadow: 0 0 0 4px rgba(212, 170, 79, 0.18);
}
@media (max-width: 520px) {
    #kgw-root .kgw-in {
        height: 44px;
        padding: 0 10px;
    }
    #kgw-root .kgw-stack .kgw-in {
        height: 46px;
        padding: 0 10px;
    }
    #kgw-root .kgw-otp input {
        width: 38px;
        height: 44px;
        border-radius: 10px;
        font-size: 18px;
    }
}

/* Geo video block (kwp_render_video_geo_block) fills the 840:470 frame. */
#kgw-root .kgw-video .kwp-media-block,
#kgw-root .kgw-video .kwp-video-target,
#kgw-root .kgw-video .kwp-video-target > div {
    width: 100%;
    height: 100%;
    margin: 0;
}
#kgw-root .kgw-video iframe,
#kgw-root .kgw-video img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    object-fit: cover;
}

/* The site's font is unknown here, so let title lines wrap instead of overflowing. */
#kgw-root .kgw-title > span,
#kgw-root .kgw-finalText h1 > span,
#kgw-root .kgw-finalText h2 > span,
#kgw-root .kgw-finalText h3 > span {
    white-space: normal !important;
}

/* Theme guard for buttons: some themes give every <button> a white background,
   padding, border and shadow (that hid the close X). Restated under #kgw-root. */
#kgw-root .kgw-close {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    width: 44px;
    height: 44px;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    color: var(--mut);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
#kgw-root .kgw-close:hover,
#kgw-root .kgw-close:focus {
    background: var(--closeHover);
    color: var(--ink);
}
#kgw-root .kgw-close svg {
    display: block;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}
#kgw-root .kgw-cta,
#kgw-root .kgw-btn {
    margin: 0;
    border: 0;
    box-shadow: none;
    background: var(--btn);
    color: #1c160a;
    font-weight: 800;
}
#kgw-root .kgw-cta:hover,
#kgw-root .kgw-btn:hover {
    background: var(--btn2);
    color: #1c160a;
}
#kgw-root .kgw-link {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--body);
    min-height: 32px;
}
#kgw-root .kgw-link:hover {
    color: var(--ink);
}
#kgw-root .kgw-exit-btns button {
    margin: 0;
    border: 0;
    box-shadow: none;
}
#kgw-root .kgw-exit-keep {
    background: linear-gradient(to right, #c07808, #eeac43);
    color: #fff;
}
#kgw-root .kgw-exit-close {
    background: #f3f4f6;
    color: #374151;
}
.dark #kgw-root .kgw-exit-close {
    background: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
}
@media (max-width: 520px) {
    #kgw-root .kgw-close {
        top: 8px;
        left: 8px;
        width: 36px;
        height: 36px;
    }
}

/* Button sizes, so theme padding / radius / min-height can't change them. */
#kgw-root .kgw-cta {
    width: 100%;
    min-height: 58px;
    padding: 0 16px;
    border-radius: 16px;
    font-size: 19px;
}
#kgw-root .kgw-btn {
    min-height: 50px;
    padding: 0 22px;
    border-radius: 13px;
    font-size: 16px;
}
#kgw-root .kgw-exit-btns button {
    width: 100%;
    min-height: 0;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
}
@media (max-width: 520px) {
    #kgw-root .kgw-cta {
        min-height: 50px;
        border-radius: 14px;
        font-size: 16px;
    }
    #kgw-root .kgw-btn {
        min-height: 44px;
        padding: 0 14px;
        border-radius: 11px;
        font-size: 14px;
    }
}
