/*Alert*/
.custom-alert {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translate(-50%, 0);
    width: auto;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    display: flex;
    border-radius: 10px;
}
.custom-alert.show {
    animation: bounce 0.3s ease-out;
}
.custom-alert.hide {
    animation: bounceOut 0.3s ease-in-out;
}
.alert-content {
    color: #383838;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    text-align: center;
    display: flex;
    align-items: center;
    flex-direction: column;
    font-size: 16px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
}
.alert-title {
    margin-bottom: 10px;
    justify-content: left;
    display: flex;
    gap: 5px;
    font-size: 20px;
    font-weight: 500;
    border-bottom: 1px solid #d3d3d3;
    width: 100%;
    padding: 5px;
}
.alert-button {
    margin-top: 15px;
    padding: 8px 12px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: .25em;
    font-weight: 400;
    width: 45%;
    transition: 0.2s;
}
.alert-button:hover {
    filter: brightness(90%);
}
@keyframes bounce {
    0% { transform: translate(-50%, 0) scale(.7); }
    45% { transform: translate(-50%, 0) scale(1.05); }
    80% { transform: translate(-50%, 0) scale(.95); }
    100% { transform: translate(-50%, 0) scale(1); }
}
@keyframes bounceOut {
    0% { transform: translate(-50%, 0) scale(1); }
    20% { transform: translate(-50%, 0) scale(1.05); }
    50% { transform: translate(-50%, 0) scale(.95); }
    100% { transform: translate(-50%, 0) scale(.7); }
}
.alert-button.error { background-color: #d25c5c; color: white; }
.alert-button.warning { background-color: #e8a317; color: white; }
.alert-button.info { background-color: #2a7de1; color: white; }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/*Step 1*/
h1 {
    font-weight: bold;
    font-size: 60px;
}
h2 {
    font-size: 1.3rem;
    color: #222;
    margin-bottom: 8px;
    border-left: 5px solid #f3a57b;
    padding-left: 10px;
}
input[type="number"], input[type="text"], select, .divInputCustom {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s;
    background: #fff;
}
input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #f3a57b;
    box-shadow: 0 0 6px rgba(0, 123, 255, 0.3);
}
.button-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.next-button, .back-button, .alert-button {
    flex: 1;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
}
.next-button {
    background: #e4976e;
    color: #ffffff;
}
.next-button:hover {
    background-color: #da8050;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 135, 46, 0.3);
}
.back-button {
    background: #b0b0b0;
    color: #ffffff;
}
.back-button:hover {
    background-color: #838383;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(131, 114, 112, 0.3);
}
.alert-button {
    background: #ffffff;
    color: rgb(0, 0, 0);
    padding: 10px;
    width: 50%;
    margin-top: 10px;
}


@media (max-width: 768px) {
    .product-selection {
        max-width: 100%;
    }

    h2 {
        font-size: 1.2rem;
    }
}
.doc-selection {
    font-family: 'Poppins', sans-serif;
    max-width: 1100px;
    width: 90%;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.doc-step {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/*Step 2*/
.table-fab {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    border-spacing: 0;
    border: 1px solid black;
}
.th-fab, .td-fab {
    padding: 10px;
    text-align: left;
}
.th-fab {
    text-transform: uppercase;
    border: 1px solid black;
}
.td-fab {
    text-align: center;
    border: 1px solid black;
}
.td-fab input[type="number"], .td-fab input[type="text"] {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: none;
    background: transparent;
}
.tab-option,
.tab-panel {
    display: none;
}
.tabs-group-1 #tab-1:checked ~ .tabs-content .tab-panel:nth-of-type(1),
.tabs-group-1 #tab-2:checked ~ .tabs-content .tab-panel:nth-of-type(2),
.tabs-group-2 #tab-3:checked ~ .tabs-content .tab-panel:nth-of-type(1),
.tabs-group-2 #tab-4:checked ~ .tabs-content .tab-panel:nth-of-type(2),
.tabs-group-2 #tab-5:checked ~ .tabs-content .tab-panel:nth-of-type(3){
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}
.tabs {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}
nav ul {
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}
nav ul li {
    flex: 1;
    text-align: center;
}
nav ul li label {
    display: block;
    padding: 12px 20px;
    cursor: pointer;
    background: #f8f8f8;
    border-radius: 5px 5px 0 0;
    transition: all 0.3s ease-in-out;
}
nav ul li label:hover {
    background: #e0e0e0;
}
.tabs-group-1 #tab-1:checked ~ nav ul li:nth-of-type(1) label,
.tabs-group-1 #tab-2:checked ~ nav ul li:nth-of-type(2) label,
.tabs-group-2 #tab-3:checked ~ nav ul li:nth-of-type(1) label,
.tabs-group-2 #tab-4:checked ~ nav ul li:nth-of-type(2) label,
.tabs-group-2 #tab-5:checked ~ nav ul li:nth-of-type(3) label {
    background-color: #ffffff;
    color: #222;
    font-weight: bold;
    border-bottom: 3px solid #f3a57b;
}
.tabs-content {
    background: #ffffff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 0 0 5px 5px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

/*Step 3*/
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    color: #222;
}
.custom-checkbox input[type="checkbox"] {
    display: none;
}
.custom-checkbox .checkbox-label {
    position: relative;
    padding-left: 25px;
    cursor: pointer;
    user-select: none;
}
.custom-checkbox .checkbox-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #5a6268;
    border-radius: 4px;
    background-color: #fff;
    transition: background-color 0.3s, border-color 0.3s;
}
.custom-checkbox input[type="checkbox"]:checked + .checkbox-label::before {
    background-color: #5a6268;
    border-color: #5a6268;
}
.custom-checkbox .checkbox-label::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
    height: 6px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    opacity: 0;
    transition: opacity 0.3s;
}
.custom-checkbox input[type="checkbox"]:checked + .checkbox-label::after {
    opacity: 1;
}
.input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}
.input-container .field-container {
    flex: 1 1 calc(42% - 10px);
    min-width: 220px;
}
@media (max-width: 600px) {
    .input-container {
        flex-direction: column;
    }

    .input-container .field-container {
        flex: 1 1 100%;
    }
}
button:active {
    transform: scale(0.95);
}

