/* The webcore skin's fields: sunken white wells for inputs, selects and the script editor, one
   height down the row, and checks and radios as wells with a black mark. */
/* ── Fields: sunken white wells ── */
:root[data-skin="webcore"] input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
:root[data-skin="webcore"] select,
:root[data-skin="webcore"] textarea,
:root[data-skin="webcore"] .script-editor-wrap,
:root[data-skin="webcore"] #zoom-input,
:root[data-skin="webcore"] .coord-px-input,
:root[data-skin="webcore"] .modal-search,
:root[data-skin="webcore"] .kw-add input,
:root[data-skin="webcore"] #chat-input,
:root[data-skin="webcore"] #ctx-assist-input,
:root[data-skin="webcore"] .chat-input-wrap {
    background: var(--wc-window);
    color: var(--wc-ink);
    border: 0;
    box-shadow: var(--wc-sunken);
    padding-left: 6px;
}
/* One height down the row: a field, a spinner and a selector all stand the same. */
:root[data-skin="webcore"] input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
:root[data-skin="webcore"] select,
:root[data-skin="webcore"] .accent-dd-trigger {
    height: 24px;
    min-height: 24px;
    padding: 2px 6px;
    line-height: 18px;
}
:root[data-skin="webcore"] .accent-dd-trigger { padding-right: 22px; }

/* The tick fills its well, as the desktop's baked indicator does. */
:root[data-skin="webcore"] input[type="checkbox"],
:root[data-skin="webcore"] input[type="radio"] { width: 15px; height: 15px; }
:root[data-skin="webcore"] input:not([type="checkbox"]):not([type="radio"]):focus,
:root[data-skin="webcore"] select:focus,
:root[data-skin="webcore"] textarea:focus,
:root[data-skin="webcore"] select:hover:not(:disabled),
:root[data-skin="webcore"] .script-editor-wrap:focus-within,
:root[data-skin="webcore"] .script-editor-wrap:hover {
    box-shadow: var(--wc-sunken);
    outline: none;
}
/* A field under the pointer wears the 2px focus ring, as a selector does and as the desktop's
   QLineEdit:hover does; !important because the default skin's accent ring is. */
:root[data-skin="webcore"] input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):hover:not(:disabled):not(:focus) {
    box-shadow: inset 0 0 0 2px var(--wc-focus) !important;
    border-color: transparent !important;
    background-image: none;
    animation: none;
}
:root[data-skin="webcore"] #zoom-input { font-weight: normal; }
:root[data-skin="webcore"] select {
    appearance: none;
    padding-right: 22px;
    background-image: linear-gradient(var(--wc-face), var(--wc-face));
    background-size: 16px calc(100% - 4px);
    background-position: right 2px top 2px;
    background-repeat: no-repeat;
}
:root[data-skin="webcore"] #project-name-input,
:root[data-skin="webcore"] #project-name-input:read-only,
:root[data-skin="webcore"] #project-name-input:disabled {
    background: transparent;
    box-shadow: none;
    color: var(--wc-ink);
    font-weight: 700;
}
:root[data-skin="webcore"] #project-name-input:not(:read-only),
:root[data-skin="webcore"] #project-name-input:not(:read-only):focus {
    background: var(--wc-window);
    box-shadow: var(--wc-sunken);
}
:root[data-skin="webcore"] input[type="color"] { box-shadow: var(--wc-raised); background: var(--wc-face); border: 0; padding: 3px; }
:root[data-skin="webcore"] input[type="color"]::-webkit-color-swatch { border: 1px solid var(--wc-dark); }

/* ── Checks and radios: white wells with a black mark ── */
:root[data-skin="webcore"] input[type="checkbox"],
:root[data-skin="webcore"] input[type="radio"] {
    appearance: none;
    width: 13px;
    height: 13px;
    margin: 0 4px 0 0;
    background: var(--wc-window);
    border: 0;
    box-shadow: var(--wc-sunken);
    accent-color: var(--wc-ink);
    vertical-align: -2px;
}
:root[data-skin="webcore"] input[type="checkbox"]:checked {
    background: var(--wc-window) var(--accent-tick) center / 13px no-repeat;
    box-shadow: var(--wc-sunken);
}
:root[data-skin="webcore"] :is(input[type="checkbox"], input[type="radio"]):hover:not(:disabled) {
    box-shadow: inset 0 0 0 2px var(--wc-focus) !important;
}
:root[data-skin="webcore"] input[type="radio"] { border-radius: 50% !important; }
:root[data-skin="webcore"] input[type="radio"]:checked {
    background: radial-gradient(circle, var(--wc-ink) 0 3px, var(--wc-window) 3.5px);
}
:root[data-skin="webcore"] input[type="range"] { accent-color: var(--wc-select); }
/* The trackbar (desktop qss/webcore/fields.qss QSlider): a white groove ringed in --wc-shadow, the
   played side navy up to --scrub-fill, the thumb a raised square. */
