/* Pulse Kit preset converter -- uses the studio tokens from studio.css. */

/* Pulse Kit content is view-only. Controls stay fully interactive; only text
   selection is disabled, and inline guards handle copy/right-click. */
#pulse-kit-view {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
#pulse-kit-view input,
#pulse-kit-view textarea,
#pulse-kit-view select,
#pulse-kit-view [contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.page-head { width: 100%; max-width: 100%; gap: 8px; }
.page-desc,
.preset-desc {
    max-width: 100%;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.86rem;
    line-height: 1.6;
}
.pulse-preset {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.preset-head { display: flex; flex-direction: column; gap: 8px; }
.preset-title { font-size: 1.15rem; font-weight: 600; color: #fff; }
.preset-locks { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-lock {
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.45);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}
.preset-lock strong { color: #fff; font-weight: 600; margin-left: 5px; }
.pulse-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pulse-options .option-label { display: block; margin-bottom: 8px; }
.pulse-options .select:disabled {
    opacity: 1;
    color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    cursor: not-allowed;
}
.pulse-options .select:disabled + .select-arrow { opacity: 0.35; }
.preset-hint { margin-top: 6px; color: rgba(255,255,255,0.35); font-size: 0.68rem; letter-spacing: 0.04em; }
#pulseDownload { display: inline-flex; align-items: center; justify-content: center; }
#pulseDropzone {
    border: 1.5px dashed rgba(244, 114, 182, 0.45);
    background: rgba(244, 114, 182, 0.04);
}
#pulseDropzone:hover,
#pulseDropzone.dragover,
#pulseDropzone.is-dragover {
    border-color: rgba(244, 114, 182, 0.72);
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.1) 0%, rgba(190, 24, 93, 0.05) 100%);
    box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.12);
}
#pulseDropzone:hover .dropzone-icon,
#pulseDropzone.dragover .dropzone-icon,
#pulseDropzone.is-dragover .dropzone-icon { color: #f9a8d4; }
.pulse-preset .convert-done { flex-wrap: wrap; }
.batch-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
}
.batch-downloads[hidden] { display: none; }
.batch-downloads a.done-save { text-decoration: none; }

