/* Ricerca per telaio (VIN) */
.vin-search-section .vin-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.vin-search-section .vin-input {
  max-width: 20rem;
}
.vin-search-section .submit-search-btn .fas {
  margin-left: 0.35rem;
}

/* Overlay attesa */
.vin-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vin-overlay-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}
.vin-overlay-content {
  position: relative;
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.vin-overlay-message {
  margin: 0;
  font-size: 1.1rem;
}

/* Modal accesso richiesto (guest su ricerca VIN) */
.vin-auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.vin-auth-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}
.vin-auth-modal-content {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.vin-auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #dee2e6;
}
.vin-auth-modal-title {
  margin: 0;
  font-size: 1.2rem;
}
.vin-auth-modal-close {
  background: none;
  border: 0;
  font-size: 1.8rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
}
.vin-auth-modal-close:hover {
  color: #000;
}
.vin-auth-modal-body {
  padding: 1rem 1.25rem 1.25rem;
}
.vin-auth-modal-body p {
  margin: 0 0 1rem;
}
.vin-auth-modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.vin-auth-btn {
  display: inline-block;
  min-width: 130px;
  text-align: center;
  border-radius: 6px;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  font-weight: 600;
}
.vin-auth-btn-login {
  background: #3399ff;
  border: 1px solid #3399ff;
  color: #fff;
}
.vin-auth-btn-register {
  background: #fff;
  border: 1px solid #3399ff;
  color: #3399ff;
}

/* Elenco veicoli – tabella */
.vin-vehicle-results {
  margin-top: 1rem;
}
.vin-vehicle-results.vin-has-results {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
}
.vin-vehicle-table {
  width: 100%;
  margin: 0;
  font-size: 1.4rem;
}
.vin-vehicle-table th {
  font-weight: 600;
  white-space: nowrap;
}
.vin-vehicle-table .vin-cell-veicolo {
  font-weight: 500;
}
.vin-vehicle-table .vin-cell-action {
  text-align: center;
  width: 5rem;
}
.vin-vehicle-table .vin-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #007bff;
  text-decoration: none;
}
.vin-vehicle-table .vin-action-link:hover {
  color: #0056b3;
}
.vin-vehicle-table .vin-action-link .fas {
  font-size: 1.25rem;
  color: #007bff;
}
.vin-vehicle-table .vin-action-link:hover .fas {
  color: #0056b3;
}
.vin-vehicle-table .vin-action-link-disabled {
  color: #6c757d;
  cursor: default;
  pointer-events: none;
}
.vin-vehicle-table .vin-action-link-disabled .fas {
  color: #6c757d;
}
.vin-no-results,
.vin-error {
  margin: 0;
  color: #721c24;
  padding: 0.5rem 0;
}

/* Modal Part number */
.vin-parts-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.vin-parts-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}
.vin-parts-modal-content {
  position: relative;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.vin-parts-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #dee2e6;
}
.vin-parts-modal-title {
  margin: 0;
  font-size: 1.25rem;
}
.vin-parts-modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  color: #666;
}
.vin-parts-modal-close:hover {
  color: #000;
}
.vin-parts-modal-body {
  padding: 1rem 1.25rem;
  overflow: auto;
  font-size: 1rem;
}
.vin-parts-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem 0;
  font-size: 1rem;
}
.vin-parts-table th,
.vin-parts-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border: 1px solid #dee2e6;
}
.vin-parts-table th {
  font-weight: 600;
  background: #f8f9fa;
}
.vin-parts-tree {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1rem 0;
}
.vin-parts-tree ul {
  list-style: none;
  padding-left: 1.25rem;
  margin: 0.25rem 0 0 0;
}
.vin-parts-tree .vin-tree-node {
  margin: 0.25rem 0;
}
.vin-parts-tree .vin-tree-node-name {
  cursor: pointer;
  padding: 0.25rem 0;
}
.vin-parts-tree .vin-tree-node-name:hover {
  text-decoration: underline;
}
.vin-parts-tree .vin-tree-load {
  color: #0066cc;
  font-size: 0.9rem;
}
.vin-parts-tree .vin-tree-details {
  color: #007bff;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
  margin-left: 0.25rem;
}
.vin-parts-tree .vin-tree-details:hover {
  color: #0056b3;
}
.vin-parts-empty,
.vin-parts-error {
  color: #721c24;
  padding: 0.5rem 0;
}
.vin-parts-raw-intro {
  margin-bottom: 1rem;
}
.vin-parts-raw-label {
  margin: 1rem 0 0.25rem 0;
  font-size: 0.95rem;
}
.vin-parts-raw-pre {
  background: #f5f5f5;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.35;
  overflow-x: auto;
  max-height: 50vh;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Risultati prodotti VIN in-page (sotto la tabella veicoli) */
.vin-products-results {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.vin-products-results .vin-products-message,
.vin-products-results .vin-products-empty {
  margin-bottom: 0;
}
.vin-products-results .vin-products-results-title {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}
.vin-products-results #js-product-list {
  margin-top: 0.5rem;
}

/* Contenitore risultati VIN: stesso contesto della sezione #products (ricerca/categoria) */
.vin-products-results #vin-products.products-section,
.vin-products-results section.products-section {
  width: 100%;
  margin: 0;
  padding: 0;
}
.vin-products-results #vin-products .nav-products-list-top,
.vin-products-results #vin-products #js-product-list-top {
  margin-bottom: 0.5rem;
}
