
/* style.css - Stili principali della web app Bonus Bike */

html, body {
  background-color: #f8f9fa;
  font-family: 'Segoe UI', sans-serif;
  padding-bottom: 50px; /* spazio per il menu fisso */
  padding-top: 40px; /* altezza della navbar + margine */
  height: 100%;
  overflow-x: hidden;
  margin: 0;

}

h1, h2, h3, h4 {
  color: #007bff;
}

.table th, .table td {
  vertical-align: middle;
}

.fixed-bottom-menu {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 1000;
}

.fixed-bottom-menu a {
  text-align: center;
  flex: 1;
  font-size: 20px;
  color: #333;
}

.fixed-bottom-menu .add-button {
  font-size: 26px;
  color: #fff;
  background: #007bff;
  border-radius: 50%;
  padding: 10px;
  margin-top: -25px;
}


#products {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

.card-product img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.mobile-footer a {
  font-size: 14px;
  color: #555;
  text-decoration: none;
}

.mobile-footer a:hover {
  color: #198754;
}

.modal .form-control {
  margin-bottom: 10px;
}

.logo-img {
  height: 45px;
  object-fit: contain;
}

.navbar {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  min-height: 60px;
}
.navbar-brand img {
  height: 45px;
  object-fit: contain;
}

/* Footer navigazione mobile */
.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 1000;
}

.footer-nav a,
.footer-nav button {
  flex: 1;
  text-align: center;
  color: #333;
  background: none;
  border: none;
  font-size: 14px;
}

.footer-nav i {
  display: block;
  font-size: 20px;
  margin-bottom: 3px;
}

#login-menu {
  position: absolute;
  bottom: 60px;
  right: 10px;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: none;
  flex-direction: column;
  z-index: 1100;
}

#login-menu a {
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  white-space: nowrap;
}

#login-menu a:hover {
  background: #f8f9fa;
}

.user-info-inline {
  font-size: 0.8rem;
  background-color: rgba(245, 245, 245, 0.9);
  border-radius: 0.4rem;
  padding: 6px 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  line-height: 1.2;
}

a.forgot-link {
  color: #0d6efd !important;;
  text-decoration: none !important;;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

a.forgot-link:hover {
  color: #0a58ca;
  text-decoration: underline;
}

/* Barra progressiva fondo residuo */
#indicator {
  position: absolute;
  top: -25px; /* spazio tra la freccia e la barra*/
  transition: left 0.5s ease;
  color: black;
}


.card .card-body {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* === Upload box (foto scontrino / telaio) === */
.upload-box {
  position: relative;
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 30px 15px;
  background-color: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 180px;
}

.upload-box:hover {
  border-color: #28a745;
  background-color: #f0fff4;
}

.upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-box .upload-icon {
  font-size: 2.2rem;
  color: #6c757d;
}

.upload-box.dragover {
  border-color: #198754;
  background-color: #e9f9ef;
}

.upload-box img {
  max-height: 150px;
  border-radius: 10px;
  border: 1px solid #ddd;
  object-fit: contain;
}

/* === FIELDSET OTTIMIZZATO (responsive + armonico) === */
fieldset {
  border: 1.5px solid #dee2e6;
  border-radius: 0.75rem;
  padding: 1.25rem 1rem 1rem;
  margin-bottom: 1.5rem;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

legend {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0d6efd;
  padding: 0 0.5rem;
  margin-left: 0.5rem;
}

/* Variante colore per le sezioni specifiche */
legend.text-primary { color: #0d6efd; }  /* Dati acquirente */
legend.text-success { color: #198754; }  /* Prezzi e bonus */

/* === MOBILE FIX: allineamento e spazi === */
@media (max-width: 768px) {
  fieldset {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 1rem !important;
    border-radius: 0.5rem;
  }

  legend {
    margin-left: 0.25rem;
    font-size: 1rem;
  }
}

/* === BOX UPLOAD migliorato === */
.upload-box {
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 1.25rem;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-box:hover {
  background-color: #f1f3f5;
  border-color: #0d6efd;
}

.upload-box.dragover {
  background-color: #e7f1ff;
  border-color: #0d6efd;
}

.upload-box .upload-icon {
  font-size: 2rem;
  color: #0d6efd;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 0.375rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover .card-overlay {
  opacity: 1;
}

.card:active .card-overlay {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.card-img-top {
  object-fit: cover;
  height: 220px;
}

#modalCallButton {
  font-weight: 600;
  transition: all 0.25s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

#modalCallButton:hover {
  background-color: #218838;
  transform: scale(1.05);
}
