/* Pilot Studios Pricing - frontend (flip phone mockups) */
.psp-pricing {
    --psp-accent: #e11d48;
    --psp-border: #c9a227;
    --psp-shadow: 0 18px 50px rgba(0,0,0,.6);
    background: #000;
    padding: 48px 16px;
    box-sizing: border-box;
    position: relative;
}
.psp-pricing *, .psp-pricing *::before, .psp-pricing *::after { box-sizing: border-box; }

.psp-pricing__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---- Phone shell ---- */
.psp-phone {
    position: relative;
    width: 300px;
    max-width: 88vw;
    aspect-ratio: 300 / 620;
}
.psp-phone__frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    border: 3px solid #1c1c1e;
    border-radius: 42px;
    overflow: hidden;
    box-shadow: var(--psp-shadow, 0 18px 50px rgba(0,0,0,.6));
}
.psp-notch {
    position: absolute;
    top: 10px; left: 50%;
    transform: translateX(-50%);
    width: 110px; height: 22px;
    background: #1c1c1c;
    border-radius: 16px;
    z-index: 6;
}

/* ---- Video fill ---- */
.psp-video {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}
.psp-video--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    padding: 20px;
    background: repeating-linear-gradient(45deg,#0f0f12,#0f0f12 12px,#141418 12px,#141418 24px);
}

/* ---- Showcase phone + side button ---- */
.psp-phone--showcase { display: flex; }
.psp-side-book-wrap {
    position: absolute;
    inset-inline-start: -40px;
    top: 56px;
    z-index: 8;
}
.psp-side-book {
    writing-mode: vertical-rl;
    display: inline-block;
    background: var(--psp-accent);
    color: #fff;
    font-weight: 700;
    letter-spacing: .5px;
    padding: 16px 8px;
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0,0,0,.4);
    transition: background .25s ease, transform .25s ease, filter .25s ease;
}
.psp-side-book:hover {
    background: #16a34a;          /* color shift on hover (red -> green) */
    transform: translateX(-3px) scale(1.04);
    filter: brightness(1.05);
}
[dir="rtl"] .psp-side-book { border-radius: 0 8px 8px 0; }
[dir="rtl"] .psp-side-book:hover { transform: translateX(3px) scale(1.04); }

/* ---- Flip phone ---- */
.psp-phone--flip { -webkit-perspective: 1600px; perspective: 1600px; }
.psp-phone__inner {
    position: relative;
    width: 100%; height: 100%;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transition: -webkit-transform .85s cubic-bezier(.4,.2,.2,1);
    transition: transform .85s cubic-bezier(.4,.2,.2,1);
    border-radius: 42px;
}
.psp-phone--flip:hover .psp-phone__inner,
.psp-phone--flip.is-flipped .psp-phone__inner { -webkit-transform: rotateY(180deg); transform: rotateY(180deg); }
.psp-face {
    position: absolute;
    inset: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 42px;
    /* no overflow:hidden here, or the side "Book here" tab gets clipped */
}
.psp-face--front { -webkit-transform: rotateY(0deg) translateZ(1px); transform: rotateY(0deg) translateZ(1px); }
.psp-face--back { -webkit-transform: rotateY(180deg) translateZ(1px); transform: rotateY(180deg) translateZ(1px); }

