/*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; }

/*Step 1*/
h1 {
    font-weight: bold;
    font-size: 60px;
}
.product-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);
}
.product-step {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
h2 {
    font-size: 1.3rem;
    color: #222;
    margin-bottom: 8px;
    border-left: 5px solid #4CAF50;
    padding-left: 10px;
}
input[type="text"], select {
    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: #4CAF50;
    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 {
    flex: 1;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #ffffff;
    text-transform: uppercase;
}
.next-button {
    background: #4CAF50;
}
.next-button:hover {
    background-color: #3a913d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}
.back-button {
    background: #b0b0b0;
}
.back-button:hover {
    background-color: #838383;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(131, 114, 112, 0.3);
}

@media (max-width: 768px) {
    .product-selection {
        max-width: 100%;
    }

    h2 {
        font-size: 1.2rem;
    }
}

/*Step 2*/
.tab-option,
.tab-panel {
    display: none;
}
#tab-1:checked ~ .tabs-content .tab-panel:nth-of-type(1),
#tab-2:checked ~ .tabs-content .tab-panel:nth-of-type(2) {
    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;
}
#tab-1:checked ~ nav ul li:nth-of-type(1) label,
#tab-2:checked ~ nav ul li:nth-of-type(2) label {
    background-color: #ffffff;
    color: #222;
    font-weight: bold;
    border-bottom: 3px solid #45a049;
}
.tabs-content {
    background: #ffffff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 0 0 5px 5px;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/*Step 3*/
.steam-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.steam-question {
    font-size: 1.2rem;
    font-weight: bold;
    color: #222;
    margin-bottom: 10px;
    text-align: center;
}
.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;
}
.confirm-button,
.cancel-button {
    flex: 1;
    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);
}
@media (max-width: 600px) {
    .input-container {
        flex-direction: column;
    }

    .input-container .field-container {
        flex: 1 1 100%;
    }
}

/*Step 4*/
#details-form {
    max-width: 1200px;
    margin: 20px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    font-family: 'Arial', sans-serif;
}
.section-container {
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.section-title {
    text-align: left;
    font-size: 1.2em;
    font-weight: bold;
    color: #222;
    margin-bottom: 10px;
    padding-bottom: 3px;
    border-bottom: 1px solid #45a049;
}
.section-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:hover {
    background: #eef3f8;
}
.field-container label {
    font-weight: 500;
    margin-bottom: 4px;
    color: #333;
    font-size: 0.85em;
}
.field-container input {
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    background: #fff;
    transition: all 0.3s;
}
.field-container input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 4px rgba(0, 123, 255, 0.4);
    outline: none;
}
.field-container input[readonly] {
    background: #e9ecef;
    color: #666;
}
.multi-field-container {
    display: flex;
    gap: 8px;
}
@media (max-width: 800px) {
    .field-container {
        flex: 1 1 calc(50% - 10px);
    }
}
@media (max-width: 500px) {
    .field-container {
        flex: 1 1 100%;
    }
}
button:active {
    transform: scale(0.95);
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #A9D08E;
}
.modal-button-div {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    text-align: center;
}
.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;
}
.modal-content {
    position: relative;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.emission-btn {
    display: block;
    width: 40%;
    margin-top: 20px;
    padding: 10px 20px;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}
.modal-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
/* Contenitore della barra di caricamento */
#loading-container {
    text-align: center;
    color: white;
    align-items: center;
    display: flex;
    flex-direction: column;
}
/* Spinner */
.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); }
}

/* Selettore Lingua */
.language-selector-container {
  position: fixed;
  bottom: 26px;
  right: 20px;
  z-index: 9999;
  background: linear-gradient(135deg, #45a049, #6fcf97);
  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);
}
