/* ── Print ────────────────────────────────────────────────────── */

@media print {
    #the-view > * {
        display: none !important; /* !important overrides various !important rules in aco-layout/Bootstrap. */
    }

    #the-view > .printable {
        display: revert !important;
    }
}

@media not print {
    #print-parts-needed {
        display: none;
    }
}

/* ── General ──────────────────────────────────────────────────── */

.square-selector-button {
    padding: 0.1rem;
    width: 2.5rem;
    height: 2.5rem;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* ── Sidebar ──────────────────────────────────────────────────── */

.sidebar {
    width: 19rem;
    flex-shrink: 0;
}

/* ── Language selector buttons ───────────────────────────────────── */

.language-button:hover {
    opacity: 1 !important; /* !important overrides Bootstrap's opacity-50 utility. */
}

/* ── Shape selector ───────────────────────────────────── */

.shape-button svg path {
    fill: none;
    stroke: black;
    stroke-width: 8;
}

/* ── Dimensions configuration ──────────────────────────────────── */

.system-dimensions {
    height: 11rem; /* Prevents layout shifting when its content changes. */
}

/* ── Grating selector buttons ───────────────────────────────────── */

.grating-button {
    opacity: 0.65;
    padding: 0; /* So that the SVG inside can fill the entire button. */
}

.grating-button:hover {
    opacity: 1;
}

.grating-button.selected {
    border-color: #222 !important; /* !important overrides Bootstrap's border utility. */
    opacity: 1;
}

/* ── Parts table ──────────────────────────────────────────────── */

.parts-table {
    --bs-table-bg: transparent;
}

.parts-table .article-image-container {
    width: 3rem;
    height: 3rem;
}

@media print {
    .parts-table td {
        padding-top: 0.1rem;
        padding-top: 0.1rem;
    }
}

@media not print {
    .parts-table .article-image-column img {
        border: 1pt solid #bbb;
    }
}

.parts-table th.quantity-column,
.parts-table td.quantity-column {
    width: 2.5rem;
}

.parts-table th.article-name-column,
.parts-table td.article-name-column {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0; /* Allows the td to shrink below content width so overflow: hidden takes effect. */
}

.parts-table td:not(:first-child) {
    border-left: none; /* `table` class in `aco-layout` sets a border. */
}

/* ── Visualization main area ──────────────────────────────────── */


.visualization-main svg {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 4rem);
}

@media print {
    .visualization-main svg {
        max-height: 50%;
    }
}

/* ── Outlet slots ──────────────────────────────────────────────── */

.outlet-slot {
    cursor: pointer;
}

.outlet-slot__indicator {
    fill: transparent;
}

.outlet-slot:hover .outlet-slot__indicator {
    fill: rgba(0, 100, 200, 0.3);
}