/*Step 4*/
.cold-container,
.steam-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.cold-question,
.steam-question {
    font-size: 1.2rem;
    font-weight: bold;
    color: #222;
    margin-bottom: 10px;
    text-align: center;
}
.confirm-button,
.cancel-button {
    width: 100%;
    display: block;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
}
.cancel-button {
    background-color: #e74c3c;
}
.cancel-button:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}
.confirm-button {
    background-color: #2ecc71;
}
.confirm-button:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}
/* Spinner */
#spinner-container {
    text-align: center;
    color: white;
    align-items: center;
    display: flex;
    flex-direction: column;
}
.spinner {
  width: 50px;
  height: 50px;
  border: 6px solid #ccc;
  border-top: 6px solid #05e90e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/*Step 5*/
.main-container {
    border: 2px solid #000;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
}
.label-small {
    font-size: 16px;
    display: block;
    text-align: center;
}
.label-large {
    text-align: center;
    font-size: 40px;
    color: #f3a57b;
    font-weight: bold;
    display: block;
}
.technical-data {
    padding: 20px;
    margin-top: 20px;
}
.technical-data h2 {
    margin-bottom: 10px;
}
.technical-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.field-container {
    flex: 1 1 calc(22.2% - 10px);
    min-width: 220px;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s;
}
.field-container label {
    font-weight: 500;
    margin-bottom: 4px;
    color: #333;
    font-size: 0.85em;
    margin: 5px 0;
}
.field-container input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    background: #fff;
    transition: all 0.3s;
}
.field-container input[readonly] {
    background: #e9ecef;
    color: #666;
}

.info-box {
    display: none; /* Hidden by default */
    position: absolute;
    top: 50px; /* Adjust for your dropdown positioning */
    left: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    padding: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    width: 300px;
    z-index: 1000;
}
.info-box p {
    margin: 0;
    padding: 0;
}

