/* Finom fókusz, kártyák, stepper és minta-kártyák “native” hatás */
:root {
  --ring: 59 130 246; /* blue-500 */
}

.input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgb(226 232 240);
  background: rgba(248, 250, 252, 0.9);
  padding: 12px 12px;
  font-size: 14px;
  line-height: 1.25rem;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.input-white {
  background: #fff;
}

.input:focus {
  border-color: rgb(191 219 254);
  box-shadow: 0 0 0 4px rgba(var(--ring), 0.15);
  background: rgba(255, 255, 255, 0.95);
}

.input-white:focus {
  background: #fff;
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgb(30 41 59);
  margin-bottom: 6px;
}

.hint {
  margin-top: 6px;
  font-size: 12px;
  color: rgb(100 116 139);
}

.section-card {
  border-radius: 18px;
  border: 1px solid rgb(226 232 240);
  background: rgba(248, 250, 252, 0.65);
  padding: 16px;
}

.section-divider {
  height: 1px;
  width: calc(100% + 32px);
  background: rgb(226 232 240);
  margin: 6px -16px;
}

.section-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.section-badge {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 50px;
  font-weight: 700;
  font-size: 20px;
  color: #ffffff;
  background: #0085AD;
}

.section-title {
  font-weight: 700;
  font-size: 16px;
  color: rgb(15 23 42);
}

.section-subtitle {
  margin-top: 2px;
  font-size: 13px;
  color: rgb(100 116 139);
}

/* Buttons */
.btn-primary {
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 400;
  background: #0085AD;
  color: white;
  border: 1px solid #0085AD;
  transition: transform .05s ease, opacity .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-primary.is-loading { opacity: 0.85; cursor: wait; }
.btn-primary .btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.45);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: btn-spin 0.8s linear infinite;
}

.btn-secondary {
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 400;
  background: rgba(255,255,255,0.8);
  color: rgb(15 23 42);
  border: 1px solid rgb(226 232 240);
  transition: transform .05s ease, background .15s ease;
}
.btn-secondary:active { transform: translateY(1px); }

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* Stepper */
.stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 10px;
  align-items: center;
}

.stepper-input-wrap {
  position: relative;
  width: 100%;
}

.stepper-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgb(226 232 240);
  background: rgba(255,255,255,0.85);
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: transform .05s ease, background .15s ease;
}
.stepper-btn:active { transform: translateY(1px); }
.stepper-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(var(--ring), 0.15);
}

.stepper-input {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgb(226 232 240);
  background: rgba(248, 250, 252, 0.9);
  padding: 0 70px 0 14px;
  font-size: 22px;
  font-weight: 600;
  outline: none;
}

.stepper-input.input-white {
  background: #fff;
}
.stepper-input:focus {
  border-color: rgb(191 219 254);
  box-shadow: 0 0 0 4px rgba(var(--ring), 0.15);
  background: rgba(255,255,255,0.95);
}

.stepper-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: rgb(100 116 139);
  pointer-events: none;
}

/* Height tiles */
.height-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.height-tile {
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgb(226 232 240);
  background: rgba(248, 250, 252, 0.9);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  color: rgb(15 23 42);
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.height-tile:hover {
  transform: translateY(-1px);
}

.height-radio:focus-visible + .height-tile {
  outline: none;
  box-shadow: 0 0 0 4px rgba(var(--ring), 0.15);
}

.height-radio:checked + .height-tile {
  border-color: rgb(59 130 246);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

/* Installation tiles */
.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.install-tile {
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgb(226 232 240);
  background: rgba(248, 250, 252, 0.9);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  color: rgb(15 23 42);
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.install-tile:hover {
  transform: translateY(-1px);
}

.install-radio:focus-visible + .install-tile {
  outline: none;
  box-shadow: 0 0 0 4px rgba(var(--ring), 0.15);
}

.install-radio:checked + .install-tile {
  border-color: rgb(59 130 246);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

/* Soil tiles */
.soil-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.soil-tile {
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgb(226 232 240);
  background: rgba(248, 250, 252, 0.9);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  color: rgb(15 23 42);
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.soil-tile:hover {
  transform: translateY(-1px);
}

.soil-radio:focus-visible + .soil-tile {
  outline: none;
  box-shadow: 0 0 0 4px rgba(var(--ring), 0.15);
}

.soil-radio:checked + .soil-tile {
  border-color: rgb(59 130 246);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

/* Pattern cards */
.pattern-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .pattern-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pattern-card {
  display: grid;
  grid-template-rows: auto auto;
  border-radius: 18px;
  border: 1px solid rgb(226 232 240);
  background: rgba(255,255,255,0.8);
  overflow: hidden;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease;
}

.pattern-card:hover {
  transform: translateY(-1px);
}

.pattern-radio:focus-visible + .pattern-card {
  outline: none;
  box-shadow: 0 0 0 4px rgba(var(--ring), 0.15);
}

.pattern-radio:checked + .pattern-card {
  border-color: rgb(59 130 246);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.pattern-image {
  height: auto;
  background: linear-gradient(135deg, rgba(226,232,240,0.8), rgba(241,245,249,0.8));
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgb(226 232 240);
  overflow: hidden;
  position: relative;
}

.pattern-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.pattern-image-text {
  font-size: 12px;
  color: rgb(100 116 139);
}

.pattern-meta {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  position: static;
}

.pattern-name {
  font-weight: 700;
  font-size: 14px;
  color: rgb(15 23 42);
}

.pattern-chip {
  font-size: 11px;
  color: rgb(71 85 105);
  border: 1px solid rgb(226 232 240);
  background: rgba(248,250,252,0.9);
  padding: 4px 8px;
  border-radius: 999px;
}

/* Selected state (JS csak a labelre teszi rá a class-t) */
.pattern-card.is-selected {
  border-color: rgb(147 197 253);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
}

.pattern-card.is-selected .pattern-image {
  background: linear-gradient(135deg, rgba(219,234,254,0.9), rgba(241,245,249,0.9));
}

/* Invalid states */
.is-invalid {
  border-color: rgb(254 202 202) !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.10) !important;
}

.preview-image {
  width: 100%;
  max-width: 360px;
  border-radius: 14px;
  border: 1px solid rgb(226 232 240);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.08);
}

/* Thank you collage */
.collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 110px;
  gap: 12px;
}

.collage-tile {
  border-radius: 16px;
  border: 1px solid rgb(226 232 240);
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.08);
}

.collage-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.collage-hero {
  grid-column: 1 / -1;
  grid-row: 1 / 3;
}

.collage-top {
  grid-column: 1 / 2;
  grid-row: 3 / 4;
}

.collage-mid {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
}

.collage-bot1 {
  grid-column: 1 / 2;
  grid-row: 4 / 5;
}

.collage-bot2 {
  grid-column: 2 / 3;
  grid-row: 4 / 5;
}

.collage-bot3 {
  grid-column: 1 / 2;
  grid-row: 5 / 6;
}

.collage-bot4 {
  grid-column: 2 / 3;
  grid-row: 5 / 6;
}

@media (min-width: 640px) {
  .collage {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 130px;
  }

  .collage-hero {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
  }

  .collage-top {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
  }

  .collage-mid {
    grid-column: 3 / 5;
    grid-row: 2 / 3;
  }

  .collage-bot1 {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
  }

  .collage-bot2 {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
  }

  .collage-bot3 {
    grid-column: 3 / 4;
    grid-row: 3 / 4;
  }

  .collage-bot4 {
    grid-column: 4 / 5;
    grid-row: 3 / 4;
  }
}
