/* ============================================
   Acrylic SVG Editor v2 — WYSIWYG Styles
   (fixed for modal support: 100% height, no body override)
   ============================================ */
*{box-sizing:border-box}

/* Layout — scoped to editor container */
.aw-workspace{
    display:flex;flex-direction:column;
    height:100%;
    background:#0f172a;color:#e2e8f0;
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    overflow:hidden;
}
.aw-main{display:flex;flex:1;overflow:hidden;min-height:0}
.aw-viewport{flex:1;position:relative;overflow:hidden;background:#fff}
.aw-sidebar{
    width:270px;min-width:270px;max-width:270px;
    background:#1e293b;border-left:1px solid #334155;
    overflow-y:auto;flex-shrink:0;
}

/* Leftbar */
.aw-leftbar{
    display:flex;flex-direction:column;gap:8px;
    padding:10px 6px;background:#1e293b;
    border-right:1px solid #334155;width:40px;flex-shrink:0;
}
.aw-tool-btn{width:32px;height:32px;border:1px solid #334155;border-radius:6px;background:#0f172a;color:#cbd5e1;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.aw-tool-btn:hover{background:#334155}
.aw-tool-btn.active{background:#3b82f6;color:#fff;border-color:#3b82f6}

/* Toolbar */
.aw-toolbar{display:flex;align-items:center;gap:4px;padding:6px 10px;background:#1e293b;border-bottom:1px solid #334155;flex-wrap:wrap;min-height:38px;flex-shrink:0}
.aw-brand{font-weight:700;font-size:14px;color:#facc15;margin-right:10px;white-space:nowrap}
.aw-btn{padding:4px 10px;background:transparent;border:1px solid transparent;border-radius:5px;color:#cbd5e1;font-size:12px;cursor:pointer;white-space:nowrap}
.aw-btn:hover{background:#334155;color:#fff}
.aw-btn.active{background:#3b82f6;color:#fff}
.aw-btn:disabled{opacity:.4;cursor:not-allowed}
.aw-btn.primary{background:#10b981;color:#fff}
.aw-btn.primary:hover{background:#059669}
.aw-sep{width:1px;height:20px;background:#334155;margin:0 3px}
.aw-sm-btn{padding:3px 8px;background:#334155;border:1px solid #475569;border-radius:4px;color:#cbd5e1;font-size:11px;cursor:pointer}
.aw-sm-btn:hover{background:#475569}

/* Status bar */
.aw-statusbar{display:flex;align-items:center;gap:6px;padding:3px 10px;background:#0f172a;border-top:1px solid #334155;font-size:11px;color:#64748b;min-height:22px;flex-shrink:0}
.aw-statusbar #awZoomInput{margin:0;width:30px}

/* Panels */
.aw-panels{padding:6px}
.aw-panel-section{margin-bottom:6px;border:1px solid #334155;border-radius:8px;overflow:hidden}
.aw-panel-hdr{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;background:#0f172a;cursor:pointer;font-size:12px;font-weight:600;user-select:none}
.aw-panel-hdr:hover{background:#1a2332}
.aw-panel-body{padding:8px}

/* Layer rows */
.aw-layer-row{display:flex;justify-content:space-between;align-items:center;padding:5px 8px;cursor:pointer;border-radius:4px;font-size:12px;margin:1px 0;max-width:100%}
.aw-layer-row:hover{background:rgba(59,130,246,.15)}
.aw-layer-sel{background:rgba(59,130,246,.2);border-left:3px solid #3b82f6}
.aw-layer-child{padding-left:28px;font-size:11px;opacity:.85}
.aw-layer-collapsed .aw-layer-child{display:none}
.aw-group-toggle{display:inline-block;width:14px;font-size:10px;color:#64748b;flex-shrink:0}
.aw-group-toggle:hover{color:#e2e8f0}
.aw-layer-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:monospace;font-size:11px}
.aw-layer-mask-btn{padding:2px 6px;background:#334155;border:none;border-radius:3px;color:#94a3b8;font-size:10px;cursor:pointer;flex-shrink:0;margin-left:4px}
.aw-layer-mask-btn:hover{background:#f59e0b;color:#fff}

/* Shape grid */
#awShapeGrid{display:flex;flex-wrap:wrap;gap:4px}
.aw-shape-btn{width:calc(25% - 3px);padding:6px 4px;background:#0f172a;border:1px solid #334155;border-radius:6px;color:#cbd5e1;font-size:18px;cursor:pointer;text-align:center}
.aw-shape-btn:hover{background:#1e3a5f;border-color:#3b82f6}
.aw-shape-btn.active{background:#3b82f6;color:#fff;border-color:#3b82f6}
.aw-shape-btn small{font-size:9px;display:block;color:#94a3b8}
.aw-shape-custom-item{position:relative;width:calc(25% - 3px)}
.aw-shape-custom-item .aw-shape-btn{width:100%;margin:0}
.aw-shape-del{position:absolute;top:-4px;right:-4px;width:18px;height:18px;padding:0;border:1px solid #ef4444;border-radius:50%;background:#dc2626;color:#fff;font-size:11px;line-height:14px;cursor:pointer;display:none;text-align:center}
.aw-shape-custom-item:hover .aw-shape-del{display:block}
.aw-shape-del:hover{background:#ef4444}

/* Props */
.aw-prop-row{margin-bottom:6px}
.aw-prop-row label{display:block;font-size:11px;color:#94a3b8;margin-bottom:2px}
.aw-prop-row input,.aw-prop-row select{width:100%;padding:4px;background:#0f172a;border:1px solid #334155;border-radius:4px;color:#e2e8f0;font-size:12px}
.aw-prop-row input:focus,.aw-prop-row select:focus{outline:none;border-color:#3b82f6}

/* Mask modal */
.aw-mask-opt{transition:background .15s}

/* Scrollbar */
.aw-sidebar::-webkit-scrollbar{width:5px}
.aw-sidebar::-webkit-scrollbar-track{background:#0f172a}
.aw-sidebar::-webkit-scrollbar-thumb{background:#334155;border-radius:3px}

/* Handles */
.aw-handle{pointer-events:auto}
.aw-handle:hover{background:#3b82f6!important;border-color:#fff!important}

/* Drag-over */
.aw-viewport.drag-over{box-shadow:inset 0 0 0 3px #3b82f6}

/* Preview popup */
.aw-preview-popup img{max-width:100%;max-height:80vh}

/* Layer up/down buttons */
.aw-layer-up,.aw-layer-down{background:none;border:none;color:#64748b;cursor:pointer;font-size:10px;padding:0;line-height:1}
.aw-layer-up:hover,.aw-layer-down:hover{color:#e2e8f0}
.aw-layer-up:disabled,.aw-layer-down:disabled{opacity:.3;cursor:not-allowed}

/* Acc positioning */
.aw-acc-pos-opt{padding:8px 10px;cursor:pointer;border-radius:6px;margin:2px 0;background:#0f172a;font-size:12px;color:#e2e8f0}
.aw-acc-pos-opt:hover{background:#1e3a5f}

/* Arrow toggle in panels */
.aw-arrow{display:inline-block;transition:transform .2s;font-size:10px;margin-left:4px}

/* Context menu */
.aw-layer-cmenu{position:fixed;background:#1e293b;border:1px solid #334155;border-radius:8px;padding:4px 0;min-width:140px;z-index:9999;box-shadow:0 8px 24px rgba(0,0,0,.4)}
.aw-layer-cmenu div{padding:6px 14px;font-size:12px;cursor:pointer;color:#cbd5e1}
.aw-layer-cmenu div:hover{background:#334155;color:#fff}
