﻿/* صفحه پرامپت؛ روی ph.css ساخته شده (توکن‌ها و کارت/چیپ/ردیف مشترک). پیشوند کلاس‌ها pp- است */

/* ---------- بالای صفحه ---------- */
.pp-main {
    display: grid;
    grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    padding-top: 8px;
}

.pp-media {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pp-cover {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 26px;
    background: #e3e7ee;
    box-shadow: 0 24px 50px -24px rgba(15, 23, 43, .45);
}

    .pp-cover img {
        width: 100%;
        height: auto;
        max-height: 620px;
        object-fit: cover;
    }

.pp-tested {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 14px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .94);
    color: var(--ph-teal-ink);
    font-size: 12.5px;
    font-weight: bold;
    box-shadow: 0 6px 16px rgba(15, 23, 43, .18);
}

    .pp-tested .ph-ico {
        width: 16px;
        height: 16px;
        stroke-width: 2.6;
    }

.pp-facts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 8px 16px;
    list-style: none;
    border-radius: var(--ph-r-md);
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
}

    .pp-facts li {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 7px 0;
        font-size: 13.5px;
        color: var(--ph-ink-2);
    }

        .pp-facts li + li {
            border-top: 1px dashed var(--ph-line);
        }

    .pp-facts .ph-ico {
        width: 18px;
        height: 18px;
        color: var(--ph-teal);
    }

.pp-share {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ph-muted);
}

    .pp-share span {
        margin-left: auto;
    }

    .pp-share a,
    .pp-share button {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border-radius: 12px;
        background: var(--ph-card);
        border: 1px solid var(--ph-line);
        color: var(--ph-ink-2);
        cursor: pointer;
        transition: border-color .15s;
    }

        .pp-share a:hover,
        .pp-share button:hover {
            border-color: var(--ph-teal);
        }

    .pp-share img {
        width: 20px;
        height: 20px;
        object-fit: contain;
    }

    .pp-share .ph-ico {
        width: 18px;
        height: 18px;
    }

/* ستون محتوا */
.pp-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.pp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .pp-tags .ph-chip {
        font-size: 13px;
        padding: 4px 13px;
    }

.pp-chip-gender {
    background: var(--ph-teal-soft) !important;
    border-color: transparent !important;
    color: var(--ph-teal-ink) !important;
}

    .pp-chip-gender img {
        width: 16px;
        height: 16px;
        object-fit: contain;
    }

.pp-body h1 {
    font-size: 32px;
    font-weight: bold;
    line-height: 1.45;
}

.pp-subtitle {
    margin: -8px 0 0;
    color: var(--ph-muted);
    font-size: 16px;
    line-height: 1.9;
}

.pp-desc {
    padding: 16px 18px;
    border-radius: var(--ph-r-md);
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
    font-size: 14px;
    line-height: 2;
    color: #3b475c;
}

    .pp-desc h3 {
        margin-bottom: 4px;
        font-size: 14px;
        font-weight: bold;
        color: var(--ph-ink);
    }

    .pp-desc p {
        margin: 0 0 6px;
    }

        .pp-desc p:last-child {
            margin-bottom: 0;
        }

/* پنل ساخت عکس: سربرگ تیره + پنل pmg با رنگ‌های برند */
.pp-gen {
    border-radius: var(--ph-r-lg);
    background: var(--ph-card);
    box-shadow: 0 1px 2px rgba(15, 23, 43, .06), 0 20px 50px -24px rgba(15, 23, 43, .35);
    scroll-margin-top: 20px;
}

.pp-gen-head {
    padding: 20px 22px 18px;
    border-radius: var(--ph-r-lg) var(--ph-r-lg) 0 0;
    background: radial-gradient(420px 160px at 10% 0%, rgba(0, 172, 148, .3), transparent 70%), var(--ph-ink);
    color: #fff;
}

    .pp-gen-head h2 {
        font-size: 21px;
        font-weight: bold;
        color: #fff;
    }

    .pp-gen-head p {
        margin: 4px 0 0;
        font-size: 13.5px;
        color: #b7c2d6;
        line-height: 1.9;
    }

.pp .pmg {
    --pmg-accent: #00806e;
    --pmg-accent-soft: #e2f5f1;
    border: 1px solid var(--ph-line);
    border-top: 0;
    border-radius: 0 0 var(--ph-r-lg) var(--ph-r-lg);
    box-shadow: none;
}

.pp .pmg-num {
    background: var(--ph-teal);
}

