@import url("../fonts/regular_font.css");
@import url("../fonts/bold_font.css");
@import url("../fonts/exo2_font.css");

/* body text, buttons, form fields, small text: Exo 2 (headings, h5, .toolHeader and
   .largeActionText keep the Europe fonts). Chinese characters fall back to the system font. */
:root {
    --font-body: "Exo 2", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
    --bs-font-sans-serif: var(--font-body);
    --bs-body-font-family: var(--font-body);
    --font-design-text: var(--font-body);
}

/* darker borders for input fields, dropdowns, checkboxes and tabs (the theme's #dee2e6 was too light);
   separator lines (tables, modals, accordion) keep the light theme colour */
input, select, textarea,
.form-control, .form-select, .form-check-input {
    --bs-border-color: #a3acb5;
}

/* input fields, dropdowns & text areas: one style everywhere (config page, admin, pop-ups / message boxes):
   1px grey border, 4px rounding. :where() = no specificity, so hover / focus / page-specific rules still win */
:where(input:not([type="radio"], [type="checkbox"], [type="range"], [type="color"], [type="file"], [type="hidden"]), select, textarea) {
    border: 1px solid #767676;
    border-radius: 4px;
}

.form-control, .form-select {
    --bs-border-color: #767676;
    border-radius: 4px;
}

/* tabs: darker border, light blue background on hover */
.nav-tabs {
    --bs-border-color: #7d8791;
    --bs-nav-tabs-link-hover-border-color: #c3d8e6 #c3d8e6 var(--bs-border-color);
}

.nav-tabs .nav-link:not(.active):not(:disabled):hover {
    background-color: #eef4f8;
}

.tooltip, .popover {
    font-family: var(--font-body);
}

p {
    color: #005480;
    font-size: 18px;
}

li {
    color: #005480;
}

span {
    color: #000000;
}

h4 {
    font-size: 24px;
}

h4.accTitle {
    font-size: 20px !important;
    padding-top: 12px;
    padding-bottom: 12px;
}

h5 {
    font-size: 21px;
    text-align: center;
    font-weight: bold;
}

.centered-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.toolHeader {
    text-align: center;
    font-weight: normal;
    font-size: 18px;
    font-family: 'Europe Regular';
    color: #005480;
    display: block;
}

.lineContainer {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px;
}

.lineColumn {
    width: 640px;
    height: 460px;
    border: solid;
    border-color: #005480;
    border-radius: 10px;
    border-width: 1px;
    text-align: left;
    padding: 48px 30px 60px;
    box-sizing: border-box;
}

.lineBox {
    width: 100%;
    border: solid;
    border-color: #005480;
    border-radius: 10px;
    border-width: 1px;
    padding-top: 24px;
    padding-bottom: 24px;
    padding-left: 24px;
    padding-right: 24px;
}

.largeActionText {
    color: #d3dbe3;
    text-transform: uppercase;
    font-family: 'europeextbold';
    font-size: 60px;
}

.icon-button {
    align-items: center;
    gap: 10px;
}

.bg-primary {
    transition: background-color 0.3s ease;
}

.bg-primary:hover {
    background-color: #1a648b;
}

.icon-button span {
    display: inline-block;
    font-size: 18px;
}

/* disabled wall system button on the start page: lighter than Bootstrap's default */
.buttonWithTriangle.disabled {
    opacity: 0.32;
}

/* hover / keyboard focus on the wall system buttons: lighter blue, soft shadow, triangle slides right
   (!important because Bootstrap's .bg-primary colour is !important) */
