// SPDX-License-Identifier: Apache-2.0 'use strict'; 'require baseclass'; const CSS = [ '.dd-log-toolbar .dd-log-toggle[aria-pressed="true"]{background:rgba(74,160,101,.16);border-color:#4aa065;box-shadow:inset 0 0 0 1px rgba(74,160,101,.2)}', '.dd-log-toolbar .dd-log-toggle:focus-visible{outline:2px solid #4aa065;outline-offset:2px}', '.dd-wrap{padding:4px 0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif}', '.dd-card{border:1px solid rgba(0,0,0,.06);border-radius:10px;padding:9px 14px;margin-bottom:7px;box-shadow:0 2px 8px rgba(0,0,0,.03);background:rgba(255,255,255,.02)}', /* padding:0 neutralizes Argon's h4{padding:.75rem 1.25rem}, which otherwise indents the title 20px past the card body and looks misaligned */ '.dd-card-title{font-size:11px;font-weight:600;opacity:.55;margin:0 0 8px;padding:0;letter-spacing:.3px;text-transform:uppercase}', '.dd-status-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:0}', '.dd-status-row .dd-grow{flex:1 1 auto}', '.dd-badge{display:inline-flex;align-items:center;gap:5px;padding:2px 10px;border-radius:999px;font-size:10.5px;font-weight:700;letter-spacing:.3px;border:1px solid transparent;line-height:1.3}', '.dd-badge-run{color:#3da66a;border-color:rgba(61,166,106,.5)}', '.dd-badge-stop{color:#d96d6d;border-color:rgba(217,109,109,.55)}', '.dd-badge-dot{width:6px;height:6px;border-radius:50%;background:currentColor;display:inline-block}', '.dd-meta{font-size:11.5px;opacity:.7;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace}', '.dd-meta-label{opacity:.55;margin-right:4px}', '.dd-actions{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 0}', '.dd-actions .cbi-button{font-size:11.5px;padding:4px 12px;border-radius:5px}', '.dd-actions a.cbi-button{display:inline-flex;align-items:center;gap:4px}', '.dd-wrap .cbi-button{font-size:11px !important;line-height:1.4 !important;min-height:0 !important;height:auto !important;padding:4px 12px !important;border-radius:5px !important;border:1px solid rgba(128,128,128,.35) !important;background:transparent !important;color:inherit !important;box-shadow:none !important;cursor:pointer;white-space:nowrap}', '.dd-wrap .cbi-button:hover{background:rgba(128,128,128,.12) !important}', '.dd-wrap .cbi-button:disabled{opacity:.45;cursor:not-allowed}', '.dd-wrap .cbi-button-action,.dd-wrap .cbi-button-positive,.dd-wrap .cbi-button-add,.dd-wrap .cbi-button-edit{border-color:#4aa065 !important;color:#4aa065 !important}', '.dd-wrap .cbi-button-remove{border-color:#d96d6d !important;color:#d96d6d !important}', '.dd-wrap .cbi-button-remove:hover{background:rgba(217,109,109,.12) !important}', '.dd-switch{position:relative;width:42px;height:22px;border:0;border-radius:999px;background:rgba(128,128,128,.28);padding:0;cursor:pointer;transition:background .18s ease,opacity .18s ease;flex-shrink:0}', '.dd-switch .dd-switch-knob{position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:rgba(255,255,255,.96);box-shadow:0 1px 4px rgba(0,0,0,.2);transition:transform .18s ease}', '.dd-switch.is-on{background:rgba(74,160,101,.65)}', '.dd-switch.is-on .dd-switch-knob{transform:translateX(20px)}', '.dd-switch:disabled{opacity:.45;cursor:not-allowed}', '.dd-switch-label{font-size:10.5px;font-weight:600;opacity:.62;letter-spacing:.3px}', '.dd-switch-wrap{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}', '.dd-backend-card{padding:10px 14px}', '.dd-backend-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}', '.dd-backend-label{flex:0 0 calc(200px - 10px);font-size:12px;font-weight:600;opacity:.72}', '.dd-backend-segment{display:inline-flex;align-items:center;gap:2px;padding:2px;border-radius:7px;background:rgba(128,128,128,.10)}', '.dd-backend-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:78px;height:24px;padding:0 10px;border:0;border-radius:5px;background:transparent;color:inherit;font-size:11px;font-weight:500;opacity:.65;cursor:pointer;transition:background .18s ease,color .18s ease,opacity .18s ease}', '.dd-backend-btn:hover{background:rgba(128,128,128,.10)}', '.dd-backend-btn.is-active{background:linear-gradient(#3886a1,#2f7288);color:#fff;opacity:1;font-weight:600;box-shadow:0 1px 2px rgba(0,0,0,.12)}', '.dd-backend-btn:disabled{opacity:.55;cursor:not-allowed}', '.dd-backend-state{font-size:10.5px;font-weight:500;opacity:.70;margin-left:2px}', '.dd-backend-btn.is-active .dd-backend-state{opacity:.85}', '.dd-backend-help{margin:6px 0 0 200px;font-size:11.5px;line-height:1.45;opacity:.66}', '.dd-backend-help:empty{display:none}', 'html[data-daede-theme="argon"] .dd-backend-label{flex-basis:calc(240px - 10px)}', 'html[data-daede-theme="argon"] .dd-backend-help{margin-left:240px}', 'html[data-daede-theme="argon"]:not([data-darkmode="true"]) .dd-config-page .dd-card{background:rgba(255,255,255,.78);border-color:rgba(50,50,93,.12);box-shadow:0 2px 8px rgba(50,50,93,.06)}', 'html[data-daede-theme="argon"]:not([data-darkmode="true"]) .dd-config-page .dd-card-title{opacity:.78}', 'html[data-daede-theme="argon"]:not([data-darkmode="true"]) .dd-config-page .dd-settings-card .cbi-value-title{opacity:1}', 'html[data-daede-theme="argon"]:not([data-darkmode="true"]) .dd-config-page .dd-settings-card .cbi-value-field input,html[data-daede-theme="argon"]:not([data-darkmode="true"]) .dd-config-page .dd-settings-card .cbi-value-field select,html[data-daede-theme="argon"]:not([data-darkmode="true"]) .dd-config-page .dd-settings-card .cbi-value-field textarea{background:#fff!important;border-color:rgba(50,50,93,.24)!important}', 'html[data-daede-theme="argon"]:not([data-darkmode="true"]) .dd-config-page .dd-adv-bar{background:rgba(50,50,93,.04);border-color:rgba(50,50,93,.14);opacity:.78}', '@media (max-width:640px){.dd-backend-label{flex-basis:100%!important;width:100%}.dd-backend-segment{width:100%}.dd-backend-btn{flex:1;min-width:0}.dd-backend-help{margin-left:0!important}}', /* daed/dae settings card —— LuCI form.Map 字体/边框对齐 dd 卡片体系 */ '.dd-settings-card{padding:10px 14px}', '.dd-settings-card>h2,.dd-settings-card .cbi-map>h2,.dd-settings-card .cbi-section>h3{display:none}', '.dd-settings-card .cbi-map>.cbi-map-descr,.dd-settings-card .cbi-section-descr{font-size:11.5px;opacity:.62;margin:0 0 8px;line-height:1.45}', '.dd-settings-descr{font-size:11.5px;opacity:.62;margin:0 0 8px;line-height:1.45}', '.dd-settings-card .cbi-section{margin:0;padding:0;background:transparent;border:0;box-shadow:none}', '.dd-settings-card .cbi-value{padding:6px 0;border:0;min-height:0}', /* Argon's .td.cbi-value-field padding + 40px .cbi-checkbox make table rows too tall — tighten both for our compact subscription/node tables */ '.dd-settings-card .cbi-section-table-row>td{padding:6px 10px !important}', '.dd-settings-card .cbi-section-table-row .cbi-checkbox{height:20px !important;min-height:0 !important}', '.dd-settings-card .cbi-value-title{font-size:12.5px !important;font-weight:500;opacity:.85;padding:6px 12px 6px 0;min-width:140px}', '.dd-settings-card .cbi-value-field input,.dd-settings-card .cbi-value-field select,.dd-settings-card .cbi-value-field textarea{font-size:12.5px !important;padding:5px 8px;border-radius:5px;border:1px solid rgba(128,128,128,.28);background:transparent;color:inherit}', '.dd-settings-card .cbi-value-field input:focus,.dd-settings-card .cbi-value-field select:focus,.dd-settings-card .cbi-value-field textarea:focus{border-color:rgba(56,134,161,.7);outline:0;box-shadow:0 0 0 2px rgba(56,134,161,.15)}', '.dd-settings-card .cbi-value-description,.dd-settings-card .cbi-value-helptext{font-size:11.5px !important;opacity:.6;line-height:1.45;padding-top:3px}', '.dd-settings-card .cbi-section-remove{background:transparent !important;border:0 !important;box-shadow:none !important}', '.dd-settings-card .cbi-section-remove .cbi-button{border-color:#d96d6d !important;color:#d96d6d !important}', /* themes (esp. Argon) restyle checkboxes into faint, near-invisible boxes; force native rendering + brand accent so the checkmark is always clear */ '.dd-settings-card input[type="checkbox"]{-webkit-appearance:checkbox !important;appearance:checkbox !important;width:16px;height:16px;background:none !important;border:0 !important;box-shadow:none !important;background-image:none !important}', '.dd-settings-card input[type="checkbox"]:before,.dd-settings-card input[type="checkbox"]:after{content:none !important;display:none !important}', /* line the Subscriptions and Nodes grid tables up column-for-column. fixed layout + explicit per-column percentages make the widths authoritative across themes (Argon's auto layout otherwise sizes the empty Nodes table by content, and even ignores px cell widths, so they drift apart) */ '.dd-settings-card .cbi-section-table{table-layout:fixed !important;width:100%}', /* flatten the table header: Argon tints header cells (#f6f9fc), which reads as an off-colour band on the white card — keep it transparent */ '.dd-settings-card .cbi-section-table-titles,.dd-settings-card .cbi-section-table-titles .cbi-section-table-cell{background:transparent !important;background-image:none !important}', '.dd-settings-card .cbi-section-table-cell:nth-child(1){width:14% !important}', '.dd-settings-card .cbi-section-table-cell:nth-child(2){width:62% !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}', '.dd-settings-card .cbi-section-table-cell:nth-child(3){width:10% !important}', '.dd-settings-card .cbi-section-table-cell:nth-child(4){width:auto !important;min-width:0 !important;white-space:nowrap;text-align:right}', /* icon row-action buttons stay narrow, never stretch to fill the cell */ '.dd-settings-card .cbi-section-actions .cbi-button-edit,.dd-settings-card .cbi-section-actions .cbi-button-remove{width:auto !important;min-width:0 !important;display:inline-block !important;flex:0 0 auto !important}', /* proxy-test result coloring */ '.dd-meta.dd-ok{color:#3da66a;font-weight:600}', '.dd-meta.dd-err{color:#d96d6d;font-weight:600}', /* 手风琴折叠组 —— 视觉与 clashoo cl-component-adv 一致 */ '.dd-adv{margin-top:10px}', '.dd-adv-bar{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;cursor:pointer;user-select:none;font-size:12px;font-weight:600;background:rgba(128,128,128,.06);border:1px solid rgba(128,128,128,.16);border-radius:7px;color:inherit;opacity:.55}', '.dd-adv-bar:hover{background:rgba(56,134,161,.08);opacity:1}', '.dd-adv-chevron{font-size:14px;font-weight:700;opacity:.55;transition:transform .2s}', '.dd-adv:not(.dd-closed) .dd-adv-chevron{transform:rotate(90deg)}', '.dd-adv-body{margin-top:8px;padding:2px 4px 4px}', '.dd-adv.dd-closed .dd-adv-body{display:none}', '.dd-editor{width:100%;min-height:460px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:1.5;box-sizing:border-box;resize:vertical;border-radius:6px 6px 0 0}', /* syntax-highlight overlay: a
 sits behind a transparent