/* ==========================================================================
   Mobile conversion, shipped 2026-10-15 (behaviour in assets/js/mobile-conv.js,
   loaded by inc/brand-push.php). Reviewed behind ?mp=preview first.
   Design C2, chosen by the owner: the article button's own glass, brand
   gradient and white arrow circle, plus a light orbiting the edge in the
   brand colour. One bar, phones only: on the generator after a prompt, on
   articles after the first screen. The dock is the same glass as the brand
   page sticky TRY NOW, which converts 40% on mobile.
   ========================================================================== */

@property --mp-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.mp-cbar { display: none; }
@media (max-width: 767px) {
    .mp-cbar {
        display: block;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
        padding: 12px 12px calc(14px + env(safe-area-inset-bottom));
        background: rgba(var(--glass-rgb, 28, 28, 30), .78);
        -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
        border-top: 1px solid rgba(255, 255, 255, .08);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, .5);
        transform: translateY(110%);
        transition: transform .32s cubic-bezier(.2, .9, .25, 1);
    }
    .mp-cbar.on { transform: translateY(0); }
    body.mp-cbar-on { padding-bottom: 118px; }
    body.mp-cbar-on .mp-preview-badge { bottom: 126px; }
}

.mp-cbar-go {
    --c: #8b5cf6;
    position: relative; display: block;
    border-radius: 22px; padding: 1.5px;
    color: #fff; text-decoration: none;
    background: conic-gradient(from var(--mp-a),
        color-mix(in srgb, var(--c) 75%, transparent) 0deg,
        color-mix(in srgb, var(--c) 30%, transparent) 80deg,
        color-mix(in srgb, #fff 75%, var(--c)) 180deg,
        color-mix(in srgb, var(--c) 30%, transparent) 280deg,
        color-mix(in srgb, var(--c) 75%, transparent) 360deg);
    box-shadow: 0 16px 38px -16px color-mix(in srgb, var(--c) 95%, transparent);
    animation: mp-orbit 6s linear infinite;
}
@keyframes mp-orbit { to { --mp-a: 360deg; } }
.mp-cbar-go:hover, .mp-cbar-go:focus { color: #fff; text-decoration: none; }
.mp-cbar-go:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.mp-cb-in {
    display: flex; align-items: center; gap: 13px;
    padding: 12px 12px 12px 16px; border-radius: 20.5px;
    background:
        linear-gradient(100deg,
            color-mix(in srgb, var(--c) 15%, transparent) 0%,
            color-mix(in srgb, var(--c) 30%, transparent) 58%,
            color-mix(in srgb, var(--c) 52%, transparent) 100%),
        rgb(22, 22, 25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}
.mp-cb-txt { flex: 1; min-width: 0; }
.mp-cb-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.mp-cb-chip {
    flex: none; font-size: 9.5px; font-weight: 900; letter-spacing: .1em;
    padding: 2px 7px; border-radius: 6px;
    color: #141414; background: color-mix(in srgb, var(--c) 82%, #fff);
}
.mp-cbar-t { font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-cbar-s {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 12.8px; line-height: 1.42; font-style: italic; color: rgba(255, 255, 255, .78);
}
.mp-cb-ar {
    flex: none; width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 19px; font-weight: 700;
    border: 1px solid rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
@media (prefers-reduced-motion: reduce) {
    .mp-cbar { transition: none; }
    .mp-cbar-go { animation: none; }
}

/* Generator guide: the next step lights up from inside the button, one button
   at a time (assets/js/preview.js steps the .mp-lit class every 1.1 s, and the
   light fades out on one while it fades in on the next). CREATE NOW, alone in
   its step, breathes instead. A pseudo-element fading from opacity 0, so there
   is no flash: the buttons' own "transition: all" used to flash a white outline. */
@keyframes mp-glow {
    0%, 100% { opacity: .25; }
    50%      { opacity: 1; }
}
.generator-type-selector.mp-guide .prompt-gen-type-btn,
.generator-category-filters.mp-guide .prompt-gen-category-btn,
.prompt-gen-generate-btn.mp-guide { position: relative; overflow: hidden; }
.generator-type-selector.mp-guide .prompt-gen-type-btn::after,
.generator-category-filters.mp-guide .prompt-gen-category-btn::after,
.prompt-gen-generate-btn.mp-guide::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(120% 150% at 50% 50%, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, .11) 45%, rgba(255, 255, 255, 0) 78%);
    opacity: 0;
    transition: opacity .5s ease;
}
.generator-type-selector.mp-guide .prompt-gen-type-btn.mp-lit::after,
.generator-category-filters.mp-guide .prompt-gen-category-btn.mp-lit::after { opacity: 1; }
.prompt-gen-generate-btn.mp-guide.mp-lit::after { animation: mp-glow 2.2s ease-in-out infinite; }

@keyframes mp-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(3px); }
}
.mp-shake { animation: mp-shake .55s ease both; }

@media (prefers-reduced-motion: reduce) {
    .generator-type-selector.mp-guide .prompt-gen-type-btn::after,
    .generator-category-filters.mp-guide .prompt-gen-category-btn::after,
    .prompt-gen-generate-btn.mp-guide::after { transition: none; animation: none; }
    .prompt-gen-generate-btn.mp-guide.mp-lit::after { opacity: .7; }
    .mp-shake { animation: none; }
}

/* Generator bar, design G1 (chosen by the owner): a "ready" line, the lead
   "Best for this prompt" brand as the big button, the second suggestion beside
   it. Lives in the same .mp-cbar dock as the article bar. */
.mp-g1-k {
    display: flex; align-items: center; gap: 7px; margin: 0 4px 9px;
    font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #9be7b0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-g1-k i {
    flex: none; width: 16px; height: 16px; border-radius: 50%;
    display: grid; place-items: center;
    background: #22c55e; color: #06210f; font-style: normal; font-size: 10px; font-weight: 900;
}
.mp-g1-row { display: flex; gap: 8px; }
.mp-g1-main {
    --c: #8b5cf6;
    flex: 1; min-width: 0;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 56px; padding: 8px 8px 8px 16px; border-radius: 16px;
    color: #fff; text-decoration: none;
    background: var(--c);
    background: linear-gradient(100deg, color-mix(in srgb, var(--c) 30%, #141418), color-mix(in srgb, var(--c) 70%, #141418));
    border: 1px solid color-mix(in srgb, var(--c) 75%, transparent);
    box-shadow: 0 12px 28px -14px color-mix(in srgb, var(--c) 90%, transparent);
}
.mp-g1-l { min-width: 0; line-height: 1.15; }
.mp-g1-l small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; opacity: .82; }
.mp-g1-l b { display: block; font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-g1-ar {
    flex: none; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; font-size: 18px; font-weight: 700;
    border: 1px solid rgba(255, 255, 255, .42); background: rgba(255, 255, 255, .2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.mp-g1-alt {
    --c: #878787;
    flex: none; width: 98px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    border-radius: 16px; color: #fff; text-decoration: none; text-align: center; line-height: 1.2;
    background: rgba(255, 255, 255, .05);
    border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
}
.mp-g1-alt span { font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, .6); }
.mp-g1-alt b { max-width: 88px; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-g1-alt[hidden] { display: none; }
.mp-g1-main:hover, .mp-g1-main:focus, .mp-g1-alt:hover, .mp-g1-alt:focus { color: #fff; text-decoration: none; }
.mp-g1-main:focus-visible, .mp-g1-alt:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
