Files
WidgetWorkbench/hmi-frontend/src/ios-widget.css
2026-11-22 17:22:19 +00:00

117 lines
9.7 KiB
CSS

/**
* Color/token bridge for backend/src/main/webapp/ios.css.
* DO NOT @import the legacy global CSS into Vue: it contains selectors for
* body, header, nav and iframe which would destroy the GridStack editor.
* Keep these variables in sync with :root in the legacy ios.css.
*/
.shell {
--itac-red:#a40640; --itac-red-light:#bd0749; --itac-red-dark:#73042d;
--itac-blue:#00488e; --itac-ink:#243746; --itac-slate:#375169;
--itac-muted:#838c93; --itac-border:#dfe5eb; --itac-soft:#f6f7fb;
--itac-surface:#fff; --itac-shadow:0 12px 34px rgba(36,55,70,.16);
--itac-radius:8px; --ios-tap:44px;
}
.shell.ios {
--bg:#f1f4f8;--panel:#fff;--panel-deep:#f9fafc;
--subtle:#eef2f6;--line:var(--itac-border);--text:var(--itac-ink);
--muted:#637487;--input:#fff;
font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
}
.shell.ios .sidebar {background:#fff;border-right:1px solid var(--itac-border)}
.shell.ios .toolbar{background:#fff;border-bottom-color:var(--itac-border)}
.shell.ios .toolbar h1{color:var(--itac-ink);letter-spacing:-.035em}
.shell.ios .brand-icon{color:var(--itac-red)}
.shell.ios .brand small{letter-spacing:.11em;color:var(--itac-muted)}
.shell.ios .nav-link.active {color:var(--itac-red);background:rgba(164,6,64,.065);border-left:3px solid var(--itac-red)}
.shell.ios .nav-link:hover{background:#f5f7fb}
.shell.ios .canvas{background:#f5f7fa;border-color:#dfe5eb}
.shell.ios .canvas.editable{background-image:radial-gradient(#ccd6e0 0.8px,transparent 0.8px)}
.shell.ios .grid-stack-item-content{border:1px solid #e1e7ef;border-radius:13px;background:#fff;box-shadow:0 4px 18px rgba(30,56,87,.045)}
.shell.ios .grid-stack-item-content:hover{box-shadow:0 9px 25px rgba(30,56,87,.09)}
.shell.ios .widget-head{border-bottom:1px solid #eaf0f5;background:linear-gradient(#fff,#fcfdfe)}
.shell.ios .primary-button,.shell.ios .mode-btn.active{background:var(--itac-red);border-color:var(--itac-red)}
.shell.ios .widget-label{color:#8191a3}
.shell.ios .sidebar-bottom .online-dot{background:#139469}
.shell.ios .inspector{background:#fff}
.shell.ios .widget-picker button{background:#fff;border:1px solid #dde5ed}
.shell.ios .widget-picker button:hover{border-color:var(--itac-red);background:#fff8fb}
.shell.ios .widget input,.shell.ios .inspector input,.shell.ios .inspector textarea,.shell.ios .inspector select{background:#fff;color:#243746}
.shell.ios .widget input:focus,.shell.ios .inspector input:focus{outline-color:var(--itac-red)}
.shell.ios .widget-table th{background:#f4f6f9}
/* Component namespace: never style legacy .touch-tree*, table, or body globally. */
.wb-widget-title{display:flex;align-items:center;gap:10px;min-width:0}
.wb-widget-symbol{width:29px;height:29px;border-radius:9px;background:color-mix(in srgb,var(--hmi-accent) 10%,transparent);color:var(--hmi-accent);display:grid;place-items:center;font-weight:750;font-size:1.1em;flex-shrink:0}
.wb-widget .widget-body{padding:0;overflow:auto}
.wb-widget :is(button,input,select){font:inherit}
.wb-widget button{min-height:34px}
.wb-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 15px 8px}
.wb-meta{display:flex;align-items:center;gap:6px;font-size:.85em;color:var(--muted)}
.wb-meta b{color:var(--text);font-size:1.07em}
.wb-live-dot{width:8px;height:8px;border-radius:50%;background:#17a978;box-shadow:0 0 0 3px #17a97820;flex-shrink:0}
.wb-live-dot.inactive{background:#f2a737;box-shadow:0 0 0 3px #f2a73720}
.wb-inline-actions{display:flex;align-items:center;gap:7px}
.wb-btn{border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:8px;padding:7px 11px;font-size:.86em;white-space:nowrap;min-height:34px}
.wb-btn:hover:not(:disabled){border-color:var(--hmi-accent);color:var(--hmi-accent)}
.wb-btn:focus-visible,.wb-widget input:focus-visible{outline:2px solid var(--hmi-accent);outline-offset:2px}
.wb-btn-icon{font-size:1.1em;min-width:34px;padding:5px}
.wb-btn.wb-primary{background:var(--hmi-accent);color:#fff;border-color:var(--hmi-accent);font-weight:700}
.wb-btn.wb-primary:hover:not(:disabled){filter:brightness(1.12);color:#fff}
.wb-btn.wb-small{font-size:.78em;padding:6px 9px}
.wb-filter{position:relative;padding:6px 15px 12px}
.wb-filter input{display:block;width:100%;border-radius:9px;background:var(--input);border:1px solid var(--line);padding:9px 11px 9px 34px;min-height:39px;font-size:.87em;color:var(--text)}
.wb-search-icon{position:absolute;top:7px;left:25px;color:var(--muted);font-size:1.5em;pointer-events:none}
.wb-placeholder{margin:12px 16px;color:var(--muted);font-size:.86em}
.wb-alert{margin:9px 15px;padding:10px;background:color-mix(in srgb,#c8414c 10%,var(--panel));border:1px solid color-mix(in srgb,#c8414c 40%,transparent);border-radius:8px;font-size:.83em;color:#dd7676}
.shell.ios .wb-alert{color:#a72a37}
.wb-table-scroll{overflow:auto;max-height:100%;min-height:60px;margin:0 12px;border:1px solid var(--line);border-radius:9px}
.wb-table{border-collapse:collapse;min-width:100%;font-size:.82em;white-space:nowrap}
.wb-table thead{position:sticky;top:0;z-index:1}
.wb-table th{background:var(--subtle);padding:11px 12px;text-align:left;color:var(--muted);font-weight:700;font-size:.83em;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--line)}
.wb-table td{padding:10px 12px;border-bottom:1px solid var(--line);color:var(--text);max-width:320px;overflow:hidden;text-overflow:ellipsis}
.wb-table tbody tr:hover{background:color-mix(in srgb,var(--hmi-accent) 6%,transparent)}
.wb-mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.94em}
.wb-empty{text-align:center;padding:20px!important;color:var(--muted)!important}
.wb-footer{padding:10px 15px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--muted);font-size:.76em;flex-wrap:wrap}
.wb-tree-list{overflow:auto;flex:1;padding:2px 14px 8px}
.wb-tree-group{border:1px solid var(--line);border-radius:9px;background:var(--panel);margin-bottom:8px;overflow:hidden}
.wb-tree-group>summary{display:flex;align-items:center;gap:10px;cursor:pointer;min-height:48px;padding:9px 13px;list-style:none;color:var(--text);font-size:.88em}
.wb-tree-group>summary::-webkit-details-marker{display:none}
.wb-tree-group>summary:hover{background:var(--subtle)}
.wb-tree-group[open]>summary{background:color-mix(in srgb,var(--hmi-accent) 7%,var(--panel));border-bottom:1px solid var(--line)}
.wb-tree-group>summary::after{content:'⌄';margin-left:7px;color:var(--muted);font-size:1.1em}
.wb-tree-group[open]>summary::after{transform:rotate(180deg)}
.wb-tree-name{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.wb-tree-name span{font-size:.84em;color:var(--muted);font-weight:400}
.wb-tree-count{border-radius:8px;background:var(--subtle);padding:2px 7px;font-size:.75em;color:var(--muted)}
.wb-tree-children{padding:8px 8px 4px 14px;border-left:2px solid color-mix(in srgb,var(--hmi-accent) 25%,transparent);margin-left:15px}
.wb-tree-icon{flex-shrink:0;width:26px;height:26px;display:grid;place-items:center;border-radius:8px;background:color-mix(in srgb,var(--hmi-accent) 10%,transparent);color:var(--hmi-accent)}
.wb-tree-leaf{display:flex;align-items:center;width:100%;gap:10px;min-height:45px;border:1px solid var(--line);border-radius:8px;background:var(--panel);margin-bottom:6px;text-align:left;color:var(--text);padding:8px 10px;cursor:pointer}
.wb-tree-leaf:hover{border-color:var(--hmi-accent);background:color-mix(in srgb,var(--hmi-accent) 5%,var(--panel))}
.wb-tree-leaf>span:nth-child(2){display:flex;flex-direction:column;gap:3px;flex:1}
.wb-tree-leaf small{color:var(--muted);font-size:.77em}
.wb-tree-arrow{color:var(--hmi-accent);font-size:1.3em}
.wb-module{height:100%;min-height:0;padding:17px;display:flex;flex-direction:column;gap:12px;justify-content:center}
.wb-module-row{display:flex;align-items:center;gap:14px}
.wb-module-logo{width:52px;height:52px;display:grid;place-items:center;flex-shrink:0;border-radius:14px;color:var(--hmi-accent);font-size:1.5em;font-weight:800;background:color-mix(in srgb,var(--hmi-accent) 12%,var(--panel))}
.wb-module-text h3{font-size:1.08em;margin:0 0 6px;color:var(--text)}
.wb-module-text p{font-size:.85em;line-height:1.4;margin:0;color:var(--muted)}
.wb-module-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.wb-chip{font:600 .75em ui-monospace,monospace;color:var(--muted);padding:6px 8px;border-radius:7px;background:var(--subtle)}
.wb-module .wb-field{display:flex;flex-direction:column;font-size:.81em;gap:6px;color:var(--muted)}
.wb-module .wb-field input{min-height:38px}
.wb-hint{font-size:.76em;color:var(--muted);margin:0;line-height:1.5}
.wb-module-note{opacity:.83}
.wb-data-table,.wb-station-tree{height:100%;display:flex;flex-direction:column;min-height:0}
.wb-data-table .wb-table-scroll{flex:1}
.wb-station-tree .wb-tree-list{flex:1}
.widget-picker-group{font-size:.70em;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:12px 2px 6px}
.widget-picker button{display:flex;gap:9px;align-items:center}
.widget-picker-icon{color:var(--hmi-accent);font-size:1.15em;width:20px;text-align:center}
.widget-picker-name{display:flex;flex-direction:column;gap:3px;font-weight:600}
.widget-picker-desc{color:var(--muted);font-size:.72em;line-height:1.2;font-weight:400}
@media(max-width:800px){.wb-module{padding:12px}.wb-module-logo{width:40px;height:40px}.wb-widget .widget-head{padding:9px}.wb-toolbar{padding:8px 10px}.wb-table-scroll{margin:0 6px}}
.widget-search{padding:9px 12px;border:1px solid var(--line);background:var(--input);color:var(--text);width:100%;border-radius:8px;margin-top:6px}
.wb-value-pill{font-weight:700;border-radius:7px;padding:4px 10px;display:inline-block;font-size:.9em}.wb-value-pill.on{color:#16825b;background:#dcf6e8}.wb-value-pill.off{color:#a76122;background:#fff0d8}