/* ============================================================
   Handabdruck (Handprint) — Helvetia theme layer
   ------------------------------------------------------------
   Styling for:
     - the result-page view toggle (Fußabdruck / Handabdruck)
     - the dedicated handprint result panel
     - the step-by-step action-plan accordion
   Colours resolve through the shared theme tokens defined in
   css/helvetia.css (mapped onto the Helvetia palette).
   ============================================================ */

/* ---------- View toggle (segmented control) ---------- */
.hp-view-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 620px;
  margin: 24px auto 8px;
  padding: 6px;
  background: var(--erste-light, #eef4fd);
  border: 1px solid var(--erste-border, #d3e0f5);
  border-radius: 999px;
}
.hp-view-toggle .hp-view-btn {
  flex: 1 1 0;
  border: none;
  background: transparent;
  color: var(--erste-navy, #0a2e5c);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.hp-view-toggle .hp-view-btn:hover {
  color: var(--erste-blue-dark, #1152b5);
}
.hp-view-toggle .hp-view-btn.active {
  background: var(--erste-blue, #2870ed);
  color: #fff;
  box-shadow: 0 2px 6px rgba(10, 46, 92, 0.2);
}
.hp-view-toggle .hp-view-btn:focus-visible {
  outline: 2px solid var(--erste-navy, #0a2e5c);
  outline-offset: 2px;
}

/* ---------- View switching ----------
   When the result tab is in handprint mode, hide every footprint sibling
   and reveal the dedicated handprint panel. The toggle itself stays visible. */
#handprint-result {
  display: none;
}
#result-tab.show-handprint > :not(#result-view-toggle):not(#handprint-result) {
  display: none !important;
}
#result-tab.show-handprint > #handprint-result {
  display: block;
}

@media print {
  #result-view-toggle {
    display: none !important;
  }
}

/* ---------- Handprint result panel ---------- */
#handprint-result.hp-result {
  padding: 8px 16px 48px;
  background: #fff;
}
.hp-result .hp-content {
  max-width: 1000px;
  margin: 0 auto;
}
.hp-result h1 {
  color: var(--erste-navy, #0a2e5c);
  font-weight: 800;
}
.hp-result h2 {
  color: var(--erste-navy, #0a2e5c);
  font-weight: 700;
  margin-top: 28px;
}
.hp-result .hp-lead {
  color: var(--erste-muted, #5b6b7f);
  line-height: 1.5;
}

/* ---------- Interactive idea generator (Bereich / Umfeld picker) ---------- */
.hp-ideagen {
  margin-top: 26px;
}
.hp-ideagen-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 12px;
}
@media (max-width: 767px) {
  .hp-ideagen-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hp-ig-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hp-ig-head {
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  color: #5b6b7f;
  background: #eceff3;
  transition: background 0.2s ease, color 0.2s ease;
}
.hp-ig-card {
  min-height: 150px;
  border-radius: 10px;
  background: #eceff3;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.hp-ig-bulb {
  font-size: 2.6rem;
  color: rgba(0, 0, 0, 0.24);
}
.hp-ig-idea {
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.hp-ig-dots {
  display: flex;
  gap: 8px;
}
.hp-ig-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.15s ease, transform 0.15s ease;
}
.hp-ig-dot:hover {
  transform: scale(1.2);
}
.hp-ig-dot.is-active {
  background: #fff;
}

/* Category palettes — inactive (pastel head + card) */
.hp-ig-food .hp-ig-head,
.hp-ig-food .hp-ig-card {
  background: #d3e5da;
  color: #2b6a51;
}
.hp-ig-living .hp-ig-head,
.hp-ig-living .hp-ig-card {
  background: #cdd8e0;
  color: #2c5468;
}
.hp-ig-mobility .hp-ig-head,
.hp-ig-mobility .hp-ig-card {
  background: #dcc3d3;
  color: #7a2860;
}
.hp-ig-consumption .hp-ig-head,
.hp-ig-consumption .hp-ig-card {
  background: #ecdcc0;
  color: #9a6a1f;
}

/* Category palettes — active (strong head + card, white text) */
.hp-ig-food.is-active .hp-ig-head,
.hp-ig-food.is-active .hp-ig-card {
  background: #3e8e5f;
  color: #fff;
}
.hp-ig-living.is-active .hp-ig-head,
.hp-ig-living.is-active .hp-ig-card {
  background: #3a6f8a;
  color: #fff;
}
.hp-ig-mobility.is-active .hp-ig-head,
.hp-ig-mobility.is-active .hp-ig-card {
  background: #832464;
  color: #fff;
}
.hp-ig-consumption.is-active .hp-ig-head,
.hp-ig-consumption.is-active .hp-ig-card {
  background: #cf8a2c;
  color: #fff;
}

.hp-ig-head:focus-visible,
.hp-ig-card:focus-visible,
.hp-ig-dot:focus-visible {
  outline: 2px solid var(--erste-navy, #0a2e5c);
  outline-offset: 2px;
}

.hp-plan-card {
  background: var(--erste-green-light, #e8f5ec);
  border: 1px solid var(--erste-border, #d3e0f5);
  border-radius: 16px;
  padding: 20px 24px;
  margin-top: 16px;
}
.hp-plan-card #h_intro_title {
  margin-top: 0;
  color: var(--erste-green-dark, #2e7d45);
}
.hp-plan-card .hp-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}
#handprint-result[data-answer="food"] .hp-icon i {
  color: #2b7a5f;
}
#handprint-result[data-answer="living"] .hp-icon i {
  color: #286077;
}
#handprint-result[data-answer="mobility"] .hp-icon i {
  color: #832364;
}
#handprint-result[data-answer="consumption"] .hp-icon i {
  color: #f29d38;
}

/* Enriched action-plan meta grid */
.hp-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.hp-meta-item {
  background: #fff;
  border: 1px solid var(--erste-border, #d3e0f5);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hp-meta-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--erste-blue, #2870ed);
}
.hp-meta-value {
  color: var(--erste-ink, #16233a);
  line-height: 1.4;
}
.hp-meta-value a {
  color: var(--erste-blue-dark, #1152b5);
  font-weight: 600;
}

/* ---------- Action-plan accordion ---------- */
.hp-accordion {
  margin-top: 12px;
}
.hp-accordion > a.h3 {
  display: block;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 14px 18px;
  margin-top: 8px;
  border-radius: 10px;
  line-height: 1.3;
}
.hp-accordion > a.h3 .fa:first-child {
  margin-right: 10px;
}
.hp-accordion > a.h3 .fa-chevron-up {
  transition: transform 0.2s ease;
}
.hp-accordion > a.h3.collapsed .fa-chevron-up {
  transform: rotate(180deg);
}
.hp-accordion > div.collapse,
.hp-accordion > div.collapsing {
  background: #faf7fc;
  border: 1px solid var(--erste-border, #d3e0f5);
  border-top: none;
  border-radius: 0 0 10px 10px;
  margin-top: -6px;
}
.hp-accordion > div ul {
  margin: 0;
  padding: 12px 18px 12px 34px;
}
.hp-accordion > div ul li {
  margin-bottom: 8px;
  line-height: 1.45;
}
.hp-accordion > div ul li a {
  color: var(--erste-blue-dark, #1152b5);
}
