/* Gradient Background */
body {
    font-family: 'Arial', sans-serif;
    background: url('background.jpg') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    text-align: center;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Info Button */
.info-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #eab54e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.info-button:hover {
    background-color: #97b46a;
}



/* Disclaimer Modal */
#disclaimer-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    width: 300px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 1000;
}

#disclaimer-modal p {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

#close-modal {
    background-color: #97b46a;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

#close-modal:hover {
    background-color: #97b46a;
}

#disclaimer-box {
    margin-top: 17px;
    padding: 12px 18px;
    background-color: #f9f9f9;
    border-left: 4px solid #eab54e;
    border-radius: 8px;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    text-align: justify;
    max-width: 100%;/*600px;*/
    margin-left: auto;
    margin-right: auto;
}


/* Table Styling */
#parameters-table td {
    text-align: right;
    font-size: 14px;
}

.container {
    max-width: 1000px;
    margin: 50px auto;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Titolo */
h1 {
    color: #333;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Griglia input */
.data-grid {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.input-container {
    width: 90%;
    margin: 0 auto;
    text-align: center;
}

.column {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.column label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #444;
    text-align: center;
}

/* Box input */
.input-field {
    width: 100%;
    height: 150px;
    border: 2px solid #ccc;
    padding: 10px;
    overflow-y: auto;
    background-color: white;
    text-align: left;
    white-space: pre-wrap;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.3s ease-in-out;
}

.input-field:hover {
    border-color: #97b46a;
}

.input-field:focus {
    outline: none;
    border-color: #97b46a;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

/* Bottone */
button {
    background-color: #97b46a;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

button:hover {
    background-color: #7d964f;
}

/* Messaggio di errore */
.error-message {
    color: red;
    margin-top: 10px;
    font-weight: bold;
    display: none;
}

/* Sezione Risultati */
#results-container {
    display: none; 
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    width: 95%;
    height: 100%;
    text-align: center;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: all 0.3s ease-in-out; 
}

canvas {
    width: 100% !important;
    height: auto !important;
    min-height: 400px;
    max-height: 600px;
    max-width: 100%;
    margin-top: 20px;
}

h2 {
    margin-bottom: 15px;
    border-bottom: none;
}

#static-data {
    margin-top: 20px;
    padding: 15px;
    background: #e9f5ff;
    border-radius: 8px;
    width: 80%;
}

/* Pulsante per tornare indietro */
#back-button {
    margin-top: 20px;
    background-color: #ff4d4d;
}

#back-button:hover {
    background-color: #cc0000;
}

/* Spinner di caricamento */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #97b46a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.custom-file-upload {
    background-color: #97b46a;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-block;
    transition: background 0.3s ease-in-out;
    margin-bottom: 20px;
}

.custom-file-upload:hover {
    background-color: #7d964f;
}

#file-name {
    margin-left: 10px;
    font-style: italic;
    color: #555;
}

.file-upload-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.file-upload-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.file-label {
    background-color: #97b46a;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: inline-block;
    transition: background 0.3s ease;
}

.file-label:hover {
    background-color: #7d964f;
}

#file-upload {
    display: none;
}

#file-info {
    font-size: 14px;
    color: #333;
}

/*#parameters-container {
    margin-top: 20px;
    text-align: center;
}*/
#parameters-container {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    text-align: center;
}

/* Dimensioni e comportamento dell'immagine a destra */
/*#parameters-image {
    display: block;
    max-width: 320px;          
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}*/
#parameters-image {
    flex: 1;
    max-width: 50%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    object-fit: contain;
}
/*#parameters-table {
    width: 100%;
    max-width: 600px;
    margin: 0;    
    border-collapse: collapse;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}*/
#parameters-table {
    flex: 1;
    max-width: 50%;
    margin: 0;
    border-collapse: collapse;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}
#parameters-table th, #parameters-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

#parameters-table th {
    background-color: #97b46a;
    color: white;
    text-align: left;
}

#parameters-table tbody tr:nth-child(even) {
    background-color: #f4f7fc;
}



/* Footer Styles */
html, body {
    height: auto;
    min-height: 100%;
    display: block;
    margin: 0;
    overflow-x: hidden;
}

.container {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
}

.footer {
    background-color: #222;
    color: white;
    text-align: center;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    /*gap: 20px;*/
    flex-wrap: wrap;
    width: 100%;
    /*position: relative;*/
} 

/*.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    max-width: 1200px;
}*/

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
    gap: 50px;
}

.footer-logo {
    height: 50px;
    width: auto;
}

.footer p {
    max-width: 600px;
    font-size: 14px;
    line-height: 1.5;
    text-align: justify;
    margin: 0 auto;
    flex: 1 1 auto;
}


.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.button-container button {
    width: 110px;
    padding: 10px;
    font-size: 16px;
    background-color: #97b46a;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
}

.button-container button:hover {
    background-color: #7d964f;
}

#reset-zoom {
    display: none;
}

/* === Loghi: Ruby a sinistra, Minervas centrato === */
.logos {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 20px;
  min-height: 110px;
}

/* Ruby fisso all’estremo sinistro del contenitore bianco */
.logos a:first-child {
  position: absolute;
  left: 20px; /* combacia col padding del blocco bianco */
  top: 50%;
  transform: translateY(-50%);
}

/* Stile uniforme per i loghi */
.logo {
  height: 90px;
  width: auto;
}

/* Logo UNISA a destra */
.logo--unisa {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  height: 90px;
  width: auto;
}

/* Mobile */
@media (max-width: 600px) {
  .logo { height: 70px; }
}

/* ===== Modal disclaimer (overlay + box) ===== */
.modal-overlay[hidden],
.modal[hidden] { display: none !important; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999; /* sopra a tutto */
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 92vw);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  padding: 20px;
  z-index: 1000; /* sopra all'overlay */
  text-align: left;
}

.modal h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.modal-body p {
  margin: 0;
  color: #333;
  line-height: 1.45;
  font-size: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* Bottoni del modal */
.modal-actions button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.modal-actions .btn-secondary {
  background: #e6e6e6;
  color: #333;
}

#ack-continue {
  background-color: #97b46a; /* tuo verde brand */
  color: #fff;
}

#ack-continue:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
