@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* 
 * Stile personalizzato per la pagina attivazioni.html
 * Compatibilità completa con le principali risoluzioni
 */

/* Modifica il layout della dashboard solo nella pagina attivazioni */
.attivazioni-dashboard-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto !important;
  grid-template-areas: "attivazioni" !important;
  width: 100% !important;
  gap: 24px !important;
  margin-top: 24px !important;
  max-width: none !important;
}

/* Stile specifico per la card di attivazione */


/* Solo leggeri miglioramenti estetici mantenendo la compatibilità con il layout esistente */
.attivazioni-card .card-header {
  padding: 20px 24px;
  margin-bottom: 20px;
}

.attivazioni-card .form-container {
  padding: 20px 24px;
}

/* Responsive design per diverse risoluzioni */

/* Desktop Large (1920px e superiori) */


/* Desktop Small (1024px - 1365px) */
@media (min-width: 1024px) and (max-width: 1365px) {
  .attivazioni-dashboard-grid {
    gap: 18px !important;
    margin-top: 18px !important;
  }
  
  .attivazioni-card {
    min-height: 500px !important;
  }
  
  .attivazioni-card .card-header {
    padding: 18px 20px;
  }
  
  .attivazioni-card .form-container {
    padding: 18px 20px;
  }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .attivazioni-dashboard-grid {
    gap: 16px !important;
    margin-top: 16px !important;
    padding: 0 16px;
  }
  
  .attivazioni-card {
    min-height: 450px !important;
    border-radius: 12px !important;
  }
  
  .attivazioni-card .card-header {
    padding: 16px 18px;
  }
  
  .attivazioni-card .form-container {
    padding: 16px 18px;
  }
}

/* Mobile (fino a 767px) */
@media (max-width: 767px) {
  .attivazioni-dashboard-grid {
    gap: 12px !important;
    margin-top: 12px !important;
    padding: 0 12px;
  }
  
  .attivazioni-card {
    min-height: 400px !important;
    border-radius: 8px !important;
  }
  
  .attivazioni-card .card-header {
    padding: 14px 16px;
  }
  
  .attivazioni-card .form-container {
    padding: 14px 16px;
  }
  
  .attivazioni-card .card-title {
    font-size: 1.4rem !important;
  }
}

/* Fix per assicurare che il main-content si espanda correttamente nella pagina attivazioni */

/* --- Modern Progress Line Stepper (scoped) --- */
.attivazioni-page .attivazioni-card .progress-steps {
  margin: 6px 14px 4px 14px;
  position: relative;
}
.attivazioni-page .attivazioni-card .progress-track {
  position: relative;
  height: 4px;
  background: #e9eefb;
  border-radius: 999px;
  z-index: 1;
}
.attivazioni-page .attivazioni-card .progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #1e4ddb, #2b7cff);
  border-radius: 999px;
  transition: width 0.25s ease;
  z-index: 1;
}
.attivazioni-page .attivazioni-card .progress-steps-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 0; /* bring steps closer to the line */
  position: relative;
}
.attivazioni-page .attivazioni-card .progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px; /* tighter spacing between dot and label */
  color: #7b86a7;
  font-weight: 600;
  font-size: 12px;
}
.attivazioni-page .attivazioni-card .progress-step .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef3ff;
  color: #1e4ddb;
  font-weight: 700;
  border: 2px solid #d9e1ff;
  transition: all 0.2s ease;
  /* Center the dot on the line (line is 4px, dot 28px => offset ~12px) */
  transform: translateY(-15px);
  z-index: 2;
}
.attivazioni-page .attivazioni-card .progress-step.active .dot,
.attivazioni-page .attivazioni-card .progress-step.completed .dot {
  background: #1e4ddb;
  color: #fff;
  border-color: #1e4ddb;
  box-shadow: 0 4px 10px rgba(30, 77, 219, 0.25);
}
.attivazioni-page .attivazioni-card .progress-step .label {
  text-transform: uppercase;
  margin-top: -8px; /* pull labels closer to the dot sitting on the line */
  line-height: 1.1;
}

@media (max-width: 768px) {
  .attivazioni-page .attivazioni-card .progress-steps { margin: 4px 8px; }
  .attivazioni-page .attivazioni-card .progress-steps-row { gap: 4px; }
  .attivazioni-page .attivazioni-card .progress-step .label { font-size: 11px; margin-top: -8px; }
  .attivazioni-page .attivazioni-card .progress-step .dot { width: 26px; height: 26px; transform: translateY(-11px); }
}