.buttonWithTriangle {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.buttonWithTriangle:not(.disabled):hover,
.buttonWithTriangle:not(.disabled):focus-visible {
    background-color: #1a648b !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.buttonWithTriangle span {
    transition: transform 0.2s ease;
}

.buttonWithTriangle:not(.disabled):hover span,
.buttonWithTriangle:not(.disabled):focus-visible span {
    transform: translateX(4px);
}

.buttonWithTriangle {
    font-family: var(--font-body);
    font-size: 18px;
    margin-bottom: 10px;
}

.footer-text {
    font-size: 12px;
}

/* radio buttons drawn with css (native radios can't show an inner shadow):
   white circle with grey border, blue border + dot when selected, faded when disabled;
   the sizes set inline on the radios (14 / 16 / 18px) still apply */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    vertical-align: middle;
    border: 1px solid #6c757d;
    border-radius: 50%;
    background-color: #ffffff;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

input[type="radio"]:checked {
    border-color: #005480;
    background-image: radial-gradient(circle, #005480 0 40%, transparent 45%);
}

input[type="radio"]:disabled {
    opacity: 0.5;
    cursor: default;
}

/* hover: soft blue inner shadow, also when hovering its label or card (not for disabled radios / unavailable cards) */
input[type="radio"]:not(:disabled):hover,
label:hover input[type="radio"]:not(:disabled),
.product-card:not(.unavailable):hover .card-radio:not(:disabled),
.track-card:not(.disabled):hover .card-radio:not(:disabled) {
    box-shadow: inset 0 0 0 3px rgba(0, 84, 128, 0.15);
    border-color: #4f8fb3;
}

/* hover on input fields & dropdowns: light blue border + very faint inner shadow (not while the field is active / focused) */
input[type="text"],
textarea,
select {
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

input[type="text"]:not(:disabled):not(:focus):hover,
textarea:not(:disabled):not(:focus):hover,
select:not(:disabled):not(:focus):hover {
    border-color: #6f9fbd;
    box-shadow: inset 0 1px 3px rgba(0, 84, 128, 0.05);
}

/* active (focused) input fields, dropdowns & radios: theme blue instead of the browser's own focus colour
   (same ring colour as the theme's .form-control / .form-select focus) */
input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #005480;
    box-shadow: 0 0 0 3px rgba(0, 84, 128, 0.25);
}

input[type="radio"]:focus-visible {
    outline: 2px solid rgba(0, 84, 128, 0.5);
    outline-offset: 2px;
}

/* hover / keyboard focus on the accordion panel headers: slightly lighter blue
   (!important because Bootstrap's .bg-primary colour is !important) */
.accordion-button.bg-primary {
    transition: background-color 0.2s ease;
}

.accordion-button.bg-primary:hover,
.accordion-button.bg-primary:focus-visible {
    background-color: #1a648b !important;
}

.accordion-button {
    height: 48px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 18px;
    font-weight: normal !important;
}

.accordion-button::after,
.accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
    font-weight: normal !important;
}

.accordion,
.accordion-item,
.accordion-button {
    border: none !important;
}

.accordion-button:focus {
    box-shadow: none !important;
    border-color: transparent !important;
}

.accordion-button:not(.collapsed) {
    box-shadow: none !important;
}

.accordion-item {
    margin-bottom: 16px !important;
    background-color: transparent !important;
}

.accordion-item:last-child {
    margin-bottom: 0 !important;
}

input[type="checkbox"].accCheckBox {
    appearance: none;
    -webkit-appearance: none;
    border: none !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 2px !important;
    background-color: #ffffff !important;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
    margin: 0;
    margin-right: 24px;
}

input[type="checkbox"].accCheckBox:checked::before {
    content: "";
    width: 7px;
    height: 13px;
    border: solid #28a745;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* after an incomplete submit: red asterisk in the checkboxes that aren't checked off yet */
.show-missing input[type="checkbox"].accCheckBox:not(:checked)::before,
.missing-mark {
    content: "*";
    color: #dc3545;
    font-weight: 900;
    font-size: 26px;
    line-height: 1;
}

.show-missing input[type="checkbox"].accCheckBox:not(:checked)::before {
    margin-top: 10px; /* an asterisk sits high in its line box */
}

.missing-mark {
    font-size: 22px;
    vertical-align: middle;
}

.selectedTitle {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold !important;
}

.alert {
    border-radius: 5px;
}

/* door handing options while the door position is "none" */
.handing-disabled label {
    color: #a0a0a0;
    cursor: default !important;
}

.handing-disabled input {
    cursor: default !important;
}

/* project details: 3 label + field pairs per row, aligned in straight columns */
.project-details-grid {
    display: grid;
    grid-template-columns: repeat(3, max-content minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 15px;
    align-items: center;
    width: 100%;
    padding: 20px 0;
    box-sizing: border-box;
}

.project-details-grid label {
    white-space: nowrap;
}

/* extra space between the label + field pairs */
.project-details-grid .label-gap {
    padding-left: 24px;
}

.project-details-grid input,
.project-details-grid textarea {
    width: 100%;
    height: 24px;
    box-sizing: border-box;
}

/* the client's logo (optional), above the mandatory note: a subgrid of the form's grid, so the file field is
   in the column of the fields above (the Company / Project Name field without its asterisk) */
.project-details-grid .client-logo-label {
    align-self: start;
    padding-top: 4px;
}

.project-details-grid .client-logo-upload {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: subgrid;
    row-gap: 4px;
    align-items: center;
}

.project-details-grid .client-logo-input {
    grid-column: 1;
    width: calc(100% - 16px);   /* as the required fields: their asterisk + gap beside them */
    height: auto;
}

/* the "Choose file" button light blue (as submit / cancel, bootstrap_theme: btn-dark) */
.project-details-grid .client-logo-input::file-selector-button {
    background-color: #407fa0;
    color: #fff;
}

.project-details-grid .client-logo-input:hover:not(:disabled):not([readonly])::file-selector-button {
    background-color: #5d92ae;
}

.project-details-grid .client-logo-current {
    grid-column: 2 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-details-grid .client-logo-help {
    grid-column: 1 / -1;
}

.project-details-grid .client-logo-preview {
    max-width: 160px;
    max-height: 60px;
    object-fit: contain;
    border: 1px solid #ced4da;
    padding: 2px;
    background: #fff;
}

/* the optional fields (country, contact, telephone, e-mail, remarks): a lighter border, less important */
.project-details-grid .optional-field {
    border: 1px solid #ced4da;
}

/* mandatory field with a red asterisk on the right side */
.project-details-grid .required-field {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.project-details-grid .required-field input {
    flex: 1;
    min-width: 0;
}

.project-details-grid .required-mark {
    color: #dc3545;
    font-weight: bold;
}

/* "* fields are mandatory" note below the remarks, aligned to the right */
.project-details-grid .required-note {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 14px;
    text-align: right;
}

.project-details-grid .remarks-label {
    align-self: start;
    padding-top: 4px;
}

/* exactly 3 lines of text (max 3 lines, see limitRemarks in config.js): no scrollbar, no resizing */
.project-details-grid .remarks-field {
    grid-column: 2 / -1;
    font: inherit;
    line-height: 22px;
    padding: 4px 8px;
    height: calc(3 * 22px + 2 * 4px + 2px); /* 3 lines + padding + border */
    overflow: hidden;
    resize: none;
}

/* small screens: 1 label + field pair per row */
@media (max-width: 767.98px) {
    .project-details-grid {
        grid-template-columns: max-content minmax(0, 1fr);
    }

    .project-details-grid .label-gap {
        padding-left: 0;
    }

    /* the logo's preview below the file field */
    .project-details-grid .client-logo-current {
        grid-column: 1;
    }
}

/* RAL code input: hide the "RAL code" placeholder as soon as the field is clicked */
.ral-code:focus::placeholder {
    color: transparent;
}

/* panel finishing row: double height scrollbar (Chrome / Edge / Safari) */
.finish-row::-webkit-scrollbar,
.product-row::-webkit-scrollbar {
    height: 24px;
}

.finish-row::-webkit-scrollbar-track,
.product-row::-webkit-scrollbar-track {
    background-color: #f1f1f2;
    border-radius: 12px;
}

.finish-row::-webkit-scrollbar-thumb,
.product-row::-webkit-scrollbar-thumb {
    background-color: #a0a0a0;
    border-radius: 12px;
    border: 4px solid #f1f1f2; /* space around the thumb */
}

.finish-row::-webkit-scrollbar-thumb:hover,
.product-row::-webkit-scrollbar-thumb:hover {
    background-color: #808080;
}

/* config.html Product: 4 product cards in view, scroll sideways for more (as the panel finishing);
   phones: the cards below each other, no scroll */
@media (min-width: 768px) {
    .product-row {
        flex-wrap: nowrap;
        gap: 24px;
        overflow-x: auto;
        padding-bottom: 12px;
    }

    .product-row > .card {
        flex: 0 0 calc((100% - 3 * 24px) / 4);
        min-width: 0;
        margin-right: 0;
    }
}

@media (max-width: 767.98px) {
    .product-row {
        flex-direction: column;
    }
}

.tab-row {
    display: grid;
    grid-template-columns: 200px 1fr;
}

/* ------------------------------------------------------ */
.svgBox {
    background-color: #F1F1F2;
    border: solid;
    border-color: #808080;
    border-width: 2px;
    border-top: #808080;
}

.svgToolbar {
    min-height: 64px;   /* higher when the buttons wrap to a 2nd row */
    background-color: #d9d9d9;
    border: solid;
    border-color: #808080;
    border-width: 2px;
}

.toolbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;   /* never cut off: a 2nd row when the buttons don't fit */
    align-items: center;
    gap: 8px;
    padding: 8px;
    width: fit-content;
    width: 100%;
    box-sizing: border-box;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.toolbar-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.toolbar-btn img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    opacity: 0.7;
}

.toolbar-btn:hover img {
    opacity: 1.0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.toolbar-btn:active img {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(1px);
}

/* switched off (e.g. "Send to Parthos" after the drawing was sent) */
.toolbar-btn:disabled {
    cursor: not-allowed;
    background-color: transparent;
}

.toolbar-btn:disabled img {
    opacity: 0.25;
    box-shadow: none;
    transform: none;
}

.tlb-btn-space {
    margin-right: 32px;
}

.tlb-btn-last {
    margin-left: auto;
}

/* tablets & small laptops (768 - 1199 px): less space between the button groups, so the 11 buttons fit in 1 row */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .toolbar {
        gap: 6px;
    }

    .tlb-btn-space {
        margin-right: 12px;
    }
}

/* ------------------------------------------------------ */
.card {
    margin-right: 24px;
    border-width: 2px !important;
    border-style: solid !important;
    border-color: #ffffff !important;
}

.card.selected {
    color: #005480 !important;
}

.card-radio {
    color: #005480;
    transform: scale(1.4);
    align-items: center;
    cursor: pointer;
    vertical-align: middle;
    margin-right: 6px;
    margin-bottom: 4px;
}

/* track & steering cards: the grid sets the spacing, so no extra card margin */
.track-card {
    margin-right: 0;
}

.track-card .card-text {
    font-size: 16px;
}

/* track cards can't be selected until a product is chosen */
.track-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* product not available (set in productAvailability in config.js): 50% white overlay, not selectable */
.product-card.unavailable {
    position: relative;
    cursor: not-allowed;
}

.product-card.unavailable::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.5);
}

/* product & track cards: click the card, outline + bold title when selected */
.product-card,
.track-card {
    cursor: pointer;
    transition: outline 0.2s ease, font-weight 0.2s ease;
    outline: 1px solid transparent;
    border-radius: 0;
}

.product-card.selected,
.track-card.selected {
    outline: 1px solid #1a648b;
}

/* selected product card: outline on the inside of the 2px white card border, right against the image / text */
.product-card.selected {
    outline-offset: -2px;
}

.product-card.selected .card-title,
.track-card.selected .card-title {
    font-weight: bold;
}

.card-title {
    font-size: 21px;
}


/* main header of the message boxes / popups: capitals, like the other headers */
.modal-title {
    text-transform: uppercase;
}

/* help pop-up (tool.html): toolbar icons + short explanations */
.help-body h6 {
    color: #005480;
    font-weight: bold;
    margin-top: 4px;
}

.help-table th,
.help-table td {
    vertical-align: middle;
    font-size: 15px;
}

.help-table th {
    white-space: nowrap;
    font-weight: 600;
    padding-right: 16px;
}

.help-table td:first-child {
    white-space: nowrap;
    width: 1%;
}

.help-table img {
    width: 30px;
    height: 30px;
    opacity: 0.7;
    margin-right: 2px;
}

.help-body li {
    font-size: 15px;
}

.help-body kbd {
    display: inline-block;
    min-width: 24px;
    padding: 1px 6px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 14px;
    color: #000000;
    background-color: #f1f4f7;
    border: 1px solid #a3acb5;
    border-bottom-width: 2px;
    border-radius: 4px;
}

/* terms of use pop-up (js/terms.js) */
.terms-body p,
.terms-body li {
    font-size: 15px;
}

/* terms of use & about: the same look as the privacy policy (privacy.html): black text,
   headings as blue bold text in the body font, the size of the text */
#termsModal .terms-body p,
#termsModal .terms-body li,
#aboutModal .terms-body p,
#aboutModal .terms-body li {
    color: #000000;
}

.terms-body h6 {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    color: #005480;
    margin-top: 0;
    margin-bottom: 16px;
}

.terms-body .terms-date {
    font-size: 13px;
    color: #6c757d;
    margin-top: 16px;
}

/* footer: privacy policy / terms of use / about, spread out with a thin divider between them */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 28px;
    row-gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.footer-links a {
    position: relative;
    color: var(--bs-secondary-color, #6c757d);
    text-decoration: none;
    padding: 2px 0;
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: #005480;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* divider halfway the gap */
.footer-links a + a::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 50%;
    height: 12px;
    border-left: 1px solid #c3cbd3;
    transform: translateY(-50%);
}

@media (max-width: 767.98px) {
    .footer-links {
        justify-content: flex-start;
        column-gap: 20px;
    }

    .footer-links a + a::before {
        left: -10px;
    }
}

/* phones (secondary, but supported): the footer content centred */
@media (max-width: 767.98px) {
    footer .footer-text,
    footer .row > div {
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* index.html on phones: the 2 main boxes below each other (Start on top), full width, as high as their content */
@media (max-width: 767.98px) {
    .lineContainer {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
    }

    .lineColumn {
        width: 100%;
        height: auto;
        padding: 32px 20px 36px;
    }

    .lineColumn .largeActionText {
        font-size: 44px;
    }

    .lineColumn h4 {
        margin-top: -12px !important;   /* the inline -24px is for the 60px "Start" */
    }

    .lineColumn p[style*="margin-top: 80px"] {
        margin-top: 32px !important;
    }
}

/* the other pages on phones: the content box with a side gutter, wide tables scroll sideways,
   cancel / submit share the width */
@media (max-width: 767.98px) {
    .container.lineBox {
        width: auto;
        margin-left: 16px;
        margin-right: 16px;
        padding: 20px 14px;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .submit-row {
        padding: 20px 0 !important;
    }

    .submit-row .btn {
        flex: 1 1 0;
        min-width: 0 !important;
    }

    .agree-terms {
        justify-content: flex-start;
        padding: 24px 0 0;
    }

    /* config.html: the option grids get fewer columns (track & steering: 1, parking & doors: 2, finishes: 3) */
    .phone-grid-1,
    .phone-grid-2,
    .phone-grid-3 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .phone-grid-1 {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .phone-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        row-gap: 28px !important;
    }

    .phone-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 20px !important;
    }
}

/* config.html: mandatory agreement (privacy policy & terms of use) above the cancel / submit buttons */
.agree-terms {
    display: flex;
    justify-content: flex-end;
    padding: 24px 20px 0 20px;
}

.agree-terms .form-check {
    margin: 0;
}

.agree-terms .form-check-label {
    font-size: 16px;
    cursor: pointer;
}

.agree-terms .form-check-input {
    cursor: pointer;
}

.agree-terms a {
    color: #005480;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.agree-terms .required-mark {
    color: #dc3545;
    font-weight: bold;
}

/* admin.php: user row buttons in fixed slots, so they line up in columns */
.user-actions {
    display: inline-grid;
    grid-template-columns: 96px 96px;
    gap: 8px;
    justify-items: stretch;
}

.user-actions form,
.user-actions .btn {
    width: 100%;
    margin: 0;
}

/* admin.php: login details to copy (monospace, so the password is easy to read) */
.credentials-text {
    font-family: Consolas, "Courier New", monospace;
    font-size: 15px;
    resize: none;
    background-color: #f6f8fa;
}

/* admin.php drawings: totals, clean-up box, filters, selection */
.drawings-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.drawings-summary > div {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #6c757d;
}

.drawings-summary span {
    display: block;
    font-size: 22px;
    font-weight: 600;
    color: #005480;
}

.cleanup-box {
    background-color: #f6f8fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 4px 20px 20px 20px;
    margin-bottom: 24px;
}

.cleanup-result {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 0 0;
}

.drawings-filter {
    margin-bottom: 8px;
}

.drawings-count {
    font-size: 14px;
    color: #6c757d;
    min-height: 21px;
    margin: 8px 0;
}

.drawings-table .select-column {
    width: 36px;
}

.bulk-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #6c757d;
}

/* Measurements & panel construction: label | input | unit, the input field centred in its column */
.input-wrapper {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 8px;
}
.input-wrapper .label-left {
    text-align: right;
}
.input-wrapper .label-right {
    text-align: left;
}
.input-wrapper .number-field {
    text-align: center;
}

/* config.html: sound insulation, one row: O none  O 36  O 40 ...  dB (Rw) (the options are built by config.js) */
.sound-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 24px;
}
.sound-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.sound-options input {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
}

/* config.html: an opened panel scrolled back into view keeps a little room above its header */
#panels1 .accordion-item {
    scroll-margin-top: 12px;
}

/* config.html on phones: no choice summary next to the panel titles (no room, it was cut off) */
@media (max-width: 767.98px) {
    .tab-row .selectedTitle {
        display: none;
    }
}

/* config.html on phones: panel finishing with larger thumbnails (3 in view instead of 6, scroll for more)
   and room on both sides */
@media (max-width: 767.98px) {
    .finish-row {
        gap: 24px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        scroll-padding: 0 20px;
    }

    .finish-row > div {
        flex-basis: calc((100% - 2 * 24px) / 3) !important;
    }
}

/* config.html on phones: room between width, height and the product limitations in Measurements */
@media (max-width: 767.98px) {
    #collapseTwo .row > [class*="col-md-"] + [class*="col-md-"] {
        margin-top: 32px;
    }
}

