﻿/* MATERIALRECHNER auf den Konstruktionsseiten (Partial renderMaterialrechner, Script _js/materialrechner.js).
   Optik wie die Promat Brandschutzplaner, 2021_266_promat_rechner/ReactApp/public/css/style.css:
   section.filter select, calculator-slider, filterSlider-Preview, result-wrapper, table, disclaimerBox, imageButton.
   Alles unter .materialrechner, damit der Rest der Seite unveraendert bleibt. */

.materialrechner {
    margin: 10px 0 40px 0;
    color: #333333;
    font-size: 16px;
}

/* Abschnitt auf der Seite (vor den Dokumenten, auf Weiss): Titel wie «Dokumente», ein Satz, Button zum Popup.
   30px unten: mit dem Rand des Titels «Dokumente» 50px Abstand, wie zwischen Merkmale, Beschreibung und Materialkalkulator */
.materialrechner.mr-page {
    margin: 0 0 30px 0;
}

    .materialrechner.mr-page p {
        margin: 0 0 15px 0;
    }

/* Popup: Bootstrap-Modal der Seite (wie #video-modal), Optik wie das Popup im Brandschutzplaner (.popup) */
.mr-modal {
    overscroll-behavior: contain;
}

    .mr-modal .modal-content {
        border: none;
        border-radius: 0;
        box-shadow: 0 3px 4px rgba(0, 0, 0, 0.16);
    }

