@import url('https://fonts.googleapis.com/css?family=Roboto');

/* Theme tokens. Hosts restyle django-bom by redefining these after style.css loads; every rule that
   reads one falls back to the same default. See docs/style-guide.md. */
:root {
    --color-background: #fff;
    --color-background-surface: #e0e0e0;
    --color-background-surface-hover: #f1f3f4;
    --color-text: #212121;
    --color-text-grey: #616161;
    --color-primary: #66bb6a;
    --color-primary-surface: #dcefdf;
    --color-primary-contrast: #2e7d32;
    --color-text-on-primary: #fff;
    --color-link: #039be5;
    --color-error: #f44336;
    --color-error-surface: #ffebee;
    --color-warning: #f9a825;
    --color-warning-surface: #fff3cd;
    --color-info: #283593;
    --color-info-surface: #e3e8fb;
    --color-table-stripe: #f5f5f5;
}

html {
    line-height: normal;
}

a {
    color: var(--color-link, #039be5);
}

main {
    min-height: 100vh;
}

p, li {
    font-size: 1.1rem; /* Slightly larger to compensate for thin weight */
    font-weight: 300;
}

/* We use significant size differences to replace the lack of bold weights */
h1 {
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1.1;
}

h2 {
    font-size: 2.0rem;
    font-weight: 300;
}

h3 {
    font-size: 1.7rem;
    font-weight: 300;
}

h4 {
    font-size: 1.4rem;
    font-weight: 300;
}

h5 {
    font-size: 1.1rem;
    font-weight: 400;
}

td, tr {
    padding-right: 1px;
    padding-left: 1px;
    min-width: 40px;
}

.tight td, .tight th {
    padding: 6px 12px;
    font-size: 13px;
}

.text-small {
    font-size: .75em;
}

.text-normal {
    font-size: 1em;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.single-line {
    white-space: nowrap;
}

.table-action {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 2. Tighten icons so they don't stretch the row height */
.table-action .material-icons {
    font-size: 1.1rem !important;
    margin-right: 4px;
}

/* 3. Give consecutive actions a little breathing room */
.table-action + .table-action {
    margin-left: 12px;
}

.responsive-table-wrapper {
    overflow-x: auto;
    padding-bottom: 16px;
    /*min-width: 100%;
    max-width: 110%;
    margin: 0 -5%;*/
}

.autocomplete-content {
    opacity: .8;
    position: absolute;
    width: 100%;
}

.hidden {
    display: none;
}

.page-footer {
    margin-top: 50px;
}

.tabs {
    height: 40px;
    box-shadow: inset 0 -1px 0 rgba(128, 128, 128, 0.3);
}

.tabs .tab {
    line-height: 40px;
    height: 40px;
}

.tabs .tab a {
    color: var(--color-text-grey, #616161);
    font-weight: 500;
    text-transform: none;
    font-size: 15px;
}

.tabs .tab a:hover, .tabs .tab a.active {
    background-color: transparent;
    color: var(--color-primary-contrast, #2e7d32);
}

.tabs .tab.disabled a, .tabs .tab.disabled a:hover {
    color: #bdbdbd;
}

.tabs .indicator {
    background-color: #43a047;
    height: 3px;
}

.tabs .tab a:focus, .tabs .tab a:focus.active {
    background-color: transparent;
}

/* Alerts */
.alert {
    padding: 5px;
    background-color: #dcedc8; /* light green lighten-4 */
    margin: 5px;
    border: solid #aed581 1px; /* light green lighten-2 */
    border-radius: 10px;
}

.alert-error {
    color: white;
    background-color: var(--color-error, #f44336); /* red */
    border: solid #e57373 1px; /* red lighten-2 */
}

.alert-warning {
    background-color: #f0f4c3; /* lime lighten-4 */
    border: solid #dce775 1px; /* lime lighten-2 */
}

.messages.tags {
    font-weight: bold;
}

/* Override treetable icon */
table.treetable tr.collapsed span.indenter a {
    background-image: url("../img/_ionicons_svg_md-arrow-dropright.dc362c982a1d.svg");
}

table.treetable tr.expanded span.indenter a {
    background-image: url("../img/_ionicons_svg_md-arrow-dropdown.6ab911079db7.svg");
}

/* Override Materialize container */
.container-app {
    margin: 0 auto;
    max-width: none;
    width: 95%;
}

@media only screen and (min-width: 601px) {
    .container-app {
        width: 95%;
    }
}

@media only screen and (min-width: 993px) {
    .container-app {
        width: 90%;
    }
}

.primary-color {
    color: var(--color-primary, #66bb6a);
}

/* One shape and case for every button, matching .btn-outline and the pill pickers. */
.btn, .btn-large, .btn-small, .btn-flat {
    border-radius: 18px;
    text-transform: none;
    letter-spacing: 0;
}

.btn-icon-round {
    border-radius: 50%;
    padding: 0 8px;
}

.file-field .btn, .file-field .btn-large, .file-field .btn-small {
    background-color: var(--color-primary, #66bb6a);
    color: var(--color-text-on-primary, #fff);
}

.btn-flat, .btn-flat:focus {
    color: var(--color-text, #343434);
    background-color: var(--color-background-surface, #f5f5f5);
}

.btn-primary, .btn-primary:focus {
    background-color: var(--color-primary, #66bb6a);
    color: var(--color-text-on-primary, #fff);
}

/* Hovering mixes a little of the label colour into the button, so it shows on light and dark themes. */
.btn-flat:hover {
    background-color: color-mix(in srgb, var(--color-background-surface, #f5f5f5) 88%, var(--color-text, #343434));
}

.btn-primary:hover {
    background-color: color-mix(in srgb, var(--color-primary, #66bb6a) 85%, var(--color-text-on-primary, #fff));
    color: var(--color-text-on-primary, #fff);
}

/* Materialize paints .btn-floating icons white regardless of the button colour. */
.btn-floating.btn-primary i {
    color: var(--color-text-on-primary, #fff);
}

.btn-danger, .btn-danger:focus {
    background-color: var(--color-error, #f44336);
}

.btn-danger:hover {
    background-color: color-mix(in srgb, var(--color-error, #f44336) 85%, #fff);
}

.empty-state {
    margin: 24px 0;
    text-align: center;
    color: var(--color-text-grey, #616161);
}

td.empty-state {
    padding: 32px 12px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin: 20px 0;
}

.text-nowrap {
    white-space: nowrap;
}

.text-grey {
    color: var(--color-text-grey, #616161);
}

.text-primary {
    color: var(--color-primary-contrast, #2e7d32);
}

.text-error, .dropdown-content li > a.text-error {
    color: var(--color-error, #f44336);
}

a.anchor {
    display: block;
    position: relative;
    top: -64px;
    visibility: hidden;
}

.materialize-checkbox-padding div {
    padding: 14.5px 0;
}

/* Material dropdowns tighter */
.dropdown-content li > a, .dropdown-content li > span {
    padding: 12px 16px; /* Standard Material padding */
    line-height: 20px;
}

.dropdown-content li {
    min-height: 40px;
}

/* table of contents styling */
/*#toc div.h1 { margin-left: 0 }*/
#toc li.h2 {
    margin-left: 0
}

#toc li.h3 {
    margin-left: 1em
}

#toc li.h4 {
    margin-left: 2em
}

#toc li.h5 {
    margin-left: 3em
}

/* Printer friendly */
.printer-show {
    display: none;
}

@media print {
    .container {
        width: 8.5in;
    }

    body {
        font-family: verdana, arial, sans-serif;
        /*transform: scale(.7);*/
        /*transform-origin: left top;*/
    }

    main {
        min-height: 0;
    }

    html {
        height: 100%;
    }

    .navbar-fixed {
        display: none;
    }

    .sidenav {
        display: none;
    }

    footer {
        display: none;
    }

    .printer-show {
        display: block;
    }

    .printer-hide {
        display: none;
    }

    .modal {
        display: none;
    }

    .dropdown-content {
        display: none;
    }

    .dropdown-trigger {
        display: none;
    }

    table {
        page-break-inside: avoid;
    }

    .pagination, .fixed-action-btn, #searchForm, .part-list-actions, .checkbox-column {
        display: none;
    }

    .responsive-table-wrapper {
        overflow-x: visible;
    }
}

/* --- Settings & Admin Layout Refinements (flat, Material-inspired) --- */
/* Scoped to .container-app so marketing pages and legacy views remain unchanged. */

/* Section spacing for denser admin/settings layouts */
.container-app .section {
    padding-top: 16px;
    padding-bottom: 16px;
}

/* Consistent section headers with optional leading/trailing icons */
.container-app .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px 0;
    letter-spacing: 0.2px;
    font-weight: 500;
}

.container-app .section-title .material-icons {
    line-height: 1;
}

.container-app .section-title img {
    height: 1.8rem;
    margin-left: 6px;
    vertical-align: middle;
}

/* When a service logo/image is used as a leading icon, adjust spacing */
.container-app .section-title img:first-child {
    margin-left: 0;
    margin-right: 6px;
}

/* Comfortable dividers between blocks */
.container-app .divider {
    margin: 16px 0;
}

/* Slightly smaller paragraph text and tighter rhythm in settings */
.container-app .section p {
    margin: 0 0 12px 0;
}

/* Tabs separation from content */
.container-app .tabs {
    margin-bottom: 12px;
}

/* Flat collections (used as key-value lists in settings) */
.container-app .collection.z-depth-0 {
    border: none;
}

.container-app .collection.z-depth-0 .collection-item {
    border: none;
    padding-left: 0;
}

/* Button group spacing in aligned action rows */
.container-app .right-align .btn,
.container-app .right-align .btn-flat {
    margin-left: 4px;
}


/* Master-Detail Settings Layout */
.settings-grid {
    margin-top: 20px;
}

@media only screen and (min-width: 993px) {
    .settings-grid {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
    }
}

.settings-nav {
    padding: 0 !important;
    border-right: 1px solid var(--color-background-surface, #e0e0e0);
    min-height: 70vh;
}

.settings-nav .collection {
    border: none;
    margin: 0;
}

.collection-item .row {
    margin-bottom: 4px;
}

.collection-item .col {
    font-size: 13px;
}

.settings-nav .collection .collection-item {
    border: none;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    margin-right: 12px;
    border-radius: 0 20px 20px 0;
    background-color: transparent;
    color: var(--color-text-grey, #5f6368);
    cursor: pointer;
    transition: background-color 0.2s;
}

.settings-nav .collection .collection-item:hover {
    background-color: var(--color-background-surface-hover, #f1f3f4);
}

/* A translucent green reads as a tint on both the light and dark page backgrounds. */
.settings-nav .collection .collection-item.active {
    background-color: rgba(102, 187, 106, 0.3);
    color: var(--color-text, #000000);
}

.settings-nav .collection .collection-item.active .material-icons {
    color: var(--color-primary, #2e7d32);
}

.settings-nav .collection .collection-item .material-icons {
    margin-right: 16px;
    font-size: 20px;
}

.settings-content {
    padding: 0 40px !important;
}

@media only screen and (max-width: 992px) {
    .settings-nav {
        border-right: none;
        border-bottom: 1px solid var(--color-background-surface, #e0e0e0);
        min-height: auto;
    }

    .settings-content {
        padding: 0 20px !important;
    }
}

/* Longhand margins so .container-app keeps centering the header. */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 20px;
    margin-bottom: 16px;
}

.page-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.page-header h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.2;
    word-break: break-word;
}

.page-header .chip {
    margin: 0 4px;
}

.list-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
    margin-bottom: 8px;
}

.list-filter .input-field {
    margin: 16px 0 0;
}

.list-filter-class {
    flex: 1 1 240px;
    max-width: 360px;
}

.list-filter-search {
    flex: 3 1 320px;
}

.list-filter-submit {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
}

.list-filter-search input[type=search] {
    padding-right: 64px;
    box-sizing: border-box;
}

.list-filter-suffix {
    position: absolute;
    top: 10px;
    right: 0;
    display: flex;
    gap: 4px;
}

.list-filter-suffix a {
    color: var(--color-text-grey, #616161);
}

.pagination {
    padding-top: 24px;
}

.pagination li.active {
    background-color: var(--color-primary, #66bb6a);
}

/* Vertically center form checkboxes with the input-fields beside them in a row -- Materialize
   renders checkbox columns top-aligned, out of line with the taller input-field columns. */
.col:has(> div > label > input[type="checkbox"]) {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    min-height: 3rem;
}

/* Small uppercase label sitting above a value (e.g. "Part", "Revision", "MPN"). */
.eyebrow {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-grey, #616161);
    font-weight: 600;
}

/* Inline metadata whose items are separated by middot dots. */
.inline-meta > span + span::before {
    content: "\00b7";
    margin: 0 8px;
    color: #bdbdbd;
}
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    column-gap: 24px;
}

/* Materialize's auto side margins would shrink and centre each row inside its grid cell. */
.property-grid .row {
    margin: 0;
}

.property-grid .input-field {
    margin-top: 8px;
    margin-bottom: 8px;
}

.property-grid .select-wrapper:has(option[value=""]:checked) input.select-dropdown {
    color: var(--color-text-grey, #9e9e9e);
}

.select-wrapper .caret {
    fill: var(--color-text, rgba(0, 0, 0, 0.87));
}

.edit-page .card-panel h5 {
    margin-top: 0;
}

.edit-page .card-panel h6 {
    margin-top: 24px;
    font-weight: 500;
}

.edit-page .table-toolbar h5 {
    margin-bottom: 0;
}

.edit-page #bom {
    scroll-margin-top: 16px;
}

.edit-page .edit-page-import {
    margin-top: 16px;
}

.edit-page .edit-page-import[open] summary {
    margin-bottom: 16px;
}

.edit-page .cell-input {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: none;
    color: inherit;
    font: inherit;
}

.edit-page .cell-input:hover, .edit-page .cell-input:focus {
    border-color: rgba(128, 128, 128, 0.4);
    outline: none;
}

.edit-page .cell-input:focus {
    border-color: var(--color-primary, #66bb6a);
}

.edit-page .cell-input-qty {
    width: 6em;
}

.edit-page .row-status {
    margin-right: 8px;
    font-size: 12px;
}

.edit-page .edit-page-radios {
    padding-top: 2.2rem;
}

.edit-page .edit-page-radio {
    margin-right: 16px;
}

.edit-page .edit-page-add {
    margin-top: 8px;
}

.edit-page .edit-page-cost {
    max-width: 320px;
}

.edit-page .edit-page-cost td {
    padding: 6px 0;
}

.edit-page .edit-page-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dropdown-content li > a {
    color: rgba(0, 0, 0, 0.87);
}

.dropdown-content li > a > i.material-icons {
    color: #757575;
}

.dropdown-content li > a > small {
    display: block;
    margin-left: 48px;
    font-size: 0.8rem;
    line-height: 1.2rem;
}

.icon-button {
    display: inline-flex;
    padding: 6px;
    border-radius: 50%;
    color: #9e9e9e;
}

.icon-button:hover {
    background: rgba(128, 128, 128, 0.15);
}

/* A full-size row action would set every row's height in a compact table. */
.tight .icon-button {
    padding: 2px;
}

.tight .icon-button .material-icons {
    font-size: 18px;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(128, 128, 128, 0.4);
    border-radius: 18px;
    background: none;
    color: #43a047;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
}

.btn-outline:hover {
    background: rgba(102, 187, 106, 0.12);
}

.btn-outline .material-icons {
    font-size: 20px;
}

/* Status tints for revisions, change orders and approval: light surfaces with dark ink, so they read
   on a dark page too. span.badge.chip-review beats Materialize's span.badge.new colours for the nav count. */
.chip-draft {
    background: #fff3cd;
    color: #6d4c00;
}

.chip-review, span.badge.chip-review {
    background: #e3e8fb;
    color: #283593;
}

.chip-ok {
    background: #dcefdf;
    color: #1b5e20;
}

.chip-neutral {
    background: #eeeeee;
    color: #616161;
}

.btn-outline-danger {
    color: #e53935;
}

.btn-outline-danger:hover {
    background: rgba(229, 57, 53, 0.1);
}

.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 36px;
    margin-bottom: 8px;
}

.table-toolbar-start,
.table-toolbar-end {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Segmented control for switching views: BOM layout, where-used scope and MCP clients. */
.view-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 3px;
    border-radius: 20px;
    background: var(--color-background-surface, #eeeeee);
    font-size: 14px;
}

.view-toggle > a,
.view-toggle > span,
.view-toggle > label {
    padding: 5px 14px;
    border-radius: 17px;
    line-height: 20px;
    font-size: 14px;
    color: var(--color-text-grey, #616161);
    cursor: pointer;
}

.view-toggle > a:hover,
.view-toggle > label:hover {
    color: var(--color-text, #212121);
}

.view-toggle > .active,
#mcp-client-claude:checked ~ .view-toggle label[for=mcp-client-claude],
#mcp-client-claude-code:checked ~ .view-toggle label[for=mcp-client-claude-code],
#mcp-client-cursor:checked ~ .view-toggle label[for=mcp-client-cursor],
#mcp-client-vscode:checked ~ .view-toggle label[for=mcp-client-vscode],
#mcp-client-other:checked ~ .view-toggle label[for=mcp-client-other] {
    background: var(--color-background, #ffffff);
    color: var(--color-text, #212121);
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    cursor: default;
}

.table-toolbar .view-toggle {
    margin-right: 8px;
}

/* Sortable tables look like the plain ones: same header font and padding, no header band, and a sort arrow
   that sits just past the label (on hover or once sorted) without widening the column. Sortability shows on
   hover, and the sorted column stays highlighted. */
table.tablesorter-materialize thead th,
table.tablesorter-materialize thead th.tablesorter-header {
    padding: 6px 12px;
    font-family: inherit;
    font-size: 13px;
    line-height: normal;
    white-space: nowrap;
    background-color: transparent;
    background-image: none;
}

table.tablesorter-materialize .tablesorter-header-inner {
    position: relative;
    display: inline-block;
    padding: 0;
}

table.tablesorter-materialize .tablesorter-header-inner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 9px;
    height: 9px;
    margin: -4px 0 0 2px;
    background: no-repeat center / contain;
}

table.tablesorter-materialize thead th.tablesorter-header:not(.sorter-false) {
    cursor: pointer;
}

table.tablesorter-materialize thead th.tablesorter-header:not(.sorter-false):hover {
    background-color: rgba(128, 128, 128, 0.12);
}

table.tablesorter-materialize thead th.tablesorter-headerAsc,
table.tablesorter-materialize thead th.tablesorter-headerDesc {
    color: #43a047;
}

table.tablesorter-materialize thead th.tablesorter-headerUnSorted:not(.sorter-false):hover .tablesorter-header-inner::after {
    background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDI0IDE2Ij48cGF0aCBkPSJNMTUgOCAxIDggOCAwek0xNSA5IDEgOSA4IDE2eiIgZmlsbD0iIzllOWU5ZSIvPjwvc3ZnPg==);
}

table.tablesorter-materialize thead th.tablesorter-headerAsc .tablesorter-header-inner::after {
    background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDI0IDE2Ij48cGF0aCBkPSJNMTUgMTEgMSAxMSA4IDN6IiBmaWxsPSIjNDNhMDQ3Ii8+PC9zdmc+);
}

table.tablesorter-materialize thead th.tablesorter-headerDesc .tablesorter-header-inner::after {
    background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDI0IDE2Ij48cGF0aCBkPSJNMTUgNiAxIDYgOCAxM3oiIGZpbGw9IiM0M2EwNDciLz48L3N2Zz4=);
}

.settings-disclosure > summary {
    cursor: pointer;
    list-style-position: outside;
    margin-left: 18px;
}

.settings-disclosure[open] > summary {
    margin-bottom: 16px;
}

.settings-disclosure > summary h5 {
    display: inline;
    margin: 0 8px 0 0;
}

/* Colors come from IndaBOM's theme variables when present, so the panel follows its light and dark modes. */
.mcp-quickstart {
    border: 1px solid var(--color-background-surface, #e0e0e0);
    border-radius: 12px;
    padding: 16px 20px 20px;
    max-width: 760px;
}

.mcp-quickstart > input[type=radio] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mcp-quickstart > .view-toggle {
    margin-bottom: 16px;
}

.mcp-client-panel {
    display: none;
}

.mcp-client-panel ol {
    margin: 0;
    padding-left: 20px;
}

.mcp-client-panel li + li {
    margin-top: 12px;
}

.mcp-client-panel p {
    margin: 0 0 12px 0;
}

#mcp-client-claude:checked ~ #mcp-panel-claude,
#mcp-client-claude-code:checked ~ #mcp-panel-claude-code,
#mcp-client-cursor:checked ~ #mcp-panel-cursor,
#mcp-client-vscode:checked ~ #mcp-panel-vscode,
#mcp-client-other:checked ~ #mcp-panel-other {
    display: block;
}

.mcp-quickstart > input[type=radio]:focus-visible ~ .view-toggle {
    outline: 2px solid var(--color-primary, #00695c);
    outline-offset: 2px;
}

.copy-field {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 4px 4px 4px 12px;
    border: 1px solid var(--color-background-surface, #e0e0e0);
    border-radius: 8px;
    background: var(--color-background-surface-hover, #f5f5f5);
}

.copy-field code {
    flex: 1;
    overflow-wrap: anywhere;
    background: none;
}

.copy-button {
    display: flex;
    padding: 6px;
    border: none;
    border-radius: 6px;
    background: none;
    cursor: pointer;
    color: var(--color-text-grey, #757575);
}

.copy-button:hover {
    background: var(--color-background-surface, #e0e0e0);
    color: var(--color-text, #212121);
}

.copy-button .material-icons {
    font-size: 18px;
}

/* OAuth consent page */
.consent {
    max-width: 480px;
    margin: 32px auto;
}

/* Materialize's card sections keep square corners, so clip them to the host's rounded card. */
.consent .card {
    overflow: hidden;
}

.consent p {
    font-size: 1rem;
}

.consent .card-content .consent-question {
    margin: 24px 0 8px;
}

.consent .card-content .consent-choice {
    margin: 0 0 12px;
}

/* Materialize fixes radio labels to one 25px line; let the helper text wrap underneath. */
.consent .consent-choice [type="radio"] + span {
    display: block;
    height: auto;
}

.consent .consent-choice-help {
    display: block;
    font-size: 0.875rem;
    line-height: 1.4;
}

.consent .consent-note {
    font-size: 0.875rem;
    margin: 0;
}

/* Change order page: rgba tints so additions, removals and changes read on light and dark backgrounds. */
.change-page, .change-notice {
    --change-add: rgba(67, 160, 71, 0.14);
    --change-add-ink: var(--color-primary-contrast, #2e7d32);
    --change-remove: rgba(229, 57, 53, 0.12);
    --change-remove-ink: var(--color-error, #f44336);
    --change-edit: rgba(255, 179, 0, 0.18);
    --change-edit-ink: var(--color-warning, #f9a825);
}

.change-byline {
    margin: 0;
}

.change-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.change-reject summary {
    list-style: none;
    cursor: pointer;
}

.change-reject summary::-webkit-details-marker {
    display: none;
}

.change-reject {
    position: relative;
}

.change-reject form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 5;
    width: min(440px, 90vw);
    margin: 8px 0 0;
    padding: 16px;
}

.change-add-part input[type=text] {
    min-height: 2.5rem;
}

.change-reject textarea,
.change-add-part input[type=text] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(128, 128, 128, 0.4);
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
}

.change-reject textarea {
    min-height: 4.5rem;
}

.change-sent-back, .change-notice {
    margin: 16px 0;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--change-edit);
    box-shadow: inset 3px 0 0 var(--change-edit-ink);
}

.change-notice {
    margin-top: 0;
}

.release-change-order {
    max-width: 480px;
}

.change-sent-back p, .change-notice p {
    margin: 0 0 4px;
    max-width: 80ch;
}

.change-label {
    display: block;
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-grey, #616161);
}

.change-why {
    margin: 16px 0 20px;
}

.change-why p {
    margin: 0;
    max-width: 80ch;
}

.change-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 0 16px;
    align-items: start;
}

/* The heading takes the first row of the left column, so the side panel starts level with the first card. */
.change-columns > .change-list-head {
    grid-column: 1;
    margin-bottom: 8px;
}

.change-sections {
    grid-column: 1;
}

.change-sections > .card-panel:first-child {
    margin-top: 0;
}

.change-side {
    grid-column: 2;
}

@media only screen and (max-width: 992px) {
    .change-columns {
        grid-template-columns: 1fr;
    }

    .change-side {
        grid-column: 1;
    }

    .change-reject form {
        right: auto;
        left: 0;
    }

    .change-actions {
        justify-content: flex-start;
    }
}

.change-sections .change-part {
    padding: 0;
    overflow: hidden;
}

.change-part-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}

.change-part-head a {
    font-weight: 500;
}

.change-part-head .chip {
    margin: 0;
}

.change-part-edit {
    margin-left: auto;
}

.change-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.change-list-head h5 {
    margin: 0;
    font-size: 1.15rem;
}

.change-form form {
    max-width: 640px;
    padding: 20px 24px 24px;
}

.change-form label {
    display: block;
    margin: 16px 0 4px;
    color: inherit;
}

.change-form label:first-of-type {
    margin-top: 0;
}

.change-form input[type=text],
.change-form textarea {
    width: 100%;
    min-height: 2.5rem;
    padding: 8px 10px;
    border: 1px solid rgba(128, 128, 128, 0.4);
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
}

.change-form textarea {
    min-height: 5rem;
}

.change-form form p {
    margin: 4px 0 0;
}


.change-add-part p {
    margin: 0;
}

.part-search {
    position: relative;
    width: 100%;
}

.part-search-options {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 6;
    max-height: 18rem;
    margin: 4px 0 0;
    padding: 4px 0;
    overflow-y: auto;
    border: 1px solid rgba(128, 128, 128, 0.4);
    border-radius: 8px;
    background: var(--color-background, #fff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.part-search-options li {
    padding: 6px 10px;
    cursor: pointer;
}

.part-search-options li small {
    display: block;
    color: var(--color-text-grey, #616161);
}

.part-search-options li:hover,
.part-search-options li[aria-selected=true] {
    background: var(--color-background-surface-hover, #f1f3f4);
}

.part-search-options li[aria-disabled=true] {
    cursor: default;
    opacity: 0.6;
}

.part-search-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.change-section + .change-section {
    border-top: 1px solid rgba(128, 128, 128, 0.25);
}

.change-section-heading {
    margin: 0;
    padding: 12px 16px 0;
}

.change-new {
    background: var(--change-add);
    color: inherit;
}

.change-revision-arrow {
    color: var(--color-text-grey, #616161);
}

.change-bom {
    font-variant-numeric: tabular-nums;
}

.change-bom th,
.change-bom td {
    padding: 8px 12px;
    vertical-align: top;
}

.change-bom tr.change-add td {
    background: var(--change-add);
}

.change-bom tr.change-add td:first-child {
    box-shadow: inset 3px 0 0 var(--change-add-ink);
}

.change-bom tr.change-remove td {
    background: var(--change-remove);
}

.change-bom tr.change-remove td:first-child {
    box-shadow: inset 3px 0 0 var(--change-remove-ink);
}

.change-bom tr.change-remove td:nth-child(-n+4) {
    text-decoration: line-through;
    text-decoration-color: var(--change-remove-ink);
}

.change-bom tr.change-change td:first-child {
    box-shadow: inset 3px 0 0 var(--change-edit-ink);
}

.change-sign {
    display: inline-block;
    width: 14px;
    font-weight: 500;
}

.change-add .change-sign {
    color: var(--change-add-ink);
}

.change-remove .change-sign {
    color: var(--change-remove-ink);
}

.change-mono {
    font-family: "Roboto Mono", ui-monospace, Menlo, monospace;
    font-size: 0.9rem;
}

.change-old {
    color: var(--color-text-grey, #616161);
}

.change-new-value {
    padding: 0 4px;
    border-radius: 4px;
    background: var(--change-edit);
}

.change-note,
.change-fields {
    padding: 12px 16px;
}

.change-note + .change-note,
.change-fields + .change-fields {
    border-top: 1px solid rgba(128, 128, 128, 0.25);
}

.change-note p {
    margin: 0;
}

.change-fields dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 0;
}

.change-fields dt {
    color: var(--color-text-grey, #616161);
}

.change-fields dd {
    margin: 0;
}

.change-side {
    display: grid;
    gap: 12px;
}

.change-side .card-panel {
    margin: 0;
    padding: 12px 16px;
}

.change-facts .change-fact + .change-fact {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(128, 128, 128, 0.25);
}

.change-fact p {
    margin: 4px 0 0;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.4;
}

.change-cost {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 12px;
    font-variant-numeric: tabular-nums;
}

.change-increase {
    color: var(--change-remove-ink);
}

.change-decrease {
    color: var(--change-add-ink);
}