/* tool.html on phones: the toolbar buttons in 2 rows (they did not fit), a lower drawing area (the
   drawing is landscape) and the help pop-up with the explanation below the function name */
@media (max-width: 767.98px) {
    .svgContainer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .svgToolbar {
        height: auto;
        padding: 0;
    }

    .toolbar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 10px;
        padding: 6px;
        max-width: calc(5 * 40px + 4 * 10px + 2 * 6px);   /* 5 buttons per row */
        margin: 0 auto;
    }

    .toolbar-btn {
        width: 40px;
        height: 40px;
    }

    .tlb-btn-space {
        margin-right: 0;
    }

    .tlb-btn-last {
        margin-left: 0;
    }

    /* no fullscreen on the phone layout (also a small tablet in portrait): 2 rows of 5 buttons */
    #btn-fullscreen {
        display: none !important;
    }

    .svg-canvas {
        height: min(420px, 60vh) !important;
    }

    .help-table th {
        white-space: normal;
        padding-right: 8px;
    }

    .help-table tr {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 8px;
        border-bottom: 1px solid var(--bs-border-color);
        padding: 4px 0;
    }

    .help-table th,
    .help-table td {
        border: 0;
        width: auto !important;
        padding: 2px 0;
    }

    /* toolbar table: the icons left, the name and the explanation below each other right of them */
    .help-table tr:has(img) {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .help-table tr:has(img) > td:first-child {
        grid-row: span 2;
    }

    .help-table tr:not(:has(img)) {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* tool.html fullscreen (js/tool.js, not on phones): the toolbar and the drawing on the whole screen */
.svgContainer:fullscreen {
    display: flex;
    flex-direction: column;
    max-width: none;
    width: 100%;
    height: 100%;
    padding: 0;
    background-color: #ffffff;
}

.svgContainer:fullscreen .svgToolbar,
.svgContainer:fullscreen .svgBox {
    max-width: none;
    border-radius: 0 !important;
}

.svgContainer:fullscreen .svgBox {
    flex: 1 1 auto;
    min-height: 0;
}

.svgContainer:fullscreen .svg-canvas {
    height: 100% !important;
}

/* a pop-up in fullscreen: the page's dark background (backdrop) is outside the fullscreen part */
.svgContainer:fullscreen .modal {
    background-color: rgba(0, 0, 0, 0.5);
}

/* config.html Doors: the recommended door positions (a star in the dropdowns, js/config.js) */
.door-recommend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    align-self: flex-start;
    margin-top: 4px;
    padding: 4px 10px;
    font-size: 14px;
    color: #005480;
    background-color: #eef4f8;
    border-left: 3px solid #005480;
    border-radius: 4px;
}

.door-recommend-star {
    color: #d4a017;
    font-size: 16px;
}

/* config.html Measurements: the heights as label | field | mm. in one grid (the labels right aligned, like
   "width:"; phones: the label above the field) */
.heights-grid {
    display: grid;
    grid-template-columns: max-content minmax(0, 190px) max-content;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.heights-grid label {
    grid-column: 1;
    margin: 0;
    text-align: right;
    font-weight: normal;
}

.heights-grid .number-field {
    grid-column: 2;
    width: 100%;
    text-align: center;
}

.heights-grid .number-field + span {
    grid-column: 3;
}

/* the floor - ceiling image above the fields (not above the labels) */
.heights-grid .heights-image {
    grid-column: 2;
    justify-self: center;
    margin-bottom: 8px;
}

@media (max-width: 767.98px) {
    .heights-grid {
        grid-template-columns: 190px max-content;
        row-gap: 4px;
    }

    .heights-grid label {
        grid-column: 1 / -1;
        text-align: center;
    }

    .heights-grid .heights-image,
    .heights-grid .number-field {
        grid-column: 1;
    }

    .heights-grid .number-field + span {
        grid-column: 2;
    }
}

/* config.html Doors: the chosen handing as an icon next to "Door n Handing:" (js/config.js: the wall, the open door
   and its swing, as the doors of the drawing) */
.handing-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.handing-icon {
    width: 84px;
    height: 48px;
    flex-shrink: 0;
    margin-left: 24px;           /* more to the right */
    position: relative;
    top: 16px;                   /* and lower: the door hangs below the title */
    fill: none;
    stroke: #000;
    stroke-linecap: round;
    transition: opacity 0.2s ease;
}

.handing-icon .handing-wall {
    stroke-width: 2.4;
}

/* the door: hollow (thin outline), with a small knob */
.handing-icon .handing-leaf,
.handing-icon .handing-knob {
    stroke-width: 0.9;
    stroke-linejoin: round;
}

.handing-icon .handing-swing {
    stroke-width: 0.9;
}

.handing-icon.handing-icon-off {
    opacity: 0.25;
}
