/* Surrey ACF theme for Webshark (cyberchef.surreyacf.org.uk/webshark).
   Added to the page by nginx (sub_filter), so the Docker image itself is untouched.
   Packet rows keep Wireshark's own protocol colours (set per row by the app). */
@import url("https://fonts.googleapis.com/css2?family=Black+Ops+One&family=Barlow+Condensed:wght@500;600&family=Barlow:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
    --acf-bg: #1a1c13;
    --acf-panel: #24271b;
    --acf-panel-2: #2c3021;
    --acf-line: #3a3f2b;
    --acf-text: #e8ead9;
    --acf-muted: #a9ad94;
    --acf-olive: #9eae5b;
    --acf-olive-deep: #3b4420;
    --acf-amber: #e3ae28;
}

html, body { background: var(--acf-bg) !important; color: var(--acf-text) !important; }
body, .mat-typography, .mat-mdc-table, .mat-mdc-header-cell, .mat-mdc-cell, td, th, input, button, .mdc-button__label {
    font-family: Barlow, "Helvetica Neue", Arial, sans-serif !important;
}

/* Top bar: olive with the stencil title, the capture button in amber. */
mat-toolbar.mat-toolbar, .mat-toolbar.mat-primary {
    background: var(--acf-olive-deep) !important;
    color: var(--acf-text) !important;
    border-bottom: 1px solid var(--acf-line);
}
.mat-toolbar-row > div:first-child {
    font-family: "Black Ops One", system-ui, sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: .08em;
    color: var(--acf-olive);
}
mat-toolbar .mat-mdc-raised-button, mat-toolbar .mat-mdc-unelevated-button, mat-toolbar button.mdc-button {
    background: var(--acf-amber) !important;
    color: #1a1c13 !important;
}
mat-toolbar .mat-icon { color: var(--acf-text); }

/* Page, side panels and the space under the panes. */
.mat-drawer-container, .mat-drawer, .mat-drawer-content, .flex-container, app-webshark > div {
    background: var(--acf-bg) !important;
    color: var(--acf-text) !important;
}

/* Upload box. */
.file-upload-container {
    background: var(--acf-panel) !important;
    border-color: var(--acf-olive) !important;
    color: var(--acf-muted) !important;
}
pcap-uploader .fileselect, pcap-uploader label {
    background: var(--acf-panel) !important;
    border-color: var(--acf-olive) !important;
    color: var(--acf-muted) !important;
}

/* Menus row (Endpoints, Statistics...) and its buttons. */
.mat-mdc-button:not(:disabled), .mat-mdc-button .mdc-button__label, .mat-mdc-icon-button { color: var(--acf-text) !important; }
.mat-mdc-button .mat-icon, .mat-mdc-icon-button .mat-icon { color: var(--acf-amber); }

/* Filter boxes. */
input, .mat-mdc-input-element, .field-sticky {
    background: var(--acf-panel) !important;
    color: var(--acf-text) !important;
    caret-color: var(--acf-amber) !important;
    border-color: var(--acf-line) !important;
}
input::placeholder { color: var(--acf-muted) !important; opacity: 1; }

/* Packet list: dark headers; rows keep their protocol colours. */
.mat-mdc-table, table { background: var(--acf-bg) !important; }
.mat-mdc-header-row, thead th, .mat-mdc-header-cell {
    background: var(--acf-panel) !important;
    color: var(--acf-amber) !important;
    font-family: "Barlow Condensed", sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-color: var(--acf-line) !important;
}
.mat-sort-header-arrow { color: var(--acf-amber) !important; }
.mat-mdc-row td { border-color: rgba(0, 0, 0, .18) !important; }
/* Selected packet (the app paints it indigo with white text). */
tr.mat-mdc-row[style*="63, 81, 181"] { background-color: var(--acf-olive-deep) !important; outline: 1px solid var(--acf-amber); outline-offset: -1px; }
.mat-icon.mat-primary { color: var(--acf-amber) !important; }

/* Hex / binary / text pane. */
app-frame-hex, app-frame-hex .panel {
    background: var(--acf-bg) !important;
    color: var(--acf-text) !important;
}
app-frame-hex .col-index { background: var(--acf-panel) !important; color: var(--acf-muted) !important; }
app-frame-hex, app-frame-hex *:not(.mat-icon) { font-family: "IBM Plex Mono", Consolas, monospace !important; }
.mat-button-toggle-group, .mat-button-toggle {
    background: var(--acf-panel) !important;
    color: var(--acf-muted) !important;
    border-color: var(--acf-line) !important;
}
.mat-button-toggle-checked { background: var(--acf-olive-deep) !important; color: var(--acf-amber) !important; }
.mat-button-toggle .mat-button-toggle-label-content { font-family: "Barlow Condensed", sans-serif !important; letter-spacing: .1em; }

/* Packet details tree. */
.mat-tree, .mat-tree-node, mat-tree-node, mat-nested-tree-node, .cdk-tree {
    background: var(--acf-bg) !important;
    color: var(--acf-text) !important;
}
.mat-tree, .mat-tree *:not(.mat-icon) { font-family: "IBM Plex Mono", Consolas, monospace !important; }
.mat-tree .mat-icon, .mat-tree .mat-mdc-icon-button { color: var(--acf-muted) !important; }

/* Menus and dialogs. */
.mat-mdc-menu-panel, .mat-mdc-dialog-surface, .mdc-dialog__surface, .cdk-overlay-pane .mat-mdc-select-panel {
    background: var(--acf-panel-2) !important;
    color: var(--acf-text) !important;
}
.mat-mdc-menu-item, .mat-mdc-menu-item .mat-icon, .mat-mdc-option { color: var(--acf-text) !important; }
.mat-mdc-menu-item:hover:not([disabled]) { background: #363b28 !important; }

::-webkit-scrollbar { width: 10px; height: 10px; background: var(--acf-bg); }
::-webkit-scrollbar-thumb { background: var(--acf-line); border-radius: 5px; }

/* Pane dividers. */
.as-split-gutter { background-color: var(--acf-line) !important; }
.as-split-gutter-icon { filter: invert(1) brightness(.7); }