/* gradient accent ring on the flip frame */
.psp-phone--flip .psp-phone__frame {
    border: 2px solid transparent;
    background:
        linear-gradient(#0a0a0a,#0a0a0a) padding-box,
        linear-gradient(160deg, var(--psp-border), rgba(255,255,255,.05) 45%, var(--psp-border)) border-box;
}

/* ---- Pricing card (front) ---- */
.psp-card {
    position: absolute;
    inset: 0;
    padding: 40px 24px 24px;
    overflow-y: auto;
    color: #fff;
    display: flex;
    flex-direction: column;
}
.psp-card::-webkit-scrollbar { width: 0; }
.psp-card__eyebrow { margin: 0; font-size: 20px; color: #fff; line-height: 1; }
.psp-card__name { margin: 0 0 14px; font-size: var(--psp-name-size, 34px); max-width: var(--psp-name-width, none); font-weight: 800; line-height: 1.05; }
.psp-card__prefix { margin: 0; color: #6b7280; font-size: 15px; font-weight: 600; }
.psp-card__price { margin: 0 0 16px; font-size: var(--psp-price-size, 46px); max-width: var(--psp-price-width, none); font-weight: 800; line-height: 1; }
.psp-card__currency { font-size: 18px; font-weight: 700; vertical-align: super; margin-right: 2px; color: #fff; }
.psp-card__currency--after { margin-right: 0; margin-left: 6px; vertical-align: baseline; font-size: 22px; }
.psp-card__features { list-style: none; margin: 0; padding: 0; flex: 1; max-width: var(--psp-feat-width, none); }
.psp-card__features li {
    position: relative;
    padding-inline-start: var(--psp-feat-pad-start, 26px);
    padding-bottom: var(--psp-feat-pad-bottom, 10px);
    font-size: var(--psp-feat-size, 14px);
    font-weight: 600;
    color: #e5e7eb;
    line-height: 1.25;
}
.psp-card__features li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0; top: 1px;
    width: 16px; height: 16px;
    background: #22c55e;
    border-radius: 50%;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.5-1.5z'/%3E%3C/svg%3E") center / 12px no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.5-1.5z'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.psp-card__hint {
    margin: 12px 0 0;
    text-align: center;
    font-weight: 700;
    color: #fff;
    opacity: .85;
}

/* ---- Small video preview on the front card ---- */
.psp-card__preview {
    flex: 0 0 auto;
    width: 92px;
    height: 164px;
    margin: 14px auto 0;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.12);
    box-shadow: 0 8px 20px rgba(0,0,0,.5);
}
.psp-preview-video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Back face "Book here" tab (matches the middle phone) ---- */
.psp-side-book-wrap--back { z-index: 9; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

/* ---- Modal ---- */
.psp-modal { position: fixed; inset: 0; z-index: 99999; display: none; }
.psp-modal.is-open { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.psp-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); }
.psp-modal__dialog {
    position: relative;
    max-width: 460px;
    width: calc(100% - 32px);
    margin: 6vh auto;
    background: #111114;
    color: #fff;
    border: 1px solid #26262b;
    border-radius: 16px;
    padding: 28px 26px;
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.psp-modal__close {
    position: absolute; top: 6px; right: 8px;
    width: 40px; height: 40px;
    background: none; border: none; color: #9ca3af;
    font-size: 28px; line-height: 1; cursor: pointer;
}
.psp-modal__title { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.psp-modal__plan { margin: 0 0 16px; color: var(--psp-accent); font-weight: 700; min-height: 1em; }
.psp-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 12px; color: #d1d5db; }
.psp-form input, .psp-form textarea {
    width: 100%; margin-top: 5px;
    background: #1b1b20; border: 1px solid #2e2e35; color: #fff;
    border-radius: 8px; padding: 10px 12px; font-size: 14px;
}
.psp-form input:focus, .psp-form textarea:focus { outline: none; border-color: var(--psp-accent); }
.psp-form__submit {
    width: 100%; margin-top: 4px;
    background: var(--psp-accent); color: #fff;
    border: none; border-radius: 999px;
    padding: 13px; font-weight: 700; font-size: 15px; cursor: pointer;
    transition: filter .2s ease, transform .2s ease;
}
.psp-form__submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.psp-form__submit:disabled { opacity: .6; cursor: default; }
.psp-form__status { margin: 12px 0 0; font-size: 13px; text-align: center; min-height: 1em; }
.psp-form__status.is-error { color: #f87171; }
.psp-form__status.is-ok { color: #34d399; }

/* ---- Mobile / touch ---- */
.psp-pricing { overflow-x: clip; }               /* never let the side tab cause H-scroll */

@media (max-width: 600px) {
    .psp-pricing { padding: 32px 12px; }
    .psp-pricing__row { gap: 52px; }
    /* keep the "Book here" tab on-screen instead of hanging 34px off the left */
    .psp-side-book-wrap,
    .psp-side-book-wrap--back { inset-inline-start: 0; top: 40px; }
    .psp-side-book { border-radius: 0 8px 8px 0; }
    [dir="rtl"] .psp-side-book { border-radius: 8px 0 0 8px; }
}
@media (hover: none) {
    /* No 3D on touch: cross-fade the faces so the back <video> always paints. */
    .psp-phone--flip .psp-phone__inner { -webkit-transform: none !important; transform: none !important; }
    .psp-phone--flip .psp-face {
        -webkit-backface-visibility: visible; backface-visibility: visible;
        -webkit-transform: none; transform: none;
        transition: opacity .3s ease;
    }
    .psp-phone--flip .psp-face--front { opacity: 1; z-index: 2; }
    .psp-phone--flip .psp-face--back  { opacity: 0; z-index: 1; }
    .psp-phone--flip.is-flipped .psp-face--front { opacity: 0; pointer-events: none; z-index: 1; }
    .psp-phone--flip.is-flipped .psp-face--back  { opacity: 1; z-index: 2; }
}

/* ---- Respect reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
    .psp-phone__inner { -webkit-transition: none; transition: none; }
    .psp-side-book, .psp-form__submit { transition: none; }
}

/* Popup extra field */
.psp-extra-wrap span { display: block; margin-bottom: 4px; }

/* Hint: 'Hover to book' on desktop, 'Click to see' on touch */
.psp-hint-tap { display: none; }
@media (hover: none) {
    .psp-hint-hover { display: none; }
    .psp-hint-tap  { display: inline; }
}

/* ---- Price tabs (above the phones) ---- */
.psp-price-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto 34px;
}
.psp-price-tab {
    background: rgba(255,255,255,.06);
    color: #fff;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.psp-price-tab:hover { border-color: var(--psp-accent); transform: translateY(-1px); }
.psp-price-tab.is-active { background: var(--psp-accent); border-color: var(--psp-accent); }
@media (max-width: 600px) {
    .psp-price-tab { padding: 9px 16px; font-size: 14px; }
}

/* Price-tab hint (under the plans) */
.psp-price-hint {
    max-width: 820px;
    margin: 30px auto 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    text-align: left;
    background: rgba(225,29,72,.07);
    border: 1px solid rgba(225,29,72,.5);
    border-radius: 16px;
    padding: 14px 26px;
    color: #f2a9b6;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}
.psp-price-hint__icon {
    flex: 0 0 auto;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--psp-accent);
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 700;
    font-size: 15px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 4px rgba(225,29,72,.15);
}

/* ---- "BEST FOR" card beside a plan ---- */
/* Info icon next to the plan name */
.psp-bestfor-toggle {
    background: #141414;
    color: #fff;
    border: 1px solid var(--psp-accent);
    border-radius: 8px;
    padding: 6px 11px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,0,0,.45);
}
.psp-bestfor-toggle:hover { background: var(--psp-accent); }

/* Best-for popover close button */
.psp-bestfor__close {
    position: absolute;
    top: 4px;
    inset-inline-end: 8px;
    width: 22px; height: 22px;
    background: none; border: none;
    color: #9ca3af; font-size: 19px; line-height: 1; cursor: pointer;
}
.psp-bestfor__close:hover { color: #fff; }

/* Best-for popover (hidden until the info icon is clicked) */
.psp-bestfor {
    position: absolute;
    inset-inline-start: -195px;
    top: 56px;
    width: 170px;
    z-index: 8;
    background: #141414;
    border: 1px solid #262626;
    border-inline-start: 4px solid var(--psp-accent);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 34px rgba(0,0,0,.55);
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.psp-phone.is-info-open .psp-bestfor {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}
@media (max-width: 900px) {
    .psp-bestfor {
        inset-inline-start: 0; inset-inline-end: 0; left: 0; right: 0;
        top: auto; bottom: calc(100% + 10px); width: auto;
        transform: translateY(8px);
    }
    .psp-phone.is-info-open .psp-bestfor { transform: translateY(0); }
}

/* Hide the front preview thumbnail when 'hide poster on phones' is on */
.psp-hide-preview .psp-card__preview { display: none; }
.psp-bestfor__eyebrow {
    display: block;
    color: var(--psp-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.psp-bestfor__text {
    display: block;
    color: #d1d5db;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
}


/* Asterisk after price (points to the tab hint) */
.psp-price-star { color: var(--psp-accent); font-weight: 800; margin-left: 3px; vertical-align: super; font-size: .5em; }

/* Desktop-only sizing overrides */
@media (min-width: 783px) {
    .psp-card__price { font-size: 30px; }
    .psp-card__features li { padding-inline-start: 17px; padding-bottom: 5px; }
    .psp-card__features li::before { height: 7px; }
}