.pp .pmg-btn {
    height: 56px;
    background: linear-gradient(135deg, #00b49b, #00806e);
    font-size: 16.5px;
    box-shadow: 0 10px 24px -10px rgba(0, 128, 110, .7);
}

.pp .pmg-cta {
    border-radius: 0 0 var(--ph-r-lg) var(--ph-r-lg);
}

/* راه‌های دیگر */
.pp-alt {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pp-alt-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    border-radius: var(--ph-r-md);
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
    transition: border-color .15s;
}

    .pp-alt-card:hover {
        border-color: var(--ph-teal);
    }

    .pp-alt-card b {
        display: block;
        font-size: 14px;
        color: var(--ph-ink);
    }

    .pp-alt-card small {
        display: block;
        margin-top: 2px;
        font-size: 12.5px;
        line-height: 1.8;
        color: var(--ph-muted);
    }

.pp-alt-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--ph-teal-soft);
    color: var(--ph-teal-ink);
}

/* ---------- متن پرامپت ---------- */
.pp-prompt {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 48px;
    scroll-margin-top: 20px;
}

.pp-prompt--single {
    grid-template-columns: 1fr;
}

.pp-code,
.pp-translate {
    min-width: 0;
    padding: 22px 24px;
    border-radius: var(--ph-r-lg);
    scroll-margin-top: 20px;
}

.pp-code,
.pp #myPrompt.pp-code {
    margin: 0;
    background: var(--ph-ink);
    color: #dfe6f2;
    border: 0;
    box-shadow: 0 20px 50px -30px rgba(15, 23, 43, .6);
    direction: ltr;
}

    .pp #myPrompt.pp-code[style*="rtl"] {
        direction: rtl;
    }

.pp-translate {
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
}

.pp-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    direction: rtl;
}

    .pp-block-head h2 {
        font-size: 18px;
        font-weight: bold;
    }

.pp-code .pp-block-head h2 {
    color: #fff;
}

/* کپی کم‌رنگ؛ عمداً جلوی چشم نیست */
.pp-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    background: transparent;
    color: #8f9bb3;
    font-family: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

    .pp-copy:hover {
        color: #dfe6f2;
        border-color: rgba(255, 255, 255, .3);
    }

    .pp-copy .ph-ico {
        width: 15px;
        height: 15px;
    }

#myPromptForCopy {
    margin-top: 0;
    font-size: 14.5px;
    line-height: 2;
    text-align: left;
}

.pp-code[style*="rtl"] #myPromptForCopy {
    text-align: right;
}

.pp #myPromptForCopy p {
    margin: 0 0 8px;
    font-size: 14.5px;
}

#myPromptForCopy .prompt-var {
    color: #6ee7d3;
    font-weight: bold;
}

.pp-note {
    margin: -6px 0 12px;
    font-size: 12.5px;
    color: var(--ph-muted);
}

.pp-translate-text {
    font-size: 14.5px;
    line-height: 2.1;
    color: #3b475c;
}

    .pp-translate-text p {
        margin: 0 0 8px;
    }

/* ---------- ابزارها و موضوعات ---------- */
.pp-explore {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pp-explore-box {
    min-width: 0;
    padding: 22px;
    border-radius: var(--ph-r-lg);
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
}

    .pp-explore-box .ph-head {
        margin-bottom: 14px;
    }

        .pp-explore-box .ph-head h2 {
            font-size: 19px;
        }

.pp-tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 8px;
}

.pp-tool {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--ph-line);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    transition: border-color .15s;
}

    .pp-tool:hover {
        border-color: var(--ph-teal);
    }

    .pp-tool img,
    .pp-tool-ph {
        flex: none;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        object-fit: cover;
    }

.pp-tool-ph {
    display: grid;
    place-items: center;
    background: var(--ph-teal-soft);
    color: var(--ph-teal-ink);
}

/* ---------- نظرات ---------- */
.pp-comments {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 16px;
    align-items: start;
}

