/* 1️⃣ RESET E BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f0f0f0, #d4e0ff);
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 2️⃣ HEADER */
header {
  background-color: #2c3e50;
  color: white;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

header p {
  font-size: 1.2em;
  opacity: 0.85;
}

/* 3️⃣ MAIN - CONTENITORE CENTRALE */
main {
  flex: 1;
  padding: 40px 20px;
  max-width: 600px;
  margin: 40px auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* 4️⃣ TITOLI E PARAGRAFI */
h2 {
  font-size: 1.8em;
  margin-bottom: 20px;
  color: #2c3e50;
}

label {
  font-weight: bold;
  font-size: 1.05em;
  margin-bottom: 5px;
  display: block;
  color: #333;
}

/* 5️⃣ SELECT (MENU A TENDINA) */
select {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 20px;
  background-color: #f9f9f9;
  transition: all 0.2s ease-in-out;
}

select:focus {
  outline: none;
  border-color: #4CAF50;
  background-color: #fff;
}

/* 6️⃣ BOTTONE */
button {
  width: 100%;
  padding: 14px;
  font-size: 18px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #43a047;
}

/* 7️⃣ FOOTER */
footer {
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #666;
  background-color: #eaeaea;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.1);
}
/* 🔄 Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader .loader {
  font-size: 24px;
  font-weight: bold;
  color: #4CAF50;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}
/* 🔵 CENTRA il blocco ordine */
.ordine-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

/* 🧾 BOX riassunto dell’ordine */
.ordine-box {
  background-color: #f0f4ff;
  padding: 20px;
  border: 2px solid #4CAF50;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

/* 🔒 Campi readonly */
.readonly-input {
  width: 100%;
  background-color: #eaf5ea;
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 15px;
  font-weight: bold;
  font-size: 16px;
  border-radius: 6px;
  color: #2c3e50;
}
/* 🎯 CAMPO USERNAME */
#username {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 10px auto;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: block;
}

#username:focus {
  border-color: #4CAF50;
  outline: none;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* Messaggio sotto il campo */
#messaggio-verifica {
  display: block;
  margin-top: 4px;
  text-align: center;
  font-size: 14px;
}
.grazie-main {
  text-align: center;
  padding: 60px 20px;
  font-family: 'Arial', sans-serif;
}

.grazie-main h1 {
  font-size: 2.2em;
  margin-bottom: 20px;
  color: #4CAF50;
}

.grazie-main p {
  font-size: 1.2em;
  margin-bottom: 10px;
}

.grazie-main button {
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 1em;
  border: none;
  background-color: #4CAF50;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.grazie-main button:hover {
  background-color: #388e3c;
}
.form-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.form-box label {
  font-weight: bold;
  margin-bottom: 5px;
  text-align: center;
}

.form-box input {
  padding: 8px;
  width: 80%;
  max-width: 400px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px;
}
form#form-ordine {
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* ==========================
   💎 STILE PAGINA ORDINE
   ========================== */

/* ===== ORDINE - versione definitiva ===== */

body.ordine-page {
  background: linear-gradient(135deg, #f3f5ff, #e8ecff);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Box principale */
body.ordine-page form#form-ordine {
  background: #ffffff;
  border-radius: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 40px 35px;
  width: 90%;
  max-width: 460px;
  text-align: center;
}

/* Correzione centratura perfetta del riquadro interno */
/* ✅ Centratura precisa del riquadro interno */
body.ordine-page .ordine-box {
  background: #f6f7ff;
  border: 3px solid #cfd2d8;
  border-radius: 20px;
  padding: 20px;
  margin: 0 auto 25px auto;      /* centra orizzontalmente */
  width: 92%;                    /* correzione proporzione visiva perfetta */
  display: flex;
  flex-direction: column;
  align-items: stretch;           /* mantiene campi larghi uguali */
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

/* Per garantire allineamento anche dentro il form */
body.ordine-page form#form-ordine {
  background: #ffffff;
  border-radius: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 40px 20px;             /* 🔥 ridotto da 35px → 20px per simmetria */
  width: 90%;
  max-width: 460px;
  text-align: center;
  margin: 0 auto;                 /* forza centratura assoluta */
}


/* Input standard (tipo servizio, piattaforma, quantità) */
body.ordine-page .ordine-box input,
body.ordine-page .ordine-box select {
  background: #eef2ee;
  border-radius: 8px;
  border: 2px solid #2e8b57;
  padding: 10px;
  font-size: 1rem;
  width: 100%;
  margin-top: 6px;
  outline: none;
  transition: 0.2s;
}

/* Focus evidenziato in verde */
body.ordine-page .ordine-box input:focus,
body.ordine-page .ordine-box select:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.4);
}

/* Campi username e email bianchi */
body.ordine-page input#identificatore,
body.ordine-page input#email {
  background: #ffffff;
  border: 2px solid #cccccc;
  border-radius: 8px;
  padding: 10px;
  width: 100%;
  transition: 0.2s;
}

body.ordine-page input#identificatore:focus,
body.ordine-page input#email:focus {
  border-color: #2e8b57;
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.3);
}

/* Prezzo e testi */
body.ordine-page p#prezzo-mostrato {
  color: #222;
  font-weight: 600;
  margin: 12px 0;
}

/* Bottone verde */
body.ordine-page button {
  background: linear-gradient(90deg, #2e8b57, #3cb371);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
  transition: transform 0.2s ease, background 0.3s ease;
}

body.ordine-page button:hover {
  background: linear-gradient(90deg, #3cb371, #2e8b57);
  transform: scale(1.05);
}
/* ✅ FOOTER GRIGIO CHIARO A LARGHEZZA PIENA */
footer {
  width: 100%;
  background-color: #f2f2f2;  /* 🔹 Grigio chiaro */
  color: #555;                /* Testo grigio medio per contrasto */
  text-align: center;
  padding: 18px 0;
  font-size: 14px;
  font-weight: 500;
  border-top: 1px solid #ddd; /* Linea superiore leggermente più scura */
  position: relative;
  bottom: 0;
  left: 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Mantiene il footer sempre in fondo alla pagina */
html, body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
}