/*Step 6*/
.step-section {
    position: relative;
    padding: 20px;
}
.tab-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
}
.tab-label {
    padding: 10px;
    background-color: #eee;
    cursor: pointer;
    border-radius: 5px;
    width: 50%;
    text-align: center;
    border: 2px solid white;
}
.tab-label:hover {
    background-color: #ffffff;
    color: #222;
    font-weight: bold;
    border-bottom: 2px solid #f3a57b;
}
.tab-input {
    display: none;
}
.tab-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
}
.tab-panel {
    display: none;
    width: 100%;
}
#tab-tech:checked ~ .tab-content #tech-panel,
#tab-costs:checked ~ .tab-content #costs-panel {
    display: block;
}
.table-preview {
    font-weight: bold;
    color: #333;
    padding: 10px;
    margin: 10px;
    border: 2px solid #f3a57b;
    border-radius: 8px;
}
.table-preview:hover {
    transform: scale(1.1);
    background-color: #f1f1f1;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* Nascosto per default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal {
    overflow: hidden;
    background: white;
    padding: 20px;
    border-radius: 5px;
    position: relative;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
}
.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}
.close-button:hover {
    color: #ff0000;
    outline: none;
    background: none;
    animation: shake 0.4s ease-in-out;
    transform: scale(1.8);
    transition: transform 0.3s ease-in-out;
}
@keyframes shake {
    0% { transform: scale(1.8) rotate(0deg); }
    25% { transform: scale(1.8) rotate(10deg); }
    50% { transform: scale(1.8) rotate(0deg); }
    75% { transform: scale(1.8) rotate(-10deg); }
    100% { transform: scale(1.8) rotate(0deg); }
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
    border: 1px solid black;
}
th {
    background-color: #FCE4D6;
}
td {
    background-color: #f9f9f9;
}
caption {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}
.unsetCell {
    background-color: white;
    border: 0px;
}
.group-header-1 {
    background-color: white;
    color: red;
    text-align: center;
    font-weight: bold;
}
.group-header-2 {
    background-color: #E2EFDA;
    color: #0070C0;
    text-align: center;
    font-weight: bold;
}
/* Force Button/PopUP*/
.force-button {
    padding: 12px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 6px;
    transition: transform 1.0s ease;
    background: #f3a57b;
    color: white;
    border: none;
    margin: 10px 0;
    width: 50%;
}
.force-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color : white;
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow : 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    width: 500px;
}
.force-title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #FCE4D6;
}
.force-btn {
    display: block;
    width: 40%;
    margin-top: 20px;
    padding: 10px 20px;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}
.force-lable {
    display: flex;
    font-size: 10px;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
}
/* Rendimento Globale */
.bordered-box {
    border: 3px solid #ccc;
    padding: 10px;
    margin: 10px 0;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 5px;
    border-radius: 6px;
    font-weight: bold;
}
.bordered-box.badOverall {
    border-color: #e74c3c;
    background-color: #f9ff008c;
    color: #c0392b;
}
.bordered-box.goodOverall {
    border-color: #2ecc71;
    background-color: #ecfdf2;
    color: #27ae60;
}
.bordered-box.forceDiss {
    border-color: #2c9fe9;
    background-color: #bfe6ffcc;
    color: #2c9fe9;
}
.bordered-box.reduceCB {
    border-color: #136000;
    background-color: #40b700c9;
    color: #136000;
}

/* Contenitore della barra di caricamento */
#loading-container {
    text-align: center;
    color: white;
}
/* Barra di progresso */
#progressbar {
    width: 0%;
    height: 5px;
    background-color: #00ff00;
    margin-bottom: 10px;
    transition: width 0.5s ease;
}

/* Selettore Lingua */
.language-selector-container {
  position: fixed;
  bottom: 26px;
  right: 20px;
  z-index: 9999;
  background: linear-gradient(135deg, #f3a57b, #fbd0b5);
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}
.language-selector-container:hover {
  transform: scale(1.05);
}
.language-selector {
  font-size: 15px;
  border: none;
  border-radius: 8px;
  background-color: #fff;
  color: #333;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.language-selector:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6);
}