.ppmi[hidden] { display: none !important; }

.ppmi {
    --ppmi-blue-900: #123f6d;
    --ppmi-blue-800: #1f5f99;
    --ppmi-blue-600: #4a92df;
    --ppmi-blue-400: #80bbee;
    --ppmi-blue-100: #e8f4ff;
    --ppmi-orange: #f59a2f;
    --ppmi-orange-soft: #fff1df;
    --ppmi-surface: #ffffff;
    --ppmi-text: #143b61;
    --ppmi-copy: #5d7690;
    --ppmi-border: #d7e9f8;
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 0;
    direction: rtl;
    font-family: Vazirmatn, sans-serif;
    color: var(--ppmi-text);
    overscroll-behavior: contain;
}

body.ppmi-is-open { overflow: hidden !important; touch-action: none; }

.ppmi *, .ppmi *::before, .ppmi *::after { box-sizing: border-box; }
.ppmi button, .ppmi input { font: inherit; }

.ppmi__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 38, 64, .56);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ppmi__sheet {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    width: min(100%, 520px);
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 92% 7%, rgba(106, 175, 238, .23), transparent 28%),
        radial-gradient(circle at 4% 66%, rgba(245, 154, 47, .13), transparent 25%),
        linear-gradient(180deg, #f5faff 0%, #ffffff 52%, #f7fbff 100%);
    box-shadow: 0 24px 80px rgba(8, 44, 77, .28);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.ppmi__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 10px 20px;
    gap: 16px;
}

.ppmi__brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ppmi-blue-800); font-size: .82rem; font-weight: 900; }
.ppmi__brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #cce4f7; border-radius: 13px; background: rgba(255,255,255,.88); box-shadow: 0 7px 18px rgba(42, 112, 170, .11); }
.ppmi__brand-mark svg { width: 20px; height: 20px; fill: var(--ppmi-blue-600); }