/* --- Modern form controls: selects & labels (scoped) --- */
.attivazioni-page .form-container {
  display: grid;
  gap: 18px;
}
.attivazioni-page .form-group {
  display: flex;
  flex-direction: column;
  gap: 4px; /* reduce space between label and select */
  width: 100%;
}
.attivazioni-page .form-group > label {
  margin-bottom: 1 !important; /* enforce tight spacing even if global styles exist */
}
.attivazioni-page .form-group > .form-select,
.attivazioni-page .form-group > .form-control,
.attivazioni-page .form-group > select {
  margin-top: 1 !important; /* ensure select sticks to label, spacing handled by gap */
}
.attivazioni-page .form-label {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.4px;
  color: #51608a;
  text-transform: uppercase;
  margin-bottom: 0; /* spacing handled by .form-group gap */
}
.attivazioni-page .form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 48px;
  padding: 10px 44px 10px 14px; /* room for custom arrow */
  border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231e4ddb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
  color: #1f2532;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(30,77,219,0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.06s ease;
  animation: attivazione-pop-in 0.2s ease both;
}
.attivazioni-page .form-control,
.attivazioni-page .form-container select:not(.form-select) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 48px;
  padding: 10px 44px 10px 14px;
  border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231e4ddb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
  color: #1f2532;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(30,77,219,0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.06s ease;
  animation: attivazione-pop-in 0.2s ease both;
}
.attivazioni-page .form-select:hover,
.attivazioni-page .form-control:hover,
.attivazioni-page .form-container select:not(.form-select):hover {
  border-color: #b9c7ff;
}
.attivazioni-page .form-select:focus,
.attivazioni-page .form-control:focus,
.attivazioni-page .form-container select:not(.form-select):focus {
  outline: none;
  border-color: #1e4ddb;
  box-shadow: 0 0 0 4px rgba(30,77,219,0.12), 0 6px 18px rgba(30,77,219,0.08);
}
.attivazioni-page .form-select:active,
.attivazioni-page .form-control:active,
.attivazioni-page .form-container select:not(.form-select):active {
  transform: translateY(0.5px);
}
.attivazioni-page .form-select:disabled,
.attivazioni-page .form-control:disabled,
.attivazioni-page .form-container select:not(.form-select):disabled {
  background-color: #f6f8ff;
  color: #9aa8c8;
  border-color: #e6ecff;
  cursor: not-allowed;
}
.attivazioni-page .form-select:invalid,
.attivazioni-page .form-control:invalid,
.attivazioni-page .form-container select:not(.form-select):invalid,
.attivazioni-page .form-select option[value=""]:checked,
.attivazioni-page .form-control option[value=""]:checked,
.attivazioni-page .form-container select:not(.form-select) option[value=""]:checked {
  color: #8b98bb;
}
.attivazioni-page .form-select option,
.attivazioni-page .form-control option,
.attivazioni-page .form-container select:not(.form-select) option {
  font-weight: 500;
}

@keyframes attivazione-pop-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .attivazioni-page .form-container { gap: 14px; }
  .attivazioni-page .form-select,
  .attivazioni-page .form-control,
  .attivazioni-page .form-container select:not(.form-select) { height: 46px; font-size: 13px; background-position: right 12px center; }
}

/* Allinea lo stile del label "Tipo SKY" al resto */
.attivazioni-page label[for="sky-type"] {
  display: block;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 700 !important; /* override inline style */
  font-size: 12px;
  letter-spacing: 0.4px;
  color: #51608a;
  text-transform: uppercase;
  margin-bottom: 0 !important; /* override inline margin-bottom */
}

/* --- Disabilita effetto "lift" (alzata) sulla card attivazioni --- */
.attivazioni-page .attivazioni-card {
  transform: none !important;
  transition: transform 0s !important;
}
.attivazioni-page .attivazioni-card:hover,
.attivazioni-page .attivazioni-card:focus-within {
  transform: none !important; /* niente translate/scale su hover */
}