.materialrechner.mr-popup {
    margin: 0;
    padding: 25px;
    position: relative;
}

    /* Schliessen oben rechts wie .popup .close im Brandschutzplaner; scrollt mit, wie dort und beim Bootstrap-Modal */
    .materialrechner .mr-close {
        background: none;
        border: none;
        color: #333333;
        cursor: pointer;
        font-size: 40px;
        line-height: 1;
        padding: 0 5px;
        position: absolute;
        right: 10px;
        top: 5px;
    }

        .materialrechner .mr-close:focus-visible {
            outline: 2px solid #009fe3;
        }

    .materialrechner.mr-popup .mr-head {
        padding-right: 30px;
    }

    .materialrechner h3,
    .materialrechner h4 {
        color: #009fe3;
        font-weight: 400;
    }

    .materialrechner h3 {
        font-size: 28px;
        margin: 0;
    }

    .materialrechner h4 {
        font-size: 16px;
        margin: 5px 0 30px 0;
    }

    .materialrechner .mr-item {
        margin-bottom: 7.5px;
    }

    .materialrechner .mr-icon img {
        max-width: 40px;
        max-height: 30px;
    }

    .materialrechner label {
        font-weight: 400;
        line-height: 24px;
        margin: 0;
    }

    /* Selects wie section.filter select / section.filter-new select */
    .materialrechner select {
        -moz-appearance: none;
        -webkit-appearance: none;
        appearance: none;
        background: #ffffff url("../_img/materialrechner/chevron-down.png") no-repeat;
        background-position: right 15px center;
        border: 1px solid #828282;
        border-radius: 0;
        color: #333333;
        font-size: 16px;
        padding: 5px 50px 5px 5px;
        text-overflow: ellipsis;
        width: 100%;
    }

        .materialrechner select:focus {
            border-color: #000000;
            outline: none;
        }

        /* sichtbarer Fokus fuer die Tastatur (mit der Maus bleibt es wie im Brandschutzplaner) */
        .materialrechner select:focus-visible,
        .materialrechner input.mr-slider:focus-visible,
        .materialrechner input[type="checkbox"]:focus-visible,
        .materialrechner .imageButton:focus-visible {
            outline: 2px solid #009fe3;
            outline-offset: 2px;
        }

        .materialrechner select option:disabled {
            color: #828282;
        }

        .materialrechner select.select-filled {
            border-color: #009fe3;
            box-shadow: 0 0 0 1px rgba(0, 159, 227, 0.2);
        }

            .materialrechner select.select-filled:focus {
                border-color: #007ab7;
                box-shadow: 0 0 0 2px rgba(0, 122, 183, 0.4);
            }

    /* Laengen wie SliderItem: Zahl rechts, darunter Slider mit - und + */
    .materialrechner .mr-length {
        padding: 6px 0;
    }

        .materialrechner .mr-length label {
            margin-bottom: 4px;
        }

    .materialrechner .mr-preview {
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .materialrechner .mr-number {
        border: 1px solid #000000;
        border-radius: 3px;
        font-size: 16px;
        margin: 0 5px 0 0;
        max-width: 110px;
        padding: 0 5px;
        text-align: right;
        width: 70%;
    }

        .materialrechner .mr-number:focus {
            outline: 2px solid #009fe3;
            outline-offset: 1px;
        }

    .materialrechner .mr-slider-wrapper {
        display: flex;
        align-items: center;
    }

        .materialrechner .mr-slider-wrapper > * + * {
            margin-left: 9px;
        }

    /* 20 px Zeichen wie im Brandschutzplaner, Klickflaeche 32 x 32 px */
    .materialrechner .mr-step {
        background: none;
        border: 0;
        color: #333333;
        cursor: pointer;
        flex: 0 0 auto;
        line-height: 0;
        margin: -6px 0;
        padding: 6px;
    }

        .materialrechner .mr-step:focus {
            outline: 2px solid #009fe3;
        }

    /* Linie 5 px wie im Brandschutzplaner, Klickflaeche 24 px hoch: beide Farben als Hintergrundbaender */
    .materialrechner input.mr-slider {
        -webkit-appearance: none;
        appearance: none;
        background-color: transparent;
        background-image: linear-gradient(#009fe3, #009fe3), linear-gradient(#828282, #828282);
        background-position: left center, left center;
        background-repeat: no-repeat;
        background-size: 50% 5px, 100% 5px;
        height: 24px;
        margin: 0;
        opacity: 0.7;
        outline: none;
        transition: opacity 0.2s;
        width: 100%;
    }

        .materialrechner input.mr-slider:hover,
        .materialrechner input.mr-slider:focus {
            opacity: 1;
        }

    .materialrechner .mr-message {
        color: #E3000F;
        font-size: 14px;
    }

    .materialrechner input[type="checkbox"] {
        accent-color: #009fe3;
        margin: 0 8px 0 0;
        vertical-align: -1px;
    }

    /* Wandanschluss: Beschriftung wie bei den Laengen, darunter die Auswahl */
    .materialrechner .mr-wall {
        padding: 6px 0;
    }

        .materialrechner .mr-wall label {
            display: block;
            margin-bottom: 4px;
        }

    /* Profil, Befestigung und Optionen in ihren Zeilen der Materialliste */
    .materialrechner .mr-table .mr-designation select {
        margin: -5px 0;
    }

    .materialrechner .mr-table .mr-option {
        cursor: pointer;
        display: block;
        line-height: inherit;
        min-height: 24px;
        padding: 2px 0;
    }

    /* nicht angekreuzte Option: steht zum Ankreuzen in der Liste, gehoert aber nicht zum Material */
    .materialrechner .mr-table tr.mr-off .mr-text,
    .materialrechner .mr-table tr.mr-off .mr-article,
    .materialrechner .mr-table tr.mr-off .mr-article-xs,
    .materialrechner .mr-table tr.mr-off .mr-qty {
        color: #666666; /* 5.7:1 auf Weiss */
    }

    /* «Berechnung zusenden»: Adresse und Formate unter den Buttons, Felder wie die Projektangaben */
    .materialrechner .mr-send {
        border-top: 1px solid #828282;
        margin-top: 10px;
        padding-top: 20px;
    }

        .materialrechner .mr-send label {
            display: block;
        }

        .materialrechner .mr-send input[type="email"] {
            border: 1px solid #828282;
            font-size: 16px;
            margin-bottom: 7.5px;
            padding: 5px 15px;
            width: 100%;
        }

            .materialrechner .mr-send input[type="email"]:focus {
                border-color: #009fe3;
                outline: none;
            }

            .materialrechner .mr-send input[aria-invalid="true"] {
                border-color: #E3000F;
            }

        .materialrechner .mr-formats {
            border: 0;
            margin: 0 0 7.5px 0;
            padding: 0;
        }

            .materialrechner .mr-formats legend {
                border: 0;
                font-size: 16px;
                margin: 0;
            }

            .materialrechner .mr-formats label {
                cursor: pointer;
                display: inline-block;
                margin-right: 25px;
                min-height: 24px;
                padding: 2px 0;
            }

        .materialrechner .mr-send p {
            font-size: 14px;
            margin: 5px 0 15px 0;
        }

        .materialrechner .mr-send .imageButton[disabled] {
            cursor: default;
            opacity: 0.5;
        }

        .materialrechner .mr-send p.mr-send-status {
            font-size: 16px;
            font-weight: 600;
            margin: 0;
        }

            .materialrechner .mr-send p.mr-send-error {
                color: #E3000F;
            }

        /* Falle fuer Formular-Bots: fuer Menschen und Screenreader nicht da. display:none statt ausserhalb des Bildschirms,
           weil Browser und Passwortmanager versteckte, aber sichtbare Felder automatisch ausfuellen koennen (dann ginge die
           Mail eines echten Kunden stillschweigend verloren) */
        .materialrechner .mr-trap {
            display: none;
        }

    .materialrechner .mr-project-block {
        margin-top: 20px;
    }

    .materialrechner .mr-project-label {
        margin: 10px 0 7.5px 0;
    }

    .materialrechner .mr-project input {
        border: 1px solid #828282;
        font-size: 16px;
        margin-bottom: 7.5px;
        padding: 5px 15px;
        width: 100%;
    }

        .materialrechner .mr-project input:focus {
            border-color: #009fe3;
            outline: none;
        }

    /* Resultate wie result-wrapper */
    .materialrechner .mr-result {
        margin-top: 40px;
    }

    .materialrechner .mr-result-row {
        margin-bottom: 15px;
    }

    .materialrechner .mr-result-title {
        color: #009fe3;
        line-height: 30px;
    }

        .materialrechner .mr-result-title b {
            color: #009fe3;
        }

    .materialrechner .mr-area {
        float: right;
        font-weight: 700;
    }

    .materialrechner .mr-hint p {
        margin: 0 0 7.5px 0;
    }

    .materialrechner .mr-contact {
        font-weight: 700;
    }

    /* Produkttabellen wie ResultTable (tableHead, tableSubHead) */
    .materialrechner .mr-table-wrapper {
        margin-bottom: 30px;
    }

    .materialrechner .mr-table {
        margin-bottom: 0;
    }

        .materialrechner .mr-table > tbody > tr > td,
        .materialrechner .mr-table > tbody > tr > th {
            border: 1px solid #828282;
            font-size: 15px;
            padding: 12.5px 7.5px;
            vertical-align: middle;
        }

            .materialrechner .mr-table > tbody > tr > td:first-child,
            .materialrechner .mr-table > tbody > tr > th:first-child {
                padding-left: 30px;
            }

        .materialrechner .mr-table > tbody > tr.tableHead > th {
            background: #333333;
            border: none;
            color: #ffffff;
            font-size: 19px;
            font-weight: 600;
        }

        .materialrechner .mr-table > tbody > tr.tableSubHead > th {
            background: #828282;
            border-color: #828282;
            color: #ffffff;
            font-weight: 600;
        }

            .materialrechner .mr-table > tbody > tr.tableSubHead > th:not(:last-child) {
                border-right-color: #ffffff;
            }

        .materialrechner .mr-table .mr-article {
            white-space: nowrap;
            width: 1%;
        }

        .materialrechner .mr-table .mr-qty {
            text-align: right;
            white-space: nowrap;
            width: 1%;
        }

        .materialrechner .mr-table .mr-article-xs {
            color: #828282;
            font-size: 13px;
            margin-top: 3px;
        }

    .materialrechner .disclaimerBox {
        background: rgba(130, 130, 130, 0.2);
        font-size: 14px;
        padding: 20px;
    }

        .materialrechner .disclaimerBox p:last-child {
            margin-bottom: 0;
        }

    /* Buttons wie imageButton */
    .materialrechner .mr-actions {
        margin-top: 20px;
    }

    .materialrechner .imageButton {
        background: transparent;
        border: none;
        cursor: pointer;
        display: inline-block;
        font-weight: 600;
        margin: 0 30px 10px 0;
        padding: 0;
        text-decoration: none;
        text-transform: uppercase;
    }

        .materialrechner .imageButton span {
            color: #009fe3;
            margin-left: 12.5px;
            vertical-align: middle;
        }

        .materialrechner .imageButton img {
            width: 25px;
        }

    .materialrechner .printOnly {
        display: none;
    }

@media screen and (max-width: 991px) {
    /* schmale Auswahl in der Tabelle kuerzt die Bezeichnung (Groesse!): darunter ganz ausgeschrieben */
    .materialrechner .mr-table .mr-designation select + .mr-text {
        display: block;
        margin-top: 10px;
    }

    .materialrechner .mr-table > tbody > tr > td:first-child,
    .materialrechner .mr-table > tbody > tr > th:first-child {
        padding-left: 15px;
    }
}

@media screen and (max-width: 767px) {
    .materialrechner h3 {
        font-size: 22px;
    }

    .materialrechner.mr-popup {
        padding: 15px;
    }

    .materialrechner .mr-table > tbody > tr.tableHead > th {
        font-size: 15px;
    }

    .materialrechner .mr-table > tbody > tr > td,
    .materialrechner .mr-table > tbody > tr > th {
        font-size: 14px;
        padding: 10px 7.5px;
    }

    .materialrechner .mr-area {
        float: none;
        display: block;
        line-height: 20px;
    }

    /* 16 px: iOS zoomt sonst beim Antippen in die Seite */
    .materialrechner select {
        background-position: right 10px center;
        background-size: 15px;
        padding-right: 32px;
    }
}

@media print {
    .materialrechner .noPrint {
        display: none !important;
    }

    .materialrechner .printOnly {
        display: block !important;
    }

    /* Der Abschnitt auf der Seite (Titel, Satz, Button) wird nie gedruckt */
    .materialrechner.mr-page {
        display: none !important;
    }

    /* Ctrl+P bei offenem Popup (mr-modal-open): nur das Popup, als normaler
       Inhalt ueber die Seiten. Das Popup liegt direkt im body, alles andere im body (Seite, Backdrop, Cookie-Banner) faellt weg. */
    html.mr-modal-open body > *:not(.mr-modal) {
        display: none !important;
    }

    html.mr-modal-open .mr-modal {
        display: block !important;
        overflow: visible !important;
        padding: 0 !important;
        position: static !important;
    }

        html.mr-modal-open .mr-modal .modal-dialog {
            margin: 0;
            -webkit-transform: none !important;
            transform: none !important;
            width: auto;
        }

        html.mr-modal-open .mr-modal .modal-content {
            box-shadow: none;
        }

    .materialrechner.mr-popup {
        padding: 0;
    }

    /* width statt max-width: Bootstrap setzt im Druck img { max-width: 100% !important } */
    .materialrechner .mr-print-image {
        float: right;
        margin: 0 0 15px 20px;
        width: 45%;
    }

    .materialrechner .mr-print-info::after {
        clear: both;
        content: "";
        display: block;
    }

    /* Bootstrap 3 wendet max-width: 767px auch auf A4 an: im Druck die Artikelnummer als eigene Spalte */
    .materialrechner .mr-table .mr-article.hidden-xs {
        display: table-cell !important;
    }

    .materialrechner .mr-table .mr-article-xs {
        display: none !important;
    }

    .materialrechner {
        margin: 20px 0 0 0;
    }

        .materialrechner h3 {
            font-size: 20px;
        }

        .materialrechner h4 {
            margin-bottom: 15px;
        }

        .materialrechner .mr-summary table {
            margin-bottom: 15px;
        }

        .materialrechner .mr-summary th,
        .materialrechner .mr-summary td {
            font-size: 12px;
            padding: 1px 20px 1px 0;
            vertical-align: top;
        }

        .materialrechner .mr-result {
            margin-top: 0;
        }

        .materialrechner .mr-icon {
            display: none;
        }

        .materialrechner .mr-item > .col-xs-10 {
            width: 100%;
        }

        .materialrechner .mr-table-wrapper {
            margin-bottom: 15px;
            page-break-inside: avoid;
        }

        .materialrechner .mr-table > tbody > tr > td,
        .materialrechner .mr-table > tbody > tr > th {
            font-size: 12px;
            padding: 4px 6px;
        }

            .materialrechner .mr-table > tbody > tr > td:first-child,
            .materialrechner .mr-table > tbody > tr > th:first-child {
                padding-left: 6px;
            }

        .materialrechner .mr-table > tbody > tr.tableHead > th {
            border-bottom: 2px solid #000000;
            font-size: 14px;
        }

        .materialrechner .mr-table > tbody > tr.tableSubHead > th {
            border-color: #828282;
        }

        .materialrechner .disclaimerBox {
            font-size: 10px;
            padding: 0;
        }
}