.ppmi__skip {
    min-width: 76px;
    min-height: 44px;
    padding: 8px 14px;
    cursor: pointer;
    touch-action: manipulation;
    border: 1px solid var(--ppmi-border);
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: var(--ppmi-blue-800);
    font-size: .78rem;
    font-weight: 800;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.ppmi__skip:hover, .ppmi__skip:active { background: #fff; border-color: #a9d0ee; color: var(--ppmi-blue-900); }

.ppmi__viewport { flex: 1 0 auto; width: 100%; overflow: hidden; touch-action: pan-y; }
.ppmi__track { display: flex; width: 100%; direction: ltr; transition: transform .32s cubic-bezier(.22,.76,.35,1); will-change: transform; }
.ppmi__slide { flex: 0 0 100%; min-width: 0; padding: 0 18px; direction: rtl; opacity: .72; transition: opacity .22s ease; }
.ppmi__slide.is-active { opacity: 1; }

.ppmi__visual {
    position: relative;
    height: clamp(235px, 37dvh, 330px);
    overflow: hidden;
    border: 1px solid rgba(126, 183, 231, .46);
    border-radius: 30px;
    background: #dceefe;
    box-shadow: 0 18px 42px rgba(28, 93, 146, .16);
}
.ppmi__visual::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(180deg, transparent, rgba(12, 60, 101, .19)); pointer-events: none; }
.ppmi__visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 36%; }
.ppmi__visual-glow { position: absolute; z-index: 1; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.ppmi__visual-glow--one { width: 86px; height: 86px; top: -28px; right: -20px; background: rgba(255,255,255,.42); }
.ppmi__visual-glow--two { width: 54px; height: 54px; bottom: 32px; left: -19px; background: rgba(245,154,47,.25); }
.ppmi__step-badge { position: absolute; z-index: 2; bottom: 14px; right: 14px; display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px; border: 1px solid rgba(255,255,255,.72); border-radius: 999px; background: rgba(16,66,108,.7); color: #fff; font-family: Vazirmatn, sans-serif; font-size: .7rem; font-weight: 800; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }

.ppmi__content { padding: 18px 5px 4px; text-align: center; }
.ppmi__eyebrow { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 6px 12px; border: 1px solid #f6c98f; border-radius: 999px; background: var(--ppmi-orange-soft); color: #a95b0a; font-size: .72rem; font-weight: 900; }
.ppmi__eyebrow svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ppmi__content h2 { margin: 13px 0 8px; color: var(--ppmi-blue-900); font-size: clamp(1.42rem, 6vw, 1.85rem); line-height: 1.55; font-weight: 950; letter-spacing: -.02em; }
.ppmi__content p { max-width: 430px; margin: 0 auto; color: var(--ppmi-copy); font-size: .94rem; line-height: 1.95; font-weight: 600; }
.ppmi__features { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 13px; }
.ppmi__features span { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 10px; border: 1px solid #d9eaf7; border-radius: 999px; background: rgba(255,255,255,.82); color: #426b8f; font-size: .7rem; font-weight: 800; }
.ppmi__features i { width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, var(--ppmi-orange), #ffbd68); box-shadow: 0 0 0 3px #fff1df; }

.ppmi__footer { padding: 10px 20px 16px; }
.ppmi__dots { display: flex; direction: ltr; align-items: center; justify-content: center; gap: 3px; min-height: 44px; }
.ppmi__dot { display: grid; width: 44px; height: 44px; padding: 0; cursor: pointer; place-items: center; touch-action: manipulation; border: 0; background: transparent; }
.ppmi__dot span { display: block; width: 8px; height: 8px; border-radius: 999px; background: #c6d9ea; transition: width .24s ease, background .24s ease; }
.ppmi__dot.is-active span { width: 24px; background: linear-gradient(90deg, var(--ppmi-blue-600), var(--ppmi-orange)); }

.ppmi__remember { display: flex; align-items: center; justify-content: center; min-height: 44px; gap: 9px; cursor: pointer; color: #49677f; font-size: .76rem; font-weight: 750; touch-action: manipulation; }
.ppmi__remember input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.ppmi__checkbox { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border: 2px solid #b8cee0; border-radius: 8px; background: #fff; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.ppmi__checkbox svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .18s ease; }
.ppmi__remember input:checked + .ppmi__checkbox { border-color: var(--ppmi-blue-600); background: var(--ppmi-blue-600); box-shadow: 0 0 0 4px rgba(74,146,223,.14); }
.ppmi__remember input:checked + .ppmi__checkbox svg { opacity: 1; }

.ppmi__actions { display: grid; grid-template-columns: minmax(96px,.72fr) minmax(150px,1.35fr); gap: 10px; margin-top: 10px; }
.ppmi__button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 10px 18px; cursor: pointer; touch-action: manipulation; border-radius: 16px; font-size: .88rem; font-weight: 900; transition: background .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease, box-shadow .2s ease; }
.ppmi__button--primary { border: 1px solid #347fca; background: linear-gradient(135deg, #397fca, #69ace8); color: #fff; box-shadow: 0 11px 22px rgba(48, 123, 194, .22); }
.ppmi__button--primary:hover, .ppmi__button--primary:active { background: linear-gradient(135deg, #2d72bc, #5da1df); box-shadow: 0 8px 16px rgba(48,123,194,.2); }
.ppmi__button--primary svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ppmi__button--secondary { border: 1px solid var(--ppmi-border); background: #fff; color: var(--ppmi-blue-800); }
.ppmi__button--secondary:hover:not(:disabled), .ppmi__button--secondary:active:not(:disabled) { border-color: #b3d5ee; background: #eff7ff; }
.ppmi__button:disabled { cursor: default; opacity: .42; box-shadow: none; }
.ppmi__status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.ppmi button:focus-visible, .ppmi input:focus-visible + .ppmi__checkbox { outline: 3px solid rgba(245,154,47,.72); outline-offset: 3px; }

@media (min-width: 600px) {
    .ppmi { padding: 24px; }
    .ppmi__sheet { min-height: min(820px, calc(100dvh - 48px)); max-height: calc(100dvh - 48px); border: 1px solid rgba(255,255,255,.78); border-radius: 34px; }
}

@media (max-height: 700px) {
    .ppmi__topbar { min-height: 54px; }
    .ppmi__visual { height: clamp(210px, 34dvh, 255px); border-radius: 24px; }
    .ppmi__content { padding-top: 12px; }
    .ppmi__content h2 { margin-top: 9px; font-size: 1.28rem; }
    .ppmi__content p { font-size: .84rem; line-height: 1.75; }
    .ppmi__features { margin-top: 8px; }
    .ppmi__footer { padding-top: 4px; }
    .ppmi__dots { min-height: 36px; }
}

@media (orientation: landscape) and (max-height: 540px) {
    .ppmi { padding: 0; }
    .ppmi__sheet { width: 100%; max-width: 100%; min-height: 100dvh; max-height: 100dvh; border-radius: 0; }
    .ppmi__topbar { min-height: 50px; padding: 6px 18px; }
    .ppmi__slide { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(280px, 1.1fr); align-items: center; gap: 18px; }
    .ppmi__visual { height: calc(100dvh - 128px); min-height: 240px; }
    .ppmi__content { padding: 10px; }
    .ppmi__footer { display: grid; grid-template-columns: auto 1fr minmax(280px, .8fr); align-items: center; gap: 10px; padding: 6px 18px 10px; }
    .ppmi__actions { margin: 0; }
    .ppmi__features { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .ppmi__track, .ppmi__slide, .ppmi__dot span, .ppmi__button, .ppmi__skip, .ppmi__checkbox, .ppmi__checkbox svg { transition-duration: .01ms !important; }
}
