/* Shared by the browser editor pages (photo, video, vector).
   The editor itself runs in an iframe inside .editor-stage. */

.editor-main {
    padding-top: 28px;
}

.editor-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.editor-hero-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 32px;
    margin-bottom: 20px;
}

.editor-hero-head h1 {
    font-size: clamp(1.7rem, 3.2vw, 2.5rem);
    line-height: 1.15;
    color: var(--text-heading);
    margin: 0 0 8px;
}

.editor-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ff6b6b;
    margin-bottom: 8px;
}

.editor-hero-head p {
    margin: 0;
    max-width: 640px;
    color: var(--text-muted);
    line-height: 1.6;
}

.editor-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.editor-points li {
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    white-space: nowrap;
}

/* ---- Stage: poster before launch, editor after ---- */

.editor-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    height: min(78vh, 820px);
    min-height: 460px;
    border-radius: 14px;
    overflow: hidden;
    background: #262626;
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
}

.editor-bar {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 10px;
    background: #1b1b1b;
    border-bottom: 1px solid #3a3a3a;
    color: #e6e6e6;
    font-size: 0.82rem;
}

.editor-stage.is-running .editor-bar {
    display: flex;
}

.editor-bar-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.editor-bar-spacer {
    flex: 1 1 auto;
}

.editor-bar button,
.editor-bar a.editor-bar-btn {
    font: inherit;
    font-weight: 500;
    color: #e6e6e6;
    background: #2e2e2e;
    border: 1px solid #454545;
    border-radius: 7px;
    padding: 5px 11px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.3;
}

.editor-bar button:hover,
.editor-bar a.editor-bar-btn:hover {
    background: #3a3a3a;
}

.editor-bar button:focus-visible,
.editor-bar a.editor-bar-btn:focus-visible {
    outline: 2px solid #ff8e53;
    outline-offset: 2px;
}

.editor-bar .editor-bar-premium {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.editor-bar .editor-bar-premium:hover {
    background: linear-gradient(135deg, #ff5a5a 0%, #ff7f3d 100%);
}

.editor-allowance {
    padding: 4px 10px;
    border-radius: 999px;
    background: #2a2a2a;
    border: 1px solid #454545;
    color: #cfcfcf;
    white-space: nowrap;
}

.editor-allowance[data-state="used"] {
    border-color: #ff8e53;
    color: #ffc9a8;
}

.editor-allowance[data-state="premium"] {
    border-color: #d9a441;
    color: #f3d38f;
}

.editor-allowance:empty {
    display: none;
}

.editor-frame-slot {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
}

.editor-frame-slot iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #262626;
}

.editor-poster {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
    color: #f2f2f2;
    background: #1f1f1f;
    cursor: pointer;
    border: 0;
    width: 100%;
    font: inherit;
}

.editor-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    opacity: 0.38;
    transition: opacity 0.2s ease;
}

.editor-poster:hover img {
    opacity: 0.5;
}

.editor-poster > *:not(img) {
    position: relative;
}

.editor-poster-cta {
    display: inline-block;
    padding: 15px 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 10px 28px rgba(255, 107, 107, 0.4);
}

.editor-poster:focus-visible .editor-poster-cta {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.editor-poster-note {
    font-size: 0.86rem;
    color: #d0d0d0;
    max-width: 440px;
    line-height: 1.5;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.editor-stage.is-running .editor-poster {
    display: none;
}

.editor-unsupported {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    color: #f2f2f2;
    background: #1f1f1f;
    line-height: 1.6;
}

.editor-stage.is-unsupported .editor-unsupported {
    display: flex;
}

.editor-stage.is-unsupported .editor-poster {
    display: none;
}

/* ---- App mode: the editor fills the window ---- */

body.editor-open {
    overflow: hidden;
}

body.editor-open .editor-stage {
    position: fixed;
    inset: 0;
    z-index: 1500;
    height: auto;
    min-height: 0;
    border: 0;
    border-radius: 0;
}

/* ---- Content below the editor ---- */

.editor-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 56px 20px 20px;
    color: var(--text-muted);
    line-height: 1.7;
}

.editor-content h2 {
    font-size: 1.7rem;
    color: var(--text-heading);
    margin: 48px 0 16px;
}

.editor-content h2:first-child {
    margin-top: 0;
}

.editor-content h3 {
    font-size: 1.05rem;
    color: var(--text-heading);
    margin: 0 0 6px;
}

.editor-content p {
    margin: 0 0 16px;
}

.editor-content a {
    color: #ff6b6b;
}

.editor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 20px 0 8px;
}

.editor-card {
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.editor-card p {
    margin: 0;
    font-size: 0.93rem;
}

.editor-plans {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.95rem;
}

.editor-plans th,
.editor-plans td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.editor-plans tr:last-child td {
    border-bottom: 0;
}

.editor-plans thead th {
    color: var(--text-heading);
    font-weight: 600;
}

.editor-plans td:first-child {
    color: var(--text-muted);
}

.editor-steps {
    margin: 0 0 16px;
    padding-left: 22px;
}

.editor-steps li {
    margin-bottom: 8px;
}

.editor-keys {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px 20px;
    margin: 12px 0 0;
    font-size: 0.92rem;
}

.editor-keys kbd {
    font: inherit;
    font-weight: 600;
    color: var(--text-heading);
}

.editor-credits {
    font-size: 0.86rem;
}

@media (max-width: 760px) {
    .editor-stage {
        height: 70vh;
        min-height: 420px;
    }

    .editor-bar-title,
    .editor-bar .editor-bar-hide-small {
        display: none;
    }

    .editor-plans th,
    .editor-plans td {
        padding: 10px 10px;
        font-size: 0.88rem;
    }
}