/* ---------- Pulse Kit editorial guides ---------- */
.pulse-editorial {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.editorial-section {
    background: #0e121a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: clamp(20px, 3vw, 28px);
    margin: 0 0 32px;
    scroll-margin-top: 24px;
}
.editorial-kicker {
    display: block;
    margin-bottom: 10px;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #93c5fd;
}
.editorial-title {
    margin: 0 0 18px;
    color: #f1f5f9;
    font-size: 1.3rem;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.editorial-body {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.65;
}
/* Text below each heading uses the whole card width instead of a narrow
   centered measure that left unused space on the right. */
.editorial-body,
.editorial-body p,
.editorial-list,
.editorial-list li {
    width: 100%;
    max-width: none;
}
.editorial-body p { margin: 0 0 14px; }
.editorial-body p:last-child { margin-bottom: 0; }
.editorial-body code {
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    font-size: 0.82em;
}
.editorial-list {
    margin: 18px 0 0;
    padding-left: 18px;
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.65;
}
.editorial-list li { margin-bottom: 10px; }
.editorial-list li::marker { color: #93c5fd; }
.editorial-list strong { color: #f1f5f9; font-weight: 600; }
.faq-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
    margin-top: 18px;
}
/* Three remaining answers: fill each row cleanly instead of orphaning one. */
@media (max-width: 900px) {
    .faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .faq-grid .faq-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .faq-grid { grid-template-columns: 1fr; }
    .faq-grid .faq-card:last-child { grid-column: auto; }
}
.faq-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px;
}
.faq-card summary {
    color: #f1f5f9;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
    cursor: pointer;
    list-style: none;
}
.faq-card summary::-webkit-details-marker { display: none; }
.faq-card summary::before {
    content: "+";
    display: inline-block;
    width: 18px;
    color: #93c5fd;
    font-weight: 700;
}
.faq-card[open] summary::before { content: "-"; }
.faq-card p {
    width: auto;
    max-width: none;
    margin: 14px 0 0 18px;
    color: #94a3b8;
    font-size: 0.86rem;
    line-height: 1.65;
}

/* ---------- Pulse Kit ad containers ---------- */
.pulse-ad {
    margin: 32px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: #0e121a;
    padding: 14px;
}
.pulse-ad[hidden],
.pulse-ad.is-ads-disabled { display: none !important; }
.pulse-ad .ad-label {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.38);
    text-transform: none;
}
.pulse-ad .ad-reserve {
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}
.pulse-ad .ad-reserve ins {
    display: block;
    width: 100%;
    min-height: 0;
}
.pulse-ad[data-ad-type="display"] .ad-reserve { min-height: 100px; }
.pulse-ad[data-ad-format="rectangle"] {
    width: 100%;
    max-width: 340px;
    align-self: center;
}
.pulse-ad[data-ad-type="video"] {
    width: 100%;
    max-width: 720px;
    align-self: center;
}
.pulse-ad[data-ad-type="video"] .ad-reserve { aspect-ratio: 16 / 9; }
.pulse-ad[data-ad-type="video"] .ad-reserve ins { height: 100%; }

/* Full-width compact video banners: below the intro, below the converter, and
   above the footer. All share the dark card treatment of the guide cards. */
#pulse-video-ad-banner-intro,
#pulse-video-ad-banner-top,
#pulse-video-ad-banner {
    position: relative;
    width: 100%;
    max-width: none;
    padding: 10px 14px;
    overflow: hidden;
    align-self: stretch;
}
#pulse-video-ad-banner-intro,
#pulse-video-ad-banner-top { margin: 14px 0; }
#pulse-video-ad-banner { margin: 20px 0 12px; }
#pulse-video-ad-banner-intro .ad-label,
#pulse-video-ad-banner-top .ad-label,
#pulse-video-ad-banner .ad-label {
    margin-bottom: 6px;
    font-size: 0.58rem;
}
#pulse-video-ad-banner-intro .ad-reserve,
#pulse-video-ad-banner-top .ad-reserve,
#pulse-video-ad-banner .ad-reserve {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: auto;
    border: 1px solid rgba(255, 255, 255, 0.04);
}
#pulse-video-ad-banner-intro .ad-reserve,
#pulse-video-ad-banner-top .ad-reserve { height: clamp(84px, 8vw, 100px); }
#pulse-video-ad-banner .ad-reserve { height: clamp(84px, 10vw, 110px); }

/* With Ads ON, the visible banners own the vertical rhythm and supply their
   own 14px buffers. With Ads OFF those slots have no margins, so restore a
   compact flex gap to keep the header, converter and guides from touching. */
.tab-panel[data-panel="pulse-kit"] .page-shell { gap: 0; }
html[data-ads-enabled="0"] .tab-panel[data-panel="pulse-kit"] .page-shell {
    gap: 32px;
}
.tab-panel[data-panel="pulse-kit"] .page-head {
    margin-bottom: 0;
}
/* The banner supplies its own 20px top gap; drop the FAQ's section margin. */
#pulse-faq {
    margin-bottom: 0;
}

/* Pulse Kit only: keep the handoff from the banner to the footer tight. */
.tab-panel[data-panel="pulse-kit"] {
    padding-bottom: 0;
}
.site-footer {
    margin-top: 8px;
    padding-top: 18px;
}
/* Keep the reduced Pulse footer row tidy without duplicating the sidebar. */
.site-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
#pulse-video-ad-banner-intro .ad-placeholder,
#pulse-video-ad-banner-top .ad-placeholder,
#pulse-video-ad-banner .ad-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.26);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    pointer-events: none;
}
#pulse-video-ad-banner-intro .ad-reserve ins,
#pulse-video-ad-banner-top .ad-reserve ins,
#pulse-video-ad-banner .ad-reserve ins {
    position: relative;
    z-index: 1;
}
