/* Ask the Building & Neighborhood — Shared UI Styles (DE / CZ / UK / US / PL / BY / LT)
   Design system: CleanWhale Budynki / Gebaeude canon (futura-pt, #2457c6 brand blue,
   high-contrast #ffffff !important primary buttons, accessible focus & touch targets). */

.bw .ab-section {
  margin: clamp(24px, 3vw, 40px) 0;
}

.bw .ab-card {
  position: relative;
  background: linear-gradient(145deg, #f5f8ff 0%, #ffffff 62%);
  border: 1px solid #d5e2fb;
  border-radius: var(--cw99-r-lg, 16px);
  padding: clamp(18px, 2.4vw, 28px);
  box-shadow: 0 8px 28px rgba(36, 87, 198, 0.06);
}

.bw .ab-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.bw .ab-head-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.bw .ab-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #2457c6;
  color: #ffffff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(36, 87, 198, 0.22);
}

.bw .ab-icon-badge svg {
  width: 22px;
  height: 22px;
}

.bw .ab-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2457c6;
  margin: 0 0 4px;
}

.bw .ab-title {
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 700;
  line-height: 1.2;
  color: #0b1324;
  margin: 0;
}

.bw .ab-sub {
  font-size: 15px;
  line-height: 1.45;
  color: #4a5568;
  margin: 4px 0 0;
}

.bw .ab-grounded-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #eef3ff;
  border: 1px solid #d0defa;
  color: #1c47a6;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.bw .ab-grounded-pill svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.bw .ab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.bw .ab-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-block-size: 38px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #cad9f6;
  background: #ffffff;
  color: #163a8c;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
}

.bw .ab-chip:hover {
  background: #eef3ff;
  border-color: #2457c6;
  color: #0f2d73;
}

.bw .ab-chip[aria-pressed="true"] {
  background: #e3ecff;
  border-color: #2457c6;
  color: #0d2766;
  font-weight: 700;
}

.bw .ab-chip:focus-visible {
  outline: 2px solid #2457c6;
  outline-offset: 2px;
}

.bw .ab-chip svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.78;
}

.bw .ab-form {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 0;
}

.bw .ab-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.bw .ab-input-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #5b6472;
  pointer-events: none;
}

.bw .ab-input {
  width: 100%;
  min-block-size: 48px;
  padding: 10px 14px 10px 42px;
  border: 1.5px solid #c3d3f2;
  border-radius: 12px;
  background: #ffffff;
  color: #0b1324;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.35;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bw .ab-input::placeholder {
  color: #687385;
}

.bw .ab-input:focus {
  outline: none;
  border-color: #2457c6;
  box-shadow: 0 0 0 3px rgba(36, 87, 198, 0.16);
}

.bw .ab-input:focus-visible {
  outline: 2px solid #2457c6;
  outline-offset: 1px;
}

.bw .ab-submit {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-block-size: 48px;
  padding: 0 22px;
  border: none;
  border-radius: 12px;
  background: #2457c6 !important;
  color: #ffffff !important;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.bw .ab-submit:hover {
  background: #1c47a6 !important;
  color: #ffffff !important;
  text-decoration: none;
}

.bw .ab-submit:focus-visible {
  outline: 3px solid #0b1324;
  outline-offset: 2px;
}

.bw .ab-submit[aria-busy="true"],
.bw .ab-submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

.bw .ab-submit svg {
  width: 17px;
  height: 17px;
  stroke: #ffffff !important;
  flex-shrink: 0;
}

/* Loading Skeleton Shimmer */
.bw .ab-skeleton {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #dfe7f7;
}

.bw .ab-skeleton[hidden] {
  display: none !important;
}

.bw .ab-skel-line {
  height: 13px;
  border-radius: 6px;
  background: linear-gradient(90deg, #edf2fc 20%, #dce6fb 50%, #edf2fc 80%);
  background-size: 200% 100%;
  animation: ab-shimmer 1.25s ease-in-out infinite;
  margin-bottom: 10px;
}

.bw .ab-skel-line:nth-child(2) { width: 88%; }
.bw .ab-skel-line:nth-child(3) { width: 64%; margin-bottom: 0; }

@keyframes ab-shimmer {
  0% { background-position: 180% 0; }
  100% { background-position: -20% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bw .ab-skel-line {
    animation: none;
    background: #e5edfc;
  }
}

/* Grounded Answer Thread */
.bw .ab-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.bw .ab-results:empty {
  display: none;
}

.bw .ab-turn {
  background: #ffffff;
  border: 1px solid #d8e3f8;
  border-radius: 13px;
  padding: 16px 18px;
}

.bw .ab-turn--error {
  border-color: #f3c2c2;
  background: #fffafa;
}

.bw .ab-turn-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #1c47a6;
  margin: 0 0 8px;
}

.bw .ab-turn-meta {
  font-size: 12px;
  font-weight: 500;
  color: #5b6472;
  white-space: nowrap;
}

.bw .ab-answer {
  font-size: 16px;
  line-height: 1.52;
  color: #111827;
}

.bw .ab-answer p + p {
  margin-top: 8px;
}

.bw .ab-answer ul {
  list-style: disc;
  padding-inline-start: 20px;
  margin-top: 6px;
}

.bw .ab-answer li + li {
  margin-top: 4px;
}

.bw .ab-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid #edf1f9;
}

.bw .ab-fact {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  background: #f4f7fe;
  border: 1px solid #e1e9fb;
  font-size: 13.5px;
  line-height: 1.3;
}

.bw .ab-fact dt {
  color: #4b5563;
  font-weight: 500;
}

.bw .ab-fact dd {
  color: #0b1324;
  font-weight: 700;
  margin: 0;
}

.bw .ab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.bw .ab-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.bw .ab-action--primary {
  background: #2457c6 !important;
  color: #ffffff !important;
  border: 1px solid #2457c6;
}

.bw .ab-action--primary:hover {
  background: #1c47a6 !important;
  color: #ffffff !important;
}

.bw .ab-action--secondary {
  background: #eef3ff;
  color: #163a8c !important;
  border: 1px solid #cad9f6;
}

.bw .ab-action--secondary:hover {
  background: #dfe9ff;
  border-color: #2457c6;
}

.bw .ab-foot-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: #5b6472;
}

@media (pointer: coarse) {
  .bw .ab-chip {
    min-block-size: 44px;
    padding: 9px 15px;
  }
  .bw .ab-action {
    min-block-size: 44px;
  }
}

@media (max-width: 680px) {
  .bw .ab-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .bw .ab-form {
    flex-direction: column;
  }
  .bw .ab-submit {
    width: 100%;
  }
}
