﻿/* Dropdown submenu - Primo livello */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%; /* Posiziona il figlio a destra */
    margin-left: 0.1rem;
    margin-top: -0.1rem;
    display: none; /* Nascondi per default */
}

/* Mostra il dropdown figlio */
.dropdown-submenu:hover > .dropdown-menu,
.dropdown-submenu .dropdown-toggle.show + .dropdown-menu {
    display: block; /* Mostra il figlio quando il genitore è attivo */
}

/* Transizioni e freccette */
.arrow-icon {
    font-size: 0.8rem;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.dropdown-submenu .dropdown-toggle .arrow-icon {
    transform: rotate(0deg); /* Freccia a destra */
}

.dropdown-submenu .dropdown-toggle.show .arrow-icon {
    transform: rotate(90deg); /* Freccia verso il basso */
}

/* MODALI */

.product-parco-modal input,
.product-parco-modal textarea,
.product-parco-modal select {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #ccc;
}

.product-parco-modal input:focus,
.product-parco-modal textarea:focus,
.product-parco-modal select:focus {
    background-color: #ffffe0;
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.product-parco-modal .form-check-input {
    background-color: #fff;
    border: 1px solid #ccc;
    width: 1.2em;
    height: 1.2em;
}

.product-parco-modal .form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.product-parco-modal .form-check-label {
    color: #000;
}

.product-parco-modal .select2-container--default .select2-selection--single {
    background-color: #fff;
    color: #000;
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 32px;
    padding: 2px 8px;
}

.product-parco-modal .select2-container--default .select2-selection--single:focus,
.product-parco-modal .select2-container--default .select2-selection--single.select2-selection--focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

/* Stili di avviso / severità (alert/warning) 
| Nome Classe                     | Colore         | Scopo                         |
| ------------------------------- | -------------- | ----------------------------- |
| `.product-parco-modal--error`   | Rosso chiaro   | Errori critici                |
| `.product-parco-modal--danger`  | Rosso desaturo | Rischi, operazioni pericolose |
| `.product-parco-modal--warning` | Giallo caldo   | Attenzione, conferme          |
| `.product-parco-modal--notice`  | Arancio tenue  | Avvisi non bloccanti          |
*/
.product-parco-modal--error .modal-content {
    background-color: #fdecea;
    color: #a94442;
}

.product-parco-modal--danger .modal-content {
    background-color: #f8d7da;
    color: #721c24;
}

.product-parco-modal--warning .modal-content {
    background-color: #fff3cd;
    color: #856404;
}

.product-parco-modal--notice .modal-content {
    background-color: #fff0e6;
    color: #8a6d3b;
}

/* Informazione / comunicazione 
| Nome Classe                   | Colore             | Scopo                      |
| ----------------------------- | ------------------ | -------------------------- |
| `.product-parco-modal--info`  | Azzurro Bootstrap  | Informazioni generiche     |
| `.product-parco-modal--note`  | Blu-grigio tenue   | Annotazioni, note tecniche |
| `.product-parco-modal--focus` | Blu vivido         | Richiesta attenzione       |
| `.product-parco-modal--calm`  | Azzurro desaturato | Ambienti neutri            |
*/
.product-parco-modal--info .modal-content {
    background-color: #e6f4ff;
    color: #084298;
}

.product-parco-modal--note .modal-content {
    background-color: #f0f4f8;
    color: #2c3e50;
}

.product-parco-modal--focus .modal-content {
    background-color: #d0e7ff;
    color: #003865;
}

.product-parco-modal--calm .modal-content {
    background-color: #eef7fb;
    color: #30505b;
}

/* Conferma / stato positivo 
| Nome Classe                     | Colore          | Scopo                         |
| ------------------------------- | --------------- | ----------------------------- |
| `.product-parco-modal--success` | Verde chiaro    | Operazione riuscita           |
| `.product-parco-modal--valid`   | Verde Bootstrap | Stato valido                  |
| `.product-parco-modal--confirm` | Verde tenue     | Conferme visive               |
| `.product-parco-modal--sage`    | Verde salvia    | Sensoristica, stati rilassati |
*/
.product-parco-modal--success .modal-content {
    background-color: #d4edda;
    color: #155724;
}

.product-parco-modal--valid .modal-content {
    background-color: #c3e6cb;
    color: #155724;
}

.product-parco-modal--confirm .modal-content {
    background-color: #eafaf1;
    color: #1e4620;
}

.product-parco-modal--sage .modal-content {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* Temi neutri / base
| Nome Classe                   | Colore            | Scopo                       |
| ----------------------------- | ----------------- | --------------------------- |
| `.product-parco-modal--base`  | Grigio chiaro     | Stile predefinito           |
| `.product-parco-modal--muted` | Grigio desaturato | UI minimaliste, placeholder |
| `.product-parco-modal--light` | Bianco sporco     | Alta leggibilità            |
| `.product-parco-modal--paper` | Beige molto tenue | Stile documentale           |
*/
.product-parco-modal--base .modal-content {
    background-color: #f0f0f0;
    color: #000;
}

.product-parco-modal--muted .modal-content {
    background-color: #e0e0e0;
    color: #333;
}

.product-parco-modal--light .modal-content {
    background-color: #ffffff;
    color: #212529;
}

.product-parco-modal--paper .modal-content {
    background-color: #fdfdf9;
    color: #343a40;
}


/*
Datatables.net
 */

.product-datatables-higher-height-row {
    height: 120px;
}

/*
Sidebar HistoryOfChange
 */

.history-changes-sidebar {
    background-color: var(--bs-info-bg-subtle);
    -webkit-box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.06), 0 1px 0 0 rgba(0, 0, 0, 0.02);
    box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.06), 0 1px 0 0 rgba(0, 0, 0, 0.02);
    display: block;
    position: fixed;
    -webkit-transition: all 200ms ease-out;
    transition: all 200ms ease-out;
    width: 50%;
    z-index: 9999;
    float: right !important;
    right: -55%;
    top: 0;
    bottom: 0;
}
.history-changes-sidebar .history-changes-sidebar-toggle {
    background-color: rgb(48.9851851852, 53.3074074074, 67.7148148148);
    height: 24px;
    width: 24px;
    line-height: 24px;
    color: #f5f6f8;
    text-align: center;
    border-radius: 50%;
}
.history-changes-sidebar .history-changes-sidebar-toggle:hover {
    background-color: rgb(55.4074074074, 60.2962962963, 76.5925925926);
}

.historychangessidebar-overlay {
    background-color: rgba(34, 37, 47, 0.55);
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: none;
    z-index: 9998;
    -webkit-transition: all 0.2s ease-out;
    transition: all 0.2s ease-out;
}

.history-changes-sidebar-enabled .history-changes-sidebar {
    right: 0;
}
.history-changes-sidebar-enabled .historychangessidebar-overlay {
    display: block;
}

/*
SweetAlert2 sopra le sidebar - Impostato SweetAlert2 un z-index più alto delle sidebar
 */

.swal2-container {
    z-index: 10000 !important;
}

.bold-row {
    font-weight: bold;
}

