/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    /* make transparent link selection, adjust last value opacity 0 to 1.0 */
}

body {
    -webkit-touch-callout: none;
    /* prevent callout to copy image, etc when tap to hold */
    -webkit-text-size-adjust: none;
    /* prevent webkit from resizing text to fit */
    -webkit-user-select: none;
    /* prevent copy paste, to allow, change 'none' to 'text' */
    user-select: none;
    /* prevent copy paste, to allow, change 'none' to 'text' */
    background-color: white;
    /*background-image:linear-gradient(to bottom, #A7A7A7 0%, #E4E4E4 51%);*/
    font-family: system-ui, -apple-system, -apple-system-font, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 12px;
    height: 100vh;
    margin: 0px;
    padding: 0px;
    /* Padding to avoid the "unsafe" areas behind notches in the screen */
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    /*text-transform:uppercase;*/
    width: 100%;
    padding-top: 90px;
}

/* Portrait layout (default) */
.app {
    background: url(../img/logo.png) no-repeat center top;
    /* 170px x 200px */
    position: absolute;
    /* position in the center of the screen */
    left: 50%;
    top: 50%;
    height: 50px;
    /* text area height */
    width: 225px;
    /* text area width */
    text-align: center;
    padding: 180px 0px 0px 0px;
    /* image height is 200px (bottom 20px are overlapped with text) */
    margin: -115px 0px 0px -112px;
    /* offset vertical: half of image height and text area height */
    /* offset horizontal: half of text area width */
}

/* Landscape layout (with min-width) */
@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
    .app {
        background-position: left center;
        padding: 75px 0px 75px 170px;
        /* padding-top + padding-bottom + text area = image height */
        margin: -90px 0px 0px -198px;
        /* offset vertical: half of image height */
        /* offset horizontal: half of image width and text area width */
    }
}

h1 {
    font-size: 24px;
    font-weight: normal;
    margin: 0px;
    overflow: visible;
    padding: 0px;
    text-align: center;
}

.event {
    border-radius: 4px;
    color: #FFFFFF;
    font-size: 12px;
    margin: 0px 30px;
    padding: 2px 0px;
}

.event.listening {
    background-color: #333333;
    display: block;
}

.event.received {
    background-color: #4B946A;
    display: none;
}

#deviceready.ready .event.listening {
    display: none;
}

#deviceready.ready .event.received {
    display: block;
}

@keyframes fade {
    from {
        opacity: 1.0;
    }

    50% {
        opacity: 0.4;
    }

    to {
        opacity: 1.0;
    }
}

.blink {
    animation: fade 3000ms infinite;
    -webkit-animation: fade 3000ms infinite;
}

/*
@media screen and (prefers-color-scheme: dark) {
    body {
        background-image: linear-gradient(to bottom, whitesmoke 0%, #1B1B1B 51%);
    }
}
*/
/* Custom CSS */
body {
    background-color: #f4f4f4;
    /* Sfondo leggero per contrasto */
}

.card {
    border-color: #4a4a4a;
    /* Colore pneumatico usato */
}

h5.card-title {
    color: #4a4a4a;
    /* Colore pneumatico usato */
}

.form-control {

    box-shadow: none;
}

.form-control:focus {
    border-color: #008000;
    /* Verde */
    box-shadow: 0 0 0 0.2rem rgba(0, 128, 0, 0.25);
    /* Ombra verde */
}

.btn-primary2 {
    background-color: #008000;
    /* Verde */
    border-color: #008000;
    /* Verde */
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #006600;
    /* Verde scuro */
    border-color: #006600;
    /* Verde scuro */
}

.btn-link {
    color: #008000;
    /* Verde */
}

.btn-link:hover,
.btn-link:focus,
.btn-link:active {
    color: #006600;
    /* Verde scuro */
}

/* Colore di base per i link arancio */
.btn-link-warning {
    color: #FFA500;
    /* Arancio */
    text-decoration: none;
}

/* Hover sui link arancio */
.btn-link-warning:hover,
.btn-link-arancio:focus,
.btn-link-arancio:active {
    color: #FF8C00;
    /* Arancio scuro al passaggio del mouse */
}

select {
    -webkit-appearance: listbox;
    appearance: listbox;
    width: 100%;
    height: 35px;
    line-height: 35px;
    border: 1px solid #bbb;
    border-radius: 4px;
    padding: 0 0 1px 8px;
}

/* CSS per il container dell'overlay */
.overlay-container {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CSS per il testo di "Please Wait" */
.please-wait-text {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
}

/* CSS per l'animazione del pallino */
.please-wait-spinner {
    margin: 0 auto;
    width: 40px;
    height: 40px;
    position: relative;
}

.please-wait-spinner:before {
    content: '';
    display: block;
    padding-top: 100%;
}

.please-wait-spinner:after {
    content: '';
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    border: 5px solid #fff;
    border-top-color: transparent;
    animation: please-wait-spinner-rotate 1s infinite linear;
    top: 0;
    bottom: 0;
    margin: auto;
}

/* Animazione della rotazione del pallino */
@keyframes please-wait-spinner-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check label {
    margin-left: 10px;
    font-size: 14px;
    font-weight: 500;
}

.form-check .form-check-input[type=checkbox] {
    border-radius: .25em;
    height: 25px;
    width: 25px;
}

.form-check .form-check-input[type=radio] {
    border-radius: 100%;
    height: 25px;
    width: 25px;
}

.form-switch .form-check-input[type=checkbox] {
    border-radius: 2em;
    height: 25px;
    width: 50px;
}

/* Stile per dispositivi mobili con larghezza massima di 200px */
@media only screen and (max-width: 767px) {
    .mytitle {
        max-width: 200px;
    }
}

/* Stile per desktop con larghezza massima di 300px */
@media only screen and (min-width: 768px) {
    .mytitle {
        max-width: 280px;
    }
}


/* Cambia il colore del testo dei link delle pagine */
.page-link {
    border-color: darkgreen;
    /* Colore del testo */
    color: darkgreen;
}

.page-item {
    min-width: 50px;
    text-align: center;
    font-size: small;
}

/* Cambia il colore dello sfondo dei link delle pagine */
.page-item.active .page-link {
    background-color: green;
    /* Colore dello sfondo del link della pagina attiva */
    border-color: darkgreen;
    /* Colore del bordo del link della pagina attiva */
    color: white;
}

/* Cambia il colore dello sfondo del link della pagina attiva */
.page-item.disabled .page-link {
    border-color: darkgreen;
    /* Colore del bordo del link della pagina attiva */
}

.suggestions-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.suggestions-list li {
    cursor: pointer;
    padding: 5px;
    background-color: white;
    border: 1px solid #ddd;
}

.suggestions-list li:hover {
    background-color: #ddd;
}

.suggestions-list li.active2 {
    background-color: #ddd;
}


/* Stile personalizzato per aumentare l'altezza del campo select2 */
.select2-container .select2-selection--single {
    height: 50px;
    /* Altezza desiderata */
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 50px;
    /* Allinea verticalmente il testo */
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 50px;
    /* Allinea verticalmente la freccia */
}

.targa-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.targa-row .form-control {
    margin-right: 10px;
}

.targa-row .remove-btn {
    cursor: pointer;
    color: red;
    font-size: 1.2em;
}

.invalid-feedback2 {
    border: 2px solid red !important;
    width: 100%;

    color: #dc3545;
}

.custom {}

.card-disabled-overlay {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    display: flex;

    color: #000;

    pointer-events: none;
}

.salvapeso {
    max-width: 100px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #aaa;
    background-color: white;
}