.pp-comments-list,
.pp-comment-form {
    min-width: 0;
    padding: 22px 24px;
    border-radius: var(--ph-r-lg);
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
}

    .pp-comments-list .numberComment {
        margin: 0 0 6px;
        font-size: 16px;
        font-weight: bold;
        color: var(--ph-ink);
    }

    .pp-comments-list .comment {
        margin: 0;
        padding: 14px 0;
        border-bottom: 1px solid var(--ph-line);
    }

        .pp-comments-list .comment:last-child {
            border-bottom: 0;
        }

    .pp-comments-list .commentName {
        float: none;
        font-weight: bold;
        font-size: 14px;
        color: var(--ph-ink);
    }

    .pp-comments-list .commentMeta {
        float: none;
        margin-right: 8px;
        color: var(--ph-muted);
    }

    .pp-comments-list .clear {
        display: none;
    }

    .pp-comments-list .comment p {
        margin-top: 4px;
        text-align: right;
        color: #3b475c;
    }

    .pp-comments-list .replyComment {
        margin-top: 10px;
        padding-right: 14px;
        border-right: 3px solid var(--ph-teal-soft);
    }

        .pp-comments-list .replyComment .comment {
            float: none;
            width: auto;
            padding: 10px 12px;
            border-radius: 12px;
            background: var(--ph-paper);
            border: 0;
        }

.pp-comment-form h2 {
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: bold;
}

.pp-comment-form form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

    .pp-field i {
        font-style: normal;
        color: #c2303a;
    }

    .pp-field textarea,
    .pp-field input {
        width: 100%;
        padding: 12px 14px;
        border-radius: 14px;
        border: 1.5px solid var(--ph-line);
        background: #fff;
        font-family: inherit;
        font-size: 14px;
        color: var(--ph-ink);
        resize: vertical;
        transition: border-color .15s, box-shadow .15s;
    }

        .pp-field textarea:focus,
        .pp-field input:focus {
            outline: none;
            border-color: var(--ph-teal);
            box-shadow: 0 0 0 4px rgba(0, 172, 148, .14);
        }

.pp-submit {
    align-self: flex-start;
    height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 12px;
    background: var(--ph-ink);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

/* ---------- نوار پایین موبایل ---------- */
.pp-mbar {
    display: none;
}

/* ---------- تبلت ---------- */
@media (max-width: 1080px) {
    .pp-main {
        grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
        gap: 24px;
    }

    .pp-prompt,
    .pp-explore,
    .pp-comments {
        grid-template-columns: 1fr;
    }
}

/* ---------- موبایل ---------- */
@media (max-width: 800px) {
    .pp-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    /* عکس سر جایش می‌ماند ولی مشخصات و اشتراک‌گذاری بعد از بخش ساخت عکس می‌آیند */
    .pp-media {
        display: contents;
    }

    .pp-facts,
    .pp-share {
        order: 1;
    }

    .pp-cover img {
        max-height: 520px;
    }

    .pp-facts {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 14px;
        padding: 10px 14px;
    }

        .pp-facts li {
            padding: 0;
            font-size: 12.5px;
        }

            .pp-facts li + li {
                border-top: 0;
            }

    /* عنوان و برچسب‌ها بالای عکس می‌آیند */
    .pp-body {
        display: contents;
    }

    .pp-tags { order: -3; }
    .pp-body h1 { order: -2; font-size: 23px; }
    .pp-subtitle { order: -1; margin-top: -12px; font-size: 14px; }

    .pp-alt {
        grid-template-columns: 1fr;
    }

    .pp-code,
    .pp-translate,
    .pp-explore-box,
    .pp-comments-list,
    .pp-comment-form {
        padding: 18px 16px;
    }

    .pp-gen-head {
        padding: 16px;
    }

    .pp-mbar {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 90;
        display: flex;
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, .96);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--ph-line);
        box-shadow: 0 -10px 30px -18px rgba(15, 23, 43, .4);
        transform: translateY(110%);
        transition: transform .25s ease;
        direction: rtl;
        font-family: IRANSans, Tahoma, sans-serif;
    }

        .pp-mbar.is-on {
            transform: none;
        }

    /* جای نوار پایین تا انتهای فوتر زیرش نماند */
    body:has(#ppMbar) {
        padding-bottom: 72px;
    }

    .pp-mbar-go {
        flex: 1;
        height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border-radius: 14px;
        font-family: inherit;
        font-size: 14px;
        font-weight: bold;
        text-decoration: none;
    }

    .pp-mbar .pp-mbar-go {
        flex: 1.4;
        background: linear-gradient(135deg, #00b49b, #00806e);
        color: #fff;
    }

        .pp-mbar-go svg {
            width: 16px;
            height: 16px;
            fill: currentColor;
        }
}

@media (prefers-reduced-motion: reduce) {
    .pp-mbar {
        transition: none;
    }
}

/* کارت اپلیکیشن زیر پنل ساخت عکس */
.pp-alt-card--app .pp-alt-ico {
    background: #e8f6ee;
    color: #23804a;
}