:root[data-skin="webcore"] :is(.vs-range, .oi-scrub)::-webkit-slider-runnable-track {
    border: 1px solid var(--wc-shadow); border-radius: 0;
    background: linear-gradient(to right, var(--wc-select) 0 var(--scrub-fill, 0%),
                                          var(--wc-window) var(--scrub-fill, 0%) 100%);
}
:root[data-skin="webcore"] :is(.vs-range, .oi-scrub)::-webkit-slider-thumb {
    width: 11px; height: 17px; margin-top: -6px; border: 0; border-radius: 0;
    background: var(--wc-face); box-shadow: var(--wc-raised);
}
:root[data-skin="webcore"] :is(.vs-range, .oi-scrub)::-moz-range-track { border: 1px solid var(--wc-shadow); border-radius: 0; background: var(--wc-window); }
:root[data-skin="webcore"] :is(.vs-range, .oi-scrub)::-moz-range-progress { border-radius: 0; background: var(--wc-select); }
:root[data-skin="webcore"] :is(.vs-range, .oi-scrub)::-moz-range-thumb {
    width: 11px; height: 17px; border: 0; border-radius: 0; background: var(--wc-face); box-shadow: var(--wc-raised);
}

/* ── The console window: the shell's own command prompt — light grey monospace on a black,
   sunken field, the heads in the chosen accent, its selection colours (desktop
   webcore/fields.qss console rules). The skin's own font and field rules are !important, so these are. ── */
:root[data-skin="webcore"] .console-modal .console-body {
    background: #000;
    border: 0;
    border-radius: 0;
    box-shadow: var(--wc-sunken);
}
:root[data-skin="webcore"] .console-modal .console-out,
:root[data-skin="webcore"] .console-modal .console-out *,
:root[data-skin="webcore"] .console-modal .console-prompt,
:root[data-skin="webcore"] .console-modal .console-prompt-row .console-input,
:root[data-skin="webcore"] .console-modal .console-prompt-row .console-input:focus,
:root[data-skin="webcore"] .console-modal .console-prompt-row .console-input:hover {
    font-family: 'Menlo', 'Consolas', 'DejaVu Sans Mono', monospace !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}
:root[data-skin="webcore"] .console-modal .console-out { color: #c0c0c0; padding: 8px 10px; }
:root[data-skin="webcore"] .console-modal .console-prompt-row .console-input,
:root[data-skin="webcore"] .console-modal .console-prompt-row .console-input:focus,
:root[data-skin="webcore"] .console-modal .console-prompt-row .console-input:hover {
    color: #c0c0c0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
}
:root[data-skin="webcore"] .console-modal .console-prompt-row { border-top-color: #c0c0c0; padding: 6px 10px 8px; }
:root[data-skin="webcore"] .console-modal .console-prompt,
:root[data-skin="webcore"] .console-modal .console-line-cmd,
:root[data-skin="webcore"] .console-modal .console-line-section,
:root[data-skin="webcore"] .console-modal .console-input[data-word="cmd"] { color: var(--wc-focus) !important; }   /* the chosen accent, as the desktop paints them */
:root[data-skin="webcore"] .console-modal .console-line-secret,
:root[data-skin="webcore"] .console-modal .console-input[data-word="secret"] { color: #ffff80 !important; }
:root[data-skin="webcore"] .console-modal .console-line-error-prefix { color: #ff8080; }
:root[data-skin="webcore"] .console-modal .console-out ::selection,
:root[data-skin="webcore"] .console-modal .console-input::selection { background: var(--wc-select); color: var(--wc-on-select); }

/* The CLI stage under the skin: its prompt row is the terminal's, never the skin's white well. */
:root[data-skin="webcore"] .cli-stage .cli-input,
:root[data-skin="webcore"] .cli-stage .cli-input:focus,
:root[data-skin="webcore"] .cli-stage .cli-input:hover {
    font-family: 'Menlo', 'Consolas', 'DejaVu Sans Mono', monospace !important;
    font-size: 13px !important;
    color: inherit !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
}
