/* Product-page "Try the demo" (dev.onlineshop.fyi, DEV-COMBINE-SPEC.md).
   Defines the Studio palette on .ps-demo itself, so the Studio styles work outside
   the homepage hero (on the homepage they came from `.fp-stage #hero:has(.nds)`). */

.ps-demo {
    --studio-ice: #b7d7ff;
    --studio-light: #edf5ff;
    --studio-muted: #a5b7d1;
    --studio-line: #35496d;
    --studio-surface: #101b31;
    --studio-accent: #8abaff;
    --studio-panel: linear-gradient(160deg, rgba(27, 44, 79, .96), rgba(9, 16, 30, .97) 62%);
    --studio-rim: linear-gradient(140deg, rgba(138, 186, 255, .55), rgba(138, 186, 255, .06) 40%, rgba(99, 102, 241, .35));
    --studio-radius: 1.15rem;
    clear: both;
    margin: 2.5rem 0;
    padding: clamp(1.1rem, 3vw, 2.25rem);
    border-radius: 1.4rem;
    color: var(--studio-light);
    background: radial-gradient(120% 80% at 85% 0%, rgba(56, 126, 255, .18), transparent 60%), #070d19;
    box-shadow: 0 2rem 5rem rgba(1, 5, 12, .45);
    scroll-margin-top: 6rem;
    text-align: start;
}
.ps-demo :is(h2, h3, h4, strong, legend) { color: var(--studio-light); }
/* light sample stores (Studio storefront, settings-map demo): keep their own dark text */
.ps-demo :is(.nds-store, .nds-map-demo) :is(h2, h3, h4, strong, legend) { color: inherit; }
/* ProductTemplate.Simple: the product form wraps only .overview; keep the original layout */
.product-essential > #product-details-form { display: contents; }
.ps-head { max-width: 62ch; margin-bottom: 1.4rem; }
.ps-head h2 { margin: .2rem 0 .5rem; font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.1; }
.ps-head p { color: var(--studio-muted); margin: 0; }
.ps-kicker { letter-spacing: .16em; text-transform: uppercase; font-size: .75rem; color: var(--studio-ice); }
.ps-badge { display: inline-block; margin-bottom: .4rem; padding: .25rem .65rem; border-radius: 2rem; font-size: .75rem; font-weight: 700; color: #06101f; background: #ffd08a; }

.ps-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.25rem; align-items: start; }
.ps-panel {
    padding: clamp(.9rem, 2vw, 1.3rem);
    border: 1px solid transparent;
    border-radius: var(--studio-radius);
    background: var(--studio-panel) padding-box, var(--studio-rim) border-box;
    box-shadow: 0 1.2rem 3rem rgba(1, 5, 12, .5);
}
.ps-editor { display: grid; gap: .75rem; }
.ps-editor h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.ps-editor label { display: grid; gap: .3rem; font-size: .85rem; color: var(--studio-muted); }
.ps-editor .ps-check { display: flex; align-items: center; gap: .5rem; }
.ps-editor :is(input:not([type=checkbox]):not([type=color]), select) {
    min-height: 2.4rem; padding: .4rem .6rem; border-radius: .6rem;
    color: var(--studio-light); background: rgba(4, 9, 18, .6); border: 1px solid var(--studio-line);
}
.ps-editor input[type=color] { width: 100%; height: 2.4rem; border-radius: .6rem; border: 1px solid var(--studio-line); background: transparent; }
.ps-editor :is(input, select):focus-visible { outline: 2px solid var(--studio-accent); outline-offset: 1px; }

