.ip-root{
  max-width: 720px;
  margin: 24px auto;
  padding: 0 16px;
  padding-bottom: 96px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.ip-step{ margin: 18px 0 26px; }
.ip-hint{ margin: 6px 0 10px; opacity: .75; }

/* ===== PICKER SOROK ===== */
.ip-picker,
.ip-programs-picker{
  display:flex;
  overflow-x:auto;
  gap: 12px;
  padding: 16px 0;
  -webkit-overflow-scrolling: touch;
}

.ip-picker::-webkit-scrollbar,
.ip-programs-picker::-webkit-scrollbar{ display:none; }

/* Repülő: erős snap (center-snap) */
.ip-picker{
  scroll-snap-type: x mandatory;
}

/* Programok: NE legyen snap desktopon (ugrálás ellen) */
.ip-programs-picker{
  scroll-snap-type: none;
}

/* szélek */
.ip-picker-spacer{ flex: 0 0 48px; }

/* ===== REPÜLŐ KÁRTYA (DESKTOP) ===== */
.ip-card{
  flex: 0 0 320px;
  scroll-snap-align: center;

  background:#fff;
  border: 2px solid #e5e5e5;
  border-radius: 16px;

  padding: 16px;
  min-height: 140px;

  display:flex;
  flex-direction:column;
  justify-content:center;

  position:relative;
  text-align:left;
  user-select:none;

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ip-card-title{ font-size: 18px; font-weight: 650; line-height: 1.1; }
.ip-card-sub{ margin-top: 8px; font-size: 13px; opacity: .7; }

/* ===== PROGRAM KÁRTYÁK (DESKTOP) - kisebb, álló ===== */
.ip-chip{
  flex: 0 0 190px;     /* kisebb -> több látszik */
  min-height: 180px;   /* álló kártya */
  background:#fff;

  border: 2px solid #e5e5e5;
  border-radius: 16px;

  padding: 14px;

  display:flex;
  flex-direction:column;
  justify-content:center;

  position:relative;
  text-align:left;
  user-select:none;

  cursor:pointer;
  width:auto;

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

/* ===== KIVÁLASZTOTT (zöld) ===== */
.ip-card.ip-selected,
.ip-chip.ip-on{
  border-color: #16a34a;
  box-shadow: 0 16px 30px rgba(0,0,0,.15);
  transform: scale(1.03);
}

/* ===== ZÖLD PIPA ===== */
.ip-card-check{
  position:absolute;
  top: 10px;
  right: 10px;

  width: 26px;
  height: 26px;

  background:#16a34a;
  color:#fff;
  border-radius: 999px;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size: 14px;
  font-weight: 800;

  opacity: 0;
  transform: scale(.6);
  transition: opacity .18s ease, transform .18s ease;
}

.ip-card.ip-selected .ip-card-check,
.ip-chip.ip-on .ip-card-check{
  opacity: 1;
  transform: scale(1);
}

/* ===== PROGRAM SHELL + SCROLL BUTTONS (desktop) ===== */
.ip-programs-shell{
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
}

.ip-scroll-btn{
  height: 44px;
  width: 44px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  user-select:none;
}

.ip-scroll-btn:active{
  transform: scale(.98);
}

/* mobilon ne foglaljon helyet a gridben -> gombok elrejtése */
@media (max-width: 640px){
  .ip-programs-shell{
    display: block;
  }
  .ip-scroll-btn{
    display:none;
  }
}

/* ===== PROGRAM FOOTER ===== */
.ip-programs-footer{
  margin-top: 10px;
  display:flex;
  gap: 12px;
  align-items:center;
}

.ip-clear-programs{
  border:none;
  background:transparent;
  text-decoration: underline;
  cursor:pointer;
  padding: 6px 8px;
}

/* ===== FIX SUMMARY ===== */
.ip-summary{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid #ddd;

  z-index: 9999;
}

.ip-summary-inner{
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px;
}

.ip-summary-text{ margin-left: 8px; }

/* ===== Desktop: cursor + drag érzés csak a sávon ===== */
.ip-picker,
.ip-programs-picker{
  cursor: grab;
}
.ip-dragging{
  cursor: grabbing;
}

/* ===== MOBIL: 40vw kártyák ===== */
@media (max-width: 640px){
  .ip-picker,
  .ip-programs-picker{
    gap: 10px;
    padding: 12px 0;
  }

  .ip-picker-spacer{ flex: 0 0 8vw; }

  /* Repülő mobil */
  .ip-card{
    flex: 0 0 40vw;
    min-height: 170px;
  }

  /* Program mobil: ugyanakkora, mint a repülő */
  .ip-chip{
    flex: 0 0 40vw;
    min-height: 170px;
    padding: 16px;
  }

  .ip-card-title{ font-size: 16px; }
}

/* ===== scroll fade edges ===== */

.ip-picker,
.ip-programs-picker{

  position: relative;

  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0px,
    black 30px,
    black calc(100% - 30px),
    transparent 100%
  );

  mask-image: linear-gradient(
    to right,
    transparent 0px,
    black 40px,
    black calc(100% - 40px),
    transparent 100%
  );

}