/* Basic layout */
.ape-gld-configurator .apegld-layout{
  display:grid;
  grid-template-columns: 1.5fr 1fr;
  gap:24px;
}
/* Sirena APE (step 3) */
.preview-box[data-preview="siren"] img {
  max-width: 350px;
  padding: 50px 0;
}


@media (max-width: 980px){
  .ape-gld-configurator .apegld-layout{
    grid-template-columns: 1fr;
  }
  .ape-gld-configurator .apegld-right .sticky{ position:static; top:auto; }
}
.ape-gld-configurator .apegld-left .step{
  background:#fff;
  border:1px solid #eee;
  border-radius:14px;
  padding:18px;
  margin-bottom:16px;
  transition:opacity .25s ease, filter .25s ease;
  opacity:.5;
  filter:grayscale(40%);
}
.ape-gld-configurator .apegld-left .step.is-active{ opacity:1; filter:none; }
.ape-gld-configurator .apegld-left .step.is-locked{ pointer-events:none; }
.ape-gld-configurator .apegld-left .step header h3{ margin:0 0 10px; font-size:18px; }

.options{ display:flex; flex-wrap:wrap; gap:10px; }
.opt{
  background:#f5f5f5; border:1px solid #ddd; border-radius:999px; padding:10px 16px;
  cursor:pointer; transition:all .2s ease; font-weight:600;
}
.opt:hover{ background:#eee; }
.opt.is-selected{ background:#111; color:#fff; border-color:#111; }

/* Dots for numeric selections */
.options.dots .opt{
  width:44px; height:44px; display:flex; align-items:center; justify-content:center; border-radius:50%;
  padding:0;
}
.dot-num{ font-weight:700; }

.preview-line{
  margin-top:12px; display:grid; gap:10px;
}
.preview-line.grid-4{ grid-template-columns: repeat(4, 1fr); }
.preview-box{
  background:#ececec; border-radius:10px; min-height:80px; display:flex; align-items:center; justify-content:center;
  overflow:hidden; position:relative;
}
.preview-box img{
  max-width:100%; max-height:100%; object-fit:contain; display:block;
}

/* Right column */
.apegld-right .sticky{ position:sticky; top:110px; }
.summary{
  background:#fff; border:1px solid #eee; border-radius:14px; padding:16px;
}
.result-table{ width:100%; border-collapse:collapse; margin-top:10px; }
.result-table th, .result-table td{ border-bottom:1px solid #efefef; padding:8px 6px; text-align:left; }
.result-table tbody tr:last-child td{ border-bottom:none; }
.reset{margin-top:4px; background:#c62828; color:#fff; border:none; border-radius:8px; padding:10px 12px; cursor:pointer;}
.reset:hover{ background:#a61e1e; }
.hero-preview{ margin-top:12px; background:#ececec; border-radius:12px; min-height:140px; display:flex; align-items:center; justify-content:center;padding:50px 0px; }
.hero-preview img{ max-width:100%; max-height:180px; object-fit:contain; }
.step-4 img{padding:0px 20px;}
:not(pre)>code, :not(pre)>kbd, :not(pre)>samp, code{color:#717171;font-weight:bold;}
.preview-box img[src*="default-sensor.png"],.preview-box img[src*="sensore-gas-co2-e-gruppo1-default.png"]{opacity:0.3;filter:grayscale(100%);}
.preview-box[data-preview="siren"] img[src*="default"]{opacity:0.3;filter:grayscale(100%);}
.preview-box[data-preview^="button-"] img[src*="default"]{opacity:0.3;filter:grayscale(100%);}
.reset{background:#717171}



.send-config-wrap {
  margin-top: 16px;
  text-align: center;
}
.send-config-btn,
.submit-config,
.back-to-results {
  background: #2c2c2c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  margin: 5px;
}
.back-to-results{
	background:#ececec;
	color:#5a5150;
}
.send-config-btn:hover,
.submit-config:hover
 {
  background: #424242;
}
.back-to-results:hover{
	background:#e2e0e0;
}
.send-config-form {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}
.send-config-form .form-group {
  margin-bottom: 12px;
}
.send-config-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.send-config-form input,
.send-config-form textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
}
.actions-row {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.actions-row .reset,
.actions-row .send-config-btn {
  background: #2c2c2c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
}
.actions-row .reset{
	background: #ececec;
	color: #5a5150;
}
.actions-row .reset:hover{background:#e2e0e0;}
.actions-row .send-config-wrap {float:left!important}
/* Loader */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  color: #333;
}
.loader .spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #ddd;
  border-top-color: #0073aa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Messaggi post-invio */
.form-message {
  margin-top: 12px;
  text-align: center;
}
.form-message p.success {
  color: #0a7a27;
  background: #e5f9eb;
  padding: 10px;
  border-radius: 6px;
}
.form-message p.error {
  color: #b30000;
  background: #ffe6e6;
  padding: 10px;
  border-radius: 6px;
}
/* --- Tooltip gas --- */
.opt {
  position: relative;
  overflow: visible;
}

.opt .tooltip {
  position: absolute;
  left: 50%;
  bottom: 110%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.9);
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  width: 220px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}

.opt:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -6px);
}

.opt .tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: rgba(0,0,0,0.9) transparent transparent transparent;
}
.is-hidden {
  display: none !important;
}
[data-subgroup="buttons-count"] .buttons-wrapper{
	display: flex;
    width: 100%;
}
[data-subgroup="buttons-count"] .buttons-wrapper button{
	margin-right:10px;
}
[data-subgroup="buttons-count"] p{
	margin-top: 20px;
    margin-bottom: 0px;
    font-size: 14px;
    font-weight: bold;
    color: #2c2c2c;
    font-family: Karla;
    font-size: 18px;
    letter-spacing: -1px;
}