﻿/* Mobile studio: four stable workspaces, changed by the header rail or a
   horizontal swipe. Desktop keeps the original grid through display:contents. */
.studio-mobile-workflow-status {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (min-width: 901px) {
    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-panel-track { display: contents; }
}

@media (max-width: 900px) {
    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-steps {
        position: relative !important;
        top: auto !important;
        z-index: 80 !important;
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 4px !important;
        width: calc(100% - 16px) !important;
        margin: 8px auto 10px !important;
        padding: 5px !important;
        overflow: visible !important;
        border: 1px solid rgba(76, 220, 255, .25) !important;
        border-radius: 16px !important;
        background: linear-gradient(110deg, rgba(4, 14, 30, .97), rgba(5, 31, 47, .94)) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .3), inset 0 0 22px rgba(0, 223, 255, .05) !important;
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-steps button {
        position: relative !important;
        display: grid !important;
        grid-template-rows: 22px 17px !important;
        align-content: center !important;
        justify-items: center !important;
        gap: 3px !important;
        min-width: 0 !important;
        min-height: 51px !important;
        padding: 4px 2px !important;
        border: 1px solid transparent !important;
        border-radius: 11px !important;
        color: #9db7cb !important;
        background: transparent !important;
        font-size: .68rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        touch-action: manipulation;
        transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
    }

    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-steps button.is-active {
        color: #e9fdff !important;
        border-color: rgba(0, 229, 255, .48) !important;
        background: linear-gradient(145deg, rgba(0, 180, 220, .22), rgba(0, 70, 110, .2)) !important;
        box-shadow: inset 0 0 16px rgba(0, 229, 255, .1), 0 0 12px rgba(0, 229, 255, .12) !important;
    }

    .studio-tab-icon { display: grid; place-items: center; font-size: .94rem; }
    .studio-tab-label { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .studio-tab-index {
        position: absolute;
        top: 2px;
        right: 3px;
        color: #668398;
        font: 700 .48rem/1 system-ui, sans-serif;
        letter-spacing: .03em;
    }
    .studio-mobile-steps button.is-active .studio-tab-index { color: #68efff; }

    html.unipay-page-publication body.unipay-publication-shell .app-container {
        position: relative !important;
        display: block !important;
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
        height: clamp(430px, 60dvh, 650px) !important;
        min-height: 430px !important;
        max-height: 650px !important;
        margin: 0 auto calc(var(--unipay-bottombar-measured, 76px) + 16px) !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: 1px solid rgba(81, 209, 245, .28);
        border-radius: 18px;
        background: rgba(2, 10, 21, .68);
        box-shadow: 0 15px 42px rgba(0, 0, 0, .25), inset 0 0 24px rgba(0, 229, 255, .035);
        isolation: isolate;
        touch-action: pan-y;
    }

    html.unipay-page-publication body.unipay-publication-shell .app-container > .reserved-top,
    html.unipay-page-publication body.unipay-publication-shell .app-container > .reserved-left { display: none !important; }

    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-panel-track {
        position: relative;
        display: flex !important;
        align-items: stretch;
        width: 400% !important;
        height: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        transform: translate3d(0, 0, 0);
        transition: transform .36s cubic-bezier(.22, .72, .2, 1);
        will-change: transform;
        touch-action: pan-y;
    }

    html.unipay-page-publication body.unipay-publication-shell .app-container[data-studio-mobile-active="1"] .studio-mobile-panel-track { transform: translate3d(-25%, 0, 0); }
    html.unipay-page-publication body.unipay-publication-shell .app-container[data-studio-mobile-active="2"] .studio-mobile-panel-track { transform: translate3d(-50%, 0, 0); }
    html.unipay-page-publication body.unipay-publication-shell .app-container[data-studio-mobile-active="3"] .studio-mobile-panel-track { transform: translate3d(-75%, 0, 0); }

    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-panel-track > .tools-panel,
    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-panel-track > .workspace,
    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-panel-track > .config-panel,
    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-panel-track > .bottom-panel {
        position: relative !important;
        inset: auto !important;
        flex: 0 0 25% !important;
        width: 25% !important;
        max-width: 25% !important;
        min-width: 0 !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: 100% !important;
        margin: 0 !important;
        overflow: hidden !important;
        transform: none !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-panel-track > :first-child {
        border-radius: 17px 0 0 17px !important;
    }

    html.unipay-page-publication body.unipay-publication-shell .tools-panel,
    html.unipay-page-publication body.unipay-publication-shell .config-panel,
    html.unipay-page-publication body.unipay-publication-shell .bottom-panel {
        display: flex !important;
        flex-direction: column !important;
    }

    html.unipay-page-publication body.unipay-publication-shell .tools-panel .scroll-wrapper,
    html.unipay-page-publication body.unipay-publication-shell .config-panel .scroll-wrapper {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    html.unipay-page-publication body.unipay-publication-shell .workspace {
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    html.unipay-page-publication body.unipay-publication-shell .workspace-toolbar {
        flex: 0 0 auto !important;
        flex-wrap: nowrap !important;
        min-height: 44px !important;
        gap: 3px !important;
        padding: 5px 7px !important;
    }

    html.unipay-page-publication body.unipay-publication-shell .workspace-toolbar > * { min-width: 0 !important; }
    html.unipay-page-publication body.unipay-publication-shell .zoom-controls { width: auto !important; flex-wrap: nowrap !important; }

    html.unipay-page-publication body.unipay-publication-shell .canvas-scroll-area {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    html.unipay-page-publication body.unipay-publication-shell .bottom-panel .gallery-track {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    html.unipay-page-publication body.unipay-publication-shell :is(.studio-mobile-panel-track, .studio-mobile-panel-track *) { box-sizing: border-box; }
}

@media (prefers-reduced-motion: reduce) {
    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-panel-track { transition: none !important; }
}

/* Local editing assistant: visible checks; statuses do not replace server validation. */
.studio-assistant-note, .studio-effects-note p { color: #9eb5c5; font-size: .76rem; line-height: 1.45; }
.studio-assistant-note { margin: 5px 0 10px; }
.studio-effects-note p { margin: 6px 0; }
.studio-quality-report { margin-top: 10px; border: 1px solid rgba(83, 210, 238, .2); border-radius: 12px; padding: 10px; color: #d9edf4; background: rgba(1, 12, 25, .55); font-size: .74rem; }
.studio-quality-report > strong { display: block; margin-bottom: 7px; color: #71f5ff; }
.studio-quality-report ul { display: grid; gap: 7px; list-style: none; padding: 0; margin: 0; }
.studio-quality-report li { display: grid; gap: 2px; padding: 7px 8px; border-left: 2px solid rgba(255,255,255,.18); background: rgba(255,255,255,.025); }
.studio-quality-report li[data-state="ok"] { border-left-color: #57e3ae; }
.studio-quality-report li[data-state="todo"] { border-left-color: #ff8299; }
.studio-quality-report li[data-state="check"] { border-left-color: #ffd37c; }
.studio-quality-report li strong { color: #e7fbff; }
.studio-quality-report li span { color: #9eb5c5; line-height: 1.35; }

@media (max-width: 900px) {
    html.unipay-page-publication body.unipay-publication-shell .studio-production-rail { display: none !important; }
    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-steps .studio-tab-label {
        display: block !important;
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        font-size: .63rem !important;
        line-height: 1.1 !important;
        letter-spacing: 0 !important;
        text-align: center !important;
        text-overflow: clip !important;
    }
    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-steps .studio-tab-icon {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        margin: 0 !important;
        border-radius: 50% !important;
        background: rgba(0, 229, 255, .10) !important;
    }
    html.unipay-page-publication body.unipay-publication-shell .studio-mobile-steps .studio-tab-index {
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }
    html.unipay-page-publication body.unipay-publication-shell .workspace-toolbar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 4px !important;
        padding: 5px 6px !important;
    }
    html.unipay-page-publication body.unipay-publication-shell .workspace-toolbar .ws-title {
        flex: 0 1 58px !important;
        width: 58px !important;
        min-width: 0 !important;
        max-width: 58px !important;
        overflow: hidden !important;
        font-size: 0 !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }
    html.unipay-page-publication body.unipay-publication-shell .workspace-toolbar .ws-title #display-project-name {
        display: block !important;
        overflow: hidden !important;
        max-width: 58px !important;
        font-size: .58rem !important;
        line-height: 1.15 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    html.unipay-page-publication body.unipay-publication-shell .workspace-toolbar .zoom-controls {
        flex: 0 1 174px !important;
        min-width: 0 !important;
        gap: 3px !important;
    }
    html.unipay-page-publication body.unipay-publication-shell .workspace-toolbar .zoom-controls input[type="range"] {
        flex: 0 1 44px !important;
        width: 44px !important;
        min-width: 24px !important;
    }
    html.unipay-page-publication body.unipay-publication-shell .workspace-toolbar .icon-btn {
        flex: 0 0 27px !important;
        width: 27px !important;
        min-width: 27px !important;
        height: 27px !important;
        min-height: 27px !important;
        padding: 3px !important;
    }
    html.unipay-page-publication body.unipay-publication-shell .workspace-toolbar #zoom-value { font-size: .58rem !important; }
    html.unipay-page-publication body.unipay-publication-shell .bottom-panel .tabs {
        display: flex !important;
        flex: 0 0 auto !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }
    html.unipay-page-publication body.unipay-publication-shell .bottom-panel .tabs > button { flex: 0 0 auto !important; }
}

@media (max-width: 900px) {
    html.unipay-page-publication body.unipay-publication-shell .bottom-panel .tabs > .tab-btn {
        padding: 8px 10px !important;
        font-size: .62rem !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
    }
}

.publication-seo-preferences .studio-seo-note { display:block; margin-top:6px; color:#9eb5c5; font-size:.7rem; line-height:1.4; }

@media (max-width: 900px) {
  html.unipay-page-publication body.unipay-publication-shell .studio-mobile-swipe-rail {
    position: relative; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 9px;
    height: 24px; min-height: 24px; width: 100%; margin: 0 0 10px;
    color: rgba(128, 235, 255, .85); touch-action: pan-y; pointer-events: auto;
  }
  .studio-mobile-swipe-rail span { width: 24px; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
  .studio-mobile-swipe-rail span:last-child { transform: rotate(180deg); }
  .studio-mobile-swipe-rail i { font-size: 11px; }
}
@media (min-width: 901px) { .studio-mobile-swipe-rail { display: none; } }

/* The active Studio section uses the document's vertical scroll on phones. */
@media (max-width: 900px) {
  html.unipay-page-publication body.unipay-publication-shell .app-container {
    height: var(--studio-active-height, auto) !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  html.unipay-page-publication body.unipay-publication-shell .studio-mobile-panel-track {
    height: auto !important;
    align-items: flex-start !important;
  }
  html.unipay-page-publication body.unipay-publication-shell .studio-mobile-panel-track > :is(.tools-panel,.workspace,.config-panel,.bottom-panel) {
    flex: 0 0 25% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  html.unipay-page-publication body.unipay-publication-shell .studio-mobile-panel-track > :is(.tools-panel,.workspace,.config-panel,.bottom-panel) :is(.scroll-wrapper,.canvas-scroll-area,.gallery-track) {
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
    overscroll-behavior-y: auto !important;
  }
  html.unipay-page-publication body.unipay-publication-shell .studio-mobile-panel-track > :is(.tools-panel,.workspace,.config-panel) :is(.scroll-wrapper,.canvas-scroll-area) {
    overflow: visible !important;
  }
  html.unipay-page-publication body.unipay-publication-shell .bottom-panel .gallery-track {
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
}