/* --- Offerte: griglia e card moderne --- */
.attivazioni-page #offerte-grid-wrapper {
  scroll-behavior: smooth;
}
.attivazioni-page .offerte-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.attivazioni-page .offerta-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: 0 6px 18px rgba(30, 77, 219, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  font-family: 'Poppins', sans-serif;
  min-height: 320px; /* più respiro per contenuto + bottone */
}
.attivazioni-page .offerta-card:hover {
  border-color: #d3ddff;
  box-shadow: 0 10px 24px rgba(30, 77, 219, 0.10);
}
.attivazioni-page .offerta-card.selezionata {
  border-color: #1e4ddb;
  box-shadow: 0 0 0 3px rgba(30, 77, 219, 0.18), 0 10px 24px rgba(30, 77, 219, 0.10);
}
.attivazioni-page .offerta-card h3 {
  margin: 12px 0 6px 0;
  font-size: 17px;
  font-weight: 700;
  color: #1f2532;
  font-family: 'Poppins', sans-serif;
}
.attivazioni-page .offerta-card p {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #5d6b8a;
  font-family: 'Poppins', sans-serif;
}
.attivazioni-page .offerta-card strong {
  display: inline-block !important;
  align-self: center; /* center horizontally inside flex column */
  text-align: center;
  font-size: 15px; /* leggermente più grande per il prezzo */
  color: #1e4ddb;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  margin: 10px 0 16px 0 !important; /* più distacco da titoli/descrizioni */
  padding: 8px 12px !important;
  background: rgba(30,77,219,0.08) !important;
  border: 1px solid rgba(30,77,219,0.18) !important;
  border-radius: 999px !important; /* chip */
}
.attivazioni-page .attiva-offerta-btn {
  margin-top: auto !important; /* fissa il bottone in basso nella card */
  height: 42px;
  width: 100%;
  border: none;
  font-family: 'Poppins', sans-serif;
  border-radius: 10px;
  background: #30589e;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.06s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 14px rgba(30, 77, 219, 0.22);
}
.attivazioni-page .attiva-offerta-btn:hover {
  box-shadow: 0 8px 18px rgba(30, 77, 219, 0.28);
}
.attivazioni-page .attiva-offerta-btn:active {
  transform: translateY(0.5px);
}

/* Tuning immagini logo dentro la card (override dell'inline solo se presente) */
.attivazioni-page .offerta-card img {
  object-fit: contain;
  max-height: 56px; /* leggermente più grande per i loghi */
}

.attivazioni-page .offerta-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Quando la card è selezionata */
.attivazioni-page .offerta-card.selezionata {
  transform: translateY(-6px); /* si alza */
  border-color: #1e4ddb;
  box-shadow: 0 10px 28px rgba(30, 77, 219, 0.18);
}

/* Se vuoi anche al passaggio del mouse */
.attivazioni-page .offerta-card:hover {
  transform: translateY(-4px);
}

@media (max-width: 768px) {
  .attivazioni-page .offerte-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 0 16px 16px 16px;
  }
  .attivazioni-page .offerta-card h3 { font-size: 15px; }
  .attivazioni-page .offerta-card p { font-size: 12px; }
  .attivazioni-page .attiva-offerta-btn { height: 38px; font-size: 13px; }
}

/* Applica Poppins in tutta l'area attivazioni */
.attivazioni-page,
.attivazioni-page .attivazioni-card,
.attivazioni-page .offerta-card,
.attivazioni-page .form-label,
.attivazioni-page .form-select,
.attivazioni-page .form-control {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif !important;
}

@media (max-width: 768px) {
  .attivazioni-page .offerte-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 0 16px 16px 16px;
  }
  .attivazioni-page .offerta-card h3 { font-size: 15px; }
  .attivazioni-page .offerta-card p { font-size: 12px; }
  .attivazioni-page .attiva-offerta-btn { height: 40px; font-size: 13px; }
}

/* Chips dei filtri selezionati (sotto la progress bar) */
.attivazioni-page .filter-chips {
  display: none; /* mostrato via JS quando completo */
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 24px 0 24px;
  transition: opacity 200ms ease; /* per fade-out morbido */
}
.attivazioni-page .filter-chips.fade-out { opacity: 0; }
.attivazioni-page .filter-chips .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f5f8ff;
  border: 1px solid #dbe5ff;
  color: #27407f;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.attivazioni-page .filter-chips .chip:hover { background: #eaf1ff; }
.attivazioni-page .filter-chips .chip .chip-remove { display:none; }

/* Smooth collapse of selectors to free space for offers */
.attivazioni-page .attivazioni-card .form-container {
  overflow: hidden;
}
.attivazioni-page .attivazioni-card .form-container.collapsed {
  transition: opacity 220ms ease, max-height 220ms ease, margin 220ms ease, padding 220ms ease;
  opacity: 0;
  max-height: 0;
  margin: 0 !important;
  padding: 0 !important;
}
.attivazioni-page .attivazioni-card .form-container .form-group {
  transition: opacity 200ms ease, max-height 200ms ease, margin 200ms ease, padding 200ms ease;
  opacity: 1;
  max-height: 240px; /* enough for selects */
}
.attivazioni-page .attivazioni-card .form-container.collapsed .form-group {
  opacity: 0;
  max-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
}