.pp-alt-card--app:hover {
    border-color: #34b26a;
}

/* پیام فرم نظر */
.pp-form-msg {
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fdecee;
    color: #c2303a;
    font-size: 13px;
}

    .pp-form-msg.is-ok {
        background: var(--ph-teal-soft);
        color: var(--ph-teal-ink);
    }

    .pp-form-msg[hidden] {
        display: none;
    }

.pp-submit:disabled {
    opacity: .6;
    cursor: wait;
}

/* راهنمای کیفیت با رنگ برند؛ اگر کیفیت بالاتر انتخاب شود کهربایی می‌شود */
.pp .pmg-hint {
    background: var(--ph-paper);
    border-color: var(--ph-line);
    color: #3b475c;
}

    .pp .pmg-hint .pmg-hint-icon {
        color: var(--ph-teal-ink);
    }

.pp .pmg-hint.is-active {
    background: #fff7ec;
    border-color: #f5dcb5;
    color: #7a4f12;
}

    .pp .pmg-hint.is-active .pmg-hint-icon {
        color: #c27c1a;
    }

/* ---------- پرامپت ویدیویی صفحه پرامپت (#video) ---------- */
.pp-video {
    display: grid;
    grid-template-columns: 210px 1fr;
    align-items: start;
    gap: 24px;
    margin-top: 48px;
    padding: 20px;
    border-radius: var(--ph-r-lg, 26px);
    background: linear-gradient(135deg, #eef0ff, #fff 55%);
    border: 1px solid var(--ph-line, #e2e7f0);
    scroll-margin-top: 90px;
}

.pp-video-media {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 18px;
    overflow: hidden;
    background: #0f172b;
}

    .pp-video-media video, .pp-video-media img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top;
    }

.pp-video-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 43, .25);
}

    .pp-video-play svg {
        width: 54px;
        height: 54px;
        padding: 14px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .92);
        fill: #4f46e5;
    }

.pp-video-kicker {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 99px;
    background: #4f46e5;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.pp-video-body h2 {
    margin: 10px 0 6px;
    font-size: 21px;
}

.pp-video-lead {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.9;
    color: #5a6880;
}

.pp-video-text {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-right: 3px solid #4f46e5;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    line-height: 2;
    color: #0f172b;
}

.pp-video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 0;
}

    .pp-video-meta span {
        padding: 3px 10px;
        border-radius: 99px;
        background: #fff;
        border: 1px solid var(--ph-line, #e2e7f0);
        font-size: 12px;
        color: #334155;
    }

    .pp-video-meta .pp-video-price {
        background: #4f46e5;
        border-color: #4f46e5;
        color: #fff;
        font-weight: bold;
    }

.pp-video-state {
    margin-top: 16px;
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--ph-line, #e2e7f0);
}

    .pp-video-state p {
        margin: 0 0 10px;
        font-size: 13.5px;
        line-height: 1.9;
    }

.pp-video-state--need {
    background: #fff8eb;
    border-color: #fde7b0;
}

.pp-video .pp-video-btn {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: #0f172b;
    color: #fff;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

    .pp-video .pp-video-btn:hover {
        color: #fff;
        opacity: .92;
    }

.pp-video-shots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 110px));
    gap: 10px;
}

.pp-video-shot {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 0 0 1px var(--ph-line, #e2e7f0);
}

    .pp-video-shot img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top;
        transition: transform .3s;
    }

    .pp-video-shot span {
        position: absolute;
        inset: auto 0 0 0;
        padding: 5px 0;
        background: rgba(79, 70, 229, .92);
        color: #fff;
        font-size: 11.5px;
        font-weight: bold;
        text-align: center;
    }

    .pp-video-shot:hover img {
        transform: scale(1.05);
    }

@media (max-width: 700px) {
    .pp-video {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .pp-video-media {
        max-width: 240px;
        margin: 0 auto;
    }
}

.pp-video-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pp-video .pp-video-btn--ghost,
.pp-video .pp-video-btn--ghost:hover {
    background: #fff;
    color: #0f172b;
    box-shadow: inset 0 0 0 1.5px #0f172b;
}


.pp-video-other {
    margin: 12px 0 0 !important;
    padding-top: 10px;
    border-top: 1px dashed var(--ph-line, #e2e7f0);
    font-size: 13px !important;
    color: #5a6880;
}

    .pp-video-other a {
        color: #4f46e5;
        font-weight: bold;
    }