.ps-btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 2.6rem; padding: .5rem 1rem;
    border-radius: .7rem; font-weight: 600; text-decoration: none; cursor: pointer;
    color: var(--studio-light); background: rgba(138, 186, 255, .08); border: 1px solid var(--studio-line);
}
.ps-btn:hover { background: rgba(138, 186, 255, .16); }
.ps-btn:focus-visible { outline: 2px solid var(--studio-accent); outline-offset: 2px; }
.ps-btn-primary { color: #06101f; background: linear-gradient(180deg, #fff, var(--studio-ice)); border-color: transparent; box-shadow: 0 .5rem 1.4rem rgba(138, 186, 255, .3); }
.ps-btn-primary:hover { background: #fff; }
.ps-btn[aria-pressed=true] { color: #06101f; background: var(--studio-ice); border-color: transparent; }

/* Mega Menu page: the real Mega Menu 5 frame replaces the Studio's sample storefront */
.ps-demo .nds-store { transition: none; }
.ps-demo [data-context=product] .nds-store { display: none; }
.mm-real { display: grid; gap: .5rem; }
.mm-real-note { margin: 0; font-size: .8rem; color: var(--studio-muted); }
.mm-real iframe {
    display: block; width: 100%; height: 560px; margin-inline: auto; border: 0; border-radius: .85rem;
    background: #fff; box-shadow: 0 0 0 1px rgba(160, 198, 255, .45), 0 1rem 2.4rem rgba(1, 5, 12, .5);
    transition: width .35s ease, height .35s ease;
}
/* Desktop: product-studio.js renders the frame at 1024 x 720 and scales it into .mm-real-box (sets its height) */
.mm-real[data-device=desktop] .mm-real-box {
    height: 560px; overflow: hidden; border-radius: .85rem; background: #fff;
    box-shadow: 0 0 0 1px rgba(160, 198, 255, .45), 0 1rem 2.4rem rgba(1, 5, 12, .5);
}
.mm-real[data-device=desktop] iframe { transform-origin: 0 0; border-radius: 0; box-shadow: none; transition: none; }
.mm-real[data-device=mobile] iframe { width: 390px; max-width: 100%; height: 720px; border-radius: 1.6rem; box-shadow: 0 0 0 8px #2b3445, 0 1rem 2.4rem rgba(1, 5, 12, .5); }
.ps-demo .nds-map { margin-top: 2rem; min-height: 0; }

/* Studio sample storefront in Mobile mode (nopFullPage page) */
.nds-store[data-device=mobile] { width: min(100%, 360px); margin-inline: auto; }
.nds-store[data-device=mobile] .nds-categories { grid-template-columns: 1fr; }

/* Anything Slider */
.ps-slider { display: grid; gap: .7rem; }
.ps-slide {
    min-height: clamp(12rem, 24vw, 21rem); display: grid; align-content: center; padding: clamp(1.2rem, 3vw, 2.4rem);
    border-radius: .85rem; color: #fff; background: #1c3452 center / cover no-repeat;
    font: 700 clamp(1.4rem, 2.8vw, 2.6rem) / 1.15 inherit; overflow-wrap: anywhere; text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.ps-playback { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; color: var(--studio-muted); font-size: .85rem; }

/* nopFullPage */
.ps-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.ps-editors { min-width: 0; }
.ps-editors .nds { display: block; }
.ps-preview-label { margin: 0 0 .7rem; display: flex; justify-content: space-between; gap: 1rem; color: var(--studio-muted); font-size: .85rem; }
.ps-sections { display: grid; gap: .6rem; }
.ps-section { border-radius: .7rem; overflow: hidden; }
.ps-hero, .ps-collection { display: grid; gap: .3rem; padding: 1.3rem; color: #182238; background: #edf2fb; }
.ps-hero strong { color: #182238; font-size: clamp(1.2rem, 2.2vw, 1.8rem); }
.ps-collection strong { color: #182238; }
.ps-collection span, .ps-hero small { color: #4a5a76; }
.ps-sections[data-transition=fade] .ps-section { animation: ps-fade .5s ease both; }
@keyframes ps-fade { from { opacity: .3; } }

/* nopMegaApp phone */
.ps-phone-stage { display: grid; place-items: center; }
.ps-phone {
    --app-accent: #4ab2f1;
    position: relative; width: min(100%, 340px); aspect-ratio: 9 / 19; display: grid; grid-template-rows: auto 1fr auto;
    border: 10px solid #222b3a; border-radius: 2.4rem; overflow: hidden; color: #15223a; background: #f5f8fc;
    box-shadow: 0 1.4rem 3rem rgba(1, 5, 12, .55);
}
.ps-phone-notch { position: absolute; top: 6px; left: 50%; width: 34%; height: 18px; transform: translateX(-50%); border-radius: 1rem; background: #222b3a; }
.ps-phone header { padding: 2rem 1rem .8rem; font-weight: 700; color: #15223a; border-bottom: 4px solid var(--app-accent); overflow-wrap: anywhere; }
.ps-phone section { padding: 1.1rem; overflow: auto; }
.ps-phone section h4 { margin: 0 0 .7rem; color: #15223a; }
.ps-phone section ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.ps-phone section li { padding: .7rem .8rem; border-radius: .7rem; background: #fff; box-shadow: 0 1px 0 #dbe4f2; }
.ps-phone nav { display: flex; gap: .3rem; padding: .6rem; background: #e3eafa; }
.ps-phone nav button { flex: 1; min-height: 2.6rem; border: 0; border-radius: .7rem; font-weight: 600; color: #15223a; background: transparent; }
.ps-phone nav button[aria-pressed=true] { color: #fff; background: var(--app-accent); }

/* Endings */
.ps-endings {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .8rem 1.2rem;
    margin-top: 1.4rem; padding: 1.1rem 1.2rem; border-radius: 1rem;
    background: linear-gradient(120deg, rgba(56, 126, 255, .2), rgba(99, 102, 241, .14)); border: 1px solid rgba(138, 186, 255, .38);
}
.ps-endings-copy { display: grid; gap: .2rem; }
.ps-endings-copy small { color: var(--studio-muted); }
.ps-endings-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.ps-status { grid-column: 1 / -1; margin: 0; font-size: .85rem; color: var(--studio-ice); }
.ps-status:empty { display: none; }
.license-selection li.is-current { outline: 2px solid var(--accent-primary, #38bdf8); outline-offset: 3px; border-radius: .4rem; }

@media (max-width: 991px) {
    .ps-grid { grid-template-columns: minmax(0, 1fr); }
    .ps-endings { grid-template-columns: minmax(0, 1fr); }
    .ps-endings-actions { justify-content: stretch; }
    .ps-endings-actions > * { flex: 1 1 auto; }
    .mm-real iframe { height: 480px; }
    .mm-real[data-device=desktop] .mm-real-box { height: 420px; }
}
@media (prefers-reduced-motion: reduce) {
    .mm-real iframe { transition: none; }
    .ps-sections[data-transition=fade] .ps-section { animation: none; }
}

.ps-demo-picker .ps-head h3 { margin-block: 0 .4rem; font-size: 1.28rem; }
.ps-demo-picker { scroll-margin-block-start: 7rem; }
.ps-demo-select { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; margin-block: .85rem; }
.ps-demo-select label { color: var(--text-primary); font-weight: 650; }
.ps-demo-select select {
    max-inline-size: 100%;
    min-block-size: 2.75rem;
    border: 1px solid var(--border-hover);
    border-radius: .6rem;
    background: var(--bg-surface-solid);
    color: var(--text-primary);
}
.ps-demo-option[hidden] { display: none; }
.ps-demo-option {
    display: grid;
    gap: 1rem;
    align-items: center;
    padding: .9rem;
    border: 1px solid var(--border-hairline);
    border-radius: .85rem;
    background: var(--bg-surface-solid);
    text-align: start;
}
.ps-demo-info h4 { color: var(--text-primary); font-size: 1.3rem; margin-block: 0 .65rem; }
.ps-demo-options-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-block-start: .85rem; }
@media (min-width: 800px) {
    .ps-demo-option { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
}

.ps-demo-gallery-link { margin-block-start: .85rem; gap: .35rem; }

.ps-demo-picker-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem 1rem; }
.ps-demo-views { display: flex; gap: .35rem; margin-block-end: .4rem; }
.ps-demo-views[hidden] { display: none; }
.ps-demo-image { display: grid; justify-items: center; min-inline-size: 0; }
.ps-demo-image .ps-preview-mobile { display: none; inline-size: min(100%, 15rem); block-size: auto; aspect-ratio: 390 / 740; object-fit: contain; }
.ps-demo-picker[data-preview-device="mobile"] .ps-preview-desktop { display: none; }
.ps-demo-picker[data-preview-device="mobile"] .ps-preview-mobile { display: block; }
.ps-menu-configuration, .ps-menu-design {
    margin-block-start: 1rem;
    padding: 1rem;
    border: 1px solid var(--studio-line);
    border-radius: .8rem;
    background: var(--studio-surface);
}
.ps-menu-configuration fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.ps-menu-configuration legend, .ps-menu-design h4 { margin-block: 0 .55rem; font-size: 1.15rem; font-weight: 650; }
.ps-menu-configuration label, .ps-menu-design label:not([hidden]) { display: block; margin-block-end: .55rem; }
.ps-menu-configuration label[hidden] { display: none; }
.ps-menu-configuration input { accent-color: var(--studio-accent); }
.ps-menu-configuration textarea, .ps-menu-design textarea {
    display: block;
    inline-size: 100%;
    max-inline-size: 40rem;
    margin-block-start: .35rem;
    padding: .55rem .65rem;
    border: 1px solid var(--studio-line);
    border-radius: .5rem;
    background: #080f1d;
    color: var(--studio-light);
    font: inherit;
}
.ps-menu-design p { margin-block: .55rem; color: var(--studio-muted); line-height: 1.55; }
