.upload-loader{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:rgba(7,9,14,.9);color:#f8fafc}.loader-spinner{width:38px;height:38px;border:3px solid #334155;border-top-color:#f472b6;border-radius:50%;animation:editor-spin .8s linear infinite}.upload-loader span{font-size:11px;color:#94a3b8}.loader-track{width:min(260px,70%);height:6px;border-radius:99px;background:#1e293b;overflow:hidden}.loader-progress{height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,#db2777,#f97316);transition:width .25s ease}@keyframes editor-spin{to{transform:rotate(360deg)}}.layers-panel{margin-bottom:0;padding-bottom:0;border-bottom:none;display:flex;flex-direction:column;flex:1;min-height:0}.layers-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.layers-heading h2{margin:0;color:#f8fafc;font-size:14px}.layers-heading span{min-width:22px;border-radius:99px;background:#26344b;color:#cbd5e1;padding:3px 7px;text-align:center;font-size:10px;font-weight:800}.layers-list{display:flex;flex-direction:column;gap:6px;flex:1;min-height:0;max-height:calc(100vh - 280px);overflow-y:auto}.layers-empty{margin:0;color:#64748b;font-size:11px;line-height:1.5}.layer-row{display:flex;align-items:center;gap:3px;border:1px solid transparent;border-radius:8px;background:#182131;padding:3px}.layer-row.active{border-color:#ec4899;background:#2a2034}.layer-select{display:flex;align-items:center;gap:8px;min-width:0;flex:1;border:0;background:transparent;color:#cbd5e1;padding:7px 5px;text-align:left;font-size:11px;font-weight:700;cursor:pointer}.layer-select span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layer-select i{width:14px;color:#f472b6;text-align:center}.layer-visibility,.layer-remove{border:0;background:transparent;color:#64748b;padding:7px 5px;cursor:pointer}.layer-visibility:hover{color:#a5b4fc}.layer-remove:hover{color:#fb7185}.layer-row button:focus-visible{outline:2px solid #f472b6;outline-offset:1px}.editor-stage canvas{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}.editor-stage:not(.has-image) .canvas-container{display:none}.editor-stage.has-image{background:#0b0f19}.editor-stage.has-image .canvas-container{flex:0 0 auto}.editor-tool-button:disabled{cursor:not-allowed;opacity:.45;transform:none}

@media (max-width: 900px) {
    .upload-panel {
        display: none !important;
    }
    .layers-panel.hidden {
        display: none !important;
    }
    .layers-panel {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        background: #101522 !important;
        border: 1px solid #1e2738 !important;
        border-radius: 10px !important;
        padding: 3px 6px !important;
        margin-bottom: 0 !important;
        min-height: 40px !important;
        height: 40px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .layers-heading {
        display: none !important;
    }
    .layers-list {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
        max-height: none !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x !important;
        scrollbar-width: thin !important;
        scrollbar-color: #f97316 rgba(30,39,56,0.5) !important;
    }
    .layers-list::-webkit-scrollbar {
        height: 3px !important;
    }
    .layers-list::-webkit-scrollbar-thumb {
        background: linear-gradient(90deg, #f43f5e, #f97316) !important;
        border-radius: 99px !important;
    }
    .layers-empty {
        display: none !important;
    }
    .layer-row {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        border-radius: 8px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 2px solid #1e2738 !important;
        background: #182131 !important;
        position: relative !important;
        flex-shrink: 0 !important;
        overflow: hidden !important;
    }
    .layer-row.active {
        border-color: #f43f5e !important;
        background: #2a2034 !important;
        box-shadow: 0 0 10px rgba(244, 63, 94, 0.4) !important;
    }
    .layer-drag-grip,
    .layer-title-text,
    .layer-visibility,
    .layer-remove {
        display: none !important;
    }
    .layer-select {
        padding: 0 !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .layer-preview-box {
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .layer-thumb-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 6px !important;
    }
    .layer-preview-box i {
        font-size: 14px !important;
        color: #f472b6 !important;
    }

    /* Sleek Plus Upload Button at the far left of Mobile Layers Bar */
    .mobile-upload-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        border-radius: 8px !important;
        background: linear-gradient(135deg, #db2777, #f43f5e) !important;
        color: #ffffff !important;
        font-size: 14px !important;
        font-weight: bold !important;
        border: none !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        box-shadow: 0 2px 6px rgba(219, 39, 119, 0.3) !important;
        transition: transform 0.15s ease !important;
    }
    .mobile-upload-btn:active {
        transform: scale(0.94) !important;
    }

    /* Mobile Layer Action Buttons (Copy, Eye Visibility & Delete) Fixed on far right */
    .mobile-layer-actions-bar,
    #mobileLayerActions {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        margin-left: auto !important;
        padding-left: 5px !important;
        border-left: 1px solid #1e2738 !important;
        flex-shrink: 0 !important;
        z-index: 10 !important;
        background: #101522 !important;
    }
    .mobile-layer-action-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
        border-radius: 8px !important;
        background: #182131 !important;
        border: 1px solid #1e2738 !important;
        color: #cbd5e1 !important;
        font-size: 11px !important;
        cursor: pointer !important;
        transition: transform 0.15s ease, background 0.15s ease !important;
    }
    .mobile-layer-action-btn:active {
        transform: scale(0.92) !important;
    }
}

@media (min-width: 901px) {
    .layers-panel {
        display: flex !important;
        flex-direction: column !important;
        background: transparent !important;
        border: none !important;
        padding: 10px 0 !important;
        margin-top: 10px !important;
        border-top: 1px solid #1e2738 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
    }
    .layers-panel.hidden {
        display: none !important;
    }
    .layers-heading {
        display: flex !important;
    }
    .layers-list {
        display: flex !important;
        flex-direction: column !important;
        max-height: calc(100vh - 280px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    .layer-row {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        height: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        padding: 3px !important;
        border-radius: 8px !important;
        background: #182131 !important;
        border: 1px solid transparent !important;
    }
    .layer-row.active {
        border-color: #ec4899 !important;
        background: #2a2034 !important;
    }
    .layer-drag-grip,
    .layer-title-text,
    .layer-visibility,
    .layer-remove {
        display: flex !important;
    }
    .layer-select {
        padding: 7px 5px !important;
        width: auto !important;
        height: auto !important;
    }
    .mobile-upload-btn,
    .mobile-layer-actions-bar,
    #mobileLayerActions {
        display: none !important;
    }
}
