/* ============================================================
   GarpLabs-lagret — koppling till garplabs.store, kontakt
   och AI-kundtjänsten. Används på mallkatalogen.
   ============================================================ */

.gb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.gb-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.gb-btn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.gb-btn--primary:hover {
  background: #ff4a1c;
  border-color: #ff4a1c;
  color: #0b0b0c;
}

.gb-btn:focus-visible,
.gb-form input:focus-visible,
.gb-form select:focus-visible,
.gb-form textarea:focus-visible,
.gb-ai button:focus-visible,
.gb-ai input:focus-visible {
  outline: 2px solid #ff4a1c;
  outline-offset: 2px;
}

/* CTA-rad i masthead */
.gb-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2.2rem;
}

/* ingress på katalogen */
.masthead .lead {
  font-size: 1.06rem;
  line-height: 1.72;
  color: #3a3731;
  max-width: 100%;
}

.masthead .lead em {
  font-style: normal;
  background: linear-gradient(to top, rgba(255, 74, 28, 0.26) 34%, transparent 34%);
  padding: 0 0.06em;
}

.gb-steps {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.15rem;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 1.05rem;
}

.gb-steps li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
}

.gb-steps__n {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 0.9;
  color: #ff4a1c;
  letter-spacing: 0.02em;
}

.gb-steps b {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.12rem;
}

.masthead .gb-steps p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.58;
  color: #4a463f;
  max-width: 40ch;
}

/* ---------- kontaktsektionen ---------- */
.gb-contact {
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--ink);
  padding-top: clamp(1.6rem, 3vw, 2.4rem);
  scroll-margin-top: 2rem;
}

.gb-kicker {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.gb-contact h2 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 0.95;
  max-width: 24ch;
  margin: 0 0 0.9rem;
}

.gb-contact__intro p {
  max-width: 54ch;
  color: #4a463f;
  font-size: 0.96rem;
  line-height: 1.65;
}

.gb-contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
  align-items: start;
}

.gb-form {
  background: #fff;
  border: 1px solid var(--ink);
  padding: clamp(1.1rem, 2.4vw, 1.7rem);
  display: grid;
  gap: 0.95rem;
}

.gb-form label {
  display: grid;
  gap: 0.35rem;
  font-family: ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.gb-form input,
.gb-form select,
.gb-form textarea {
  font-family: var(--ff, inherit);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 0.5rem 0;
  border-radius: 0;
}

.gb-form textarea {
  resize: vertical;
  min-height: 84px;
}

.gb-form .gb-btn {
  justify-self: start;
  margin-top: 0.3rem;
}

.gb-form__note {
  font-family: ui-monospace, monospace;
  font-size: 0.58rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}

.gb-form__ok {
  margin: 0;
  padding: 0.8rem 0.9rem;
  background: #0b0b0c;
  color: #edeae4;
  font-size: 0.88rem;
  line-height: 1.5;
}

.gb-form.is-sent .gb-form__note {
  display: none;
}

.gb-direct {
  border: 1px solid var(--line);
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.gb-direct h3 {
  font-family: ui-monospace, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.2rem;
  font-weight: 500;
}

.gb-direct a {
  font-size: 1.02rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.gb-direct a:hover {
  border-color: #ff4a1c;
  color: #ff4a1c;
}

.gb-direct p {
  font-size: 0.85rem;
  color: #4a463f;
  line-height: 1.55;
  margin: 0.2rem 0 0;
}

/* ---------- företagsfoten ---------- */
.gb-footer {
  margin-top: clamp(3rem, 6vw, 5rem);
  background: #0b0b0c;
  color: #edeae4;
  padding: clamp(2.2rem, 4vw, 3.2rem) 0 1.4rem;
}

.gb-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(1.2rem, 3vw, 2.6rem);
}

.gb-footer__brand {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 0.6rem;
}

.gb-footer p {
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(237, 234, 228, 0.66);
  margin: 0;
}

.gb-footer h3 {
  font-family: ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(237, 234, 228, 0.5);
  margin: 0 0 0.7rem;
  font-weight: 500;
}

.gb-footer a {
  display: block;
  font-size: 0.88rem;
  color: #edeae4;
  text-decoration: none;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid transparent;
  width: fit-content;
}

.gb-footer a:hover {
  border-color: #ff4a1c;
  color: #ff4a1c;
}

.gb-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  padding-top: 1rem;
  border-top: 1px solid rgba(237, 234, 228, 0.16);
  font-family: ui-monospace, monospace;
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(237, 234, 228, 0.45);
}

.gb-footer__base a {
  display: inline;
  margin: 0;
  color: inherit;
}

.gb-footer__base a:hover {
  color: #ff4a1c;
}

/* ---------- AI-kundtjänsten ---------- */
.gb-ai {
  position: fixed;
  right: clamp(0.8rem, 2.4vw, 1.6rem);
  bottom: clamp(0.8rem, 2.4vw, 1.6rem);
  z-index: 60;
  display: grid;
  justify-items: end;
  gap: 0.6rem;
  font-family: var(--ff, inherit);
}

.gb-ai__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: #0b0b0c;
  color: #edeae4;
  font-family: ui-monospace, monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.6);
}

.gb-ai__btn:hover {
  background: #ff4a1c;
  color: #0b0b0c;
}

.gb-ai__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ecf8e;
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.25);
}

.gb-ai__panel {
  width: min(352px, calc(100vw - 1.6rem));
  background: #0b0b0c;
  color: #edeae4;
  border: 1px solid rgba(237, 234, 228, 0.18);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.65);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
  height: min(560px, calc(100vh - 3rem));
  max-height: min(78vh, 560px);
}

.gb-ai__panel[hidden] {
  display: none;
}

.gb-ai__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(237, 234, 228, 0.14);
}

.gb-ai__head b {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.gb-ai__head span {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.54rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(237, 234, 228, 0.5);
  margin-top: 0.15rem;
}

.gb-ai__head button {
  border: 1px solid rgba(237, 234, 228, 0.24);
  background: transparent;
  color: #edeae4;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.gb-ai__log {
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.55rem;
  overflow-y: auto;
  align-content: start;
  min-height: 0;
}

.gb-ai__msg {
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  margin: 0;
  max-width: 92%;
}

.gb-ai__msg--bot {
  background: rgba(237, 234, 228, 0.08);
  border-bottom-left-radius: 4px;
}

.gb-ai__msg--me {
  background: #ff4a1c;
  color: #0b0b0c;
  justify-self: end;
  border-bottom-right-radius: 4px;
}

.gb-ai__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 1rem 0.8rem;
}

.gb-ai__quick button {
  border: 1px solid rgba(237, 234, 228, 0.24);
  background: transparent;
  color: #edeae4;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.7rem;
  cursor: pointer;
}

.gb-ai__quick button:hover {
  border-color: #ff4a1c;
  color: #ff4a1c;
}

.gb-ai__form {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid rgba(237, 234, 228, 0.14);
}

.gb-ai__form input {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(237, 234, 228, 0.22);
  border-radius: 999px;
  color: #edeae4;
  padding: 0.55rem 0.9rem;
  font-size: 0.84rem;
  font-family: inherit;
}

.gb-ai__form input::placeholder {
  color: rgba(237, 234, 228, 0.4);
}

.gb-ai__form button {
  width: 38px;
  border-radius: 50%;
  border: 0;
  background: #ff4a1c;
  color: #0b0b0c;
  cursor: pointer;
  font-size: 1rem;
}

.gb-ai__note {
  margin: 0;
  padding: 0 1rem 0.85rem;
  font-family: ui-monospace, monospace;
  font-size: 0.52rem;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: rgba(237, 234, 228, 0.42);
}

/* ---------- responsivt ---------- */
@media (max-width: 900px) {
  .gb-contact__grid,
  .gb-footer__grid {
    grid-template-columns: 1fr;
  }

  .gb-steps {
    padding-left: 0;
    border-left: 0;
    margin-top: 1.6rem;
  }

  .gb-footer__grid {
    gap: 1.6rem;
  }
}

/* ---------- AI-kundtjänstens verktyg ---------- */
.gb-ai__panel {
  width: min(400px, calc(100vw - 1.6rem));
}

.gb-ai__quick[hidden],
.gb-ai__files[hidden] {
  display: none;
}

.gb-ai__form {
  align-items: center;
}

.gb-ai__form .gb-ai__tool {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(237, 234, 228, 0.22);
  background: transparent;
  color: rgba(237, 234, 228, 0.75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gb-ai__form .gb-ai__tool:hover {
  border-color: #ff4a1c;
  color: #ff4a1c;
}

.gb-ai__form .gb-ai__tool.is-active {
  background: #ff4a1c;
  border-color: #ff4a1c;
  color: #0b0b0c;
  animation: gb-pulse 1.5s ease-in-out infinite;
}

@keyframes gb-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 74, 28, 0.45);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(255, 74, 28, 0);
  }
}

.gb-ai__files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.35rem;
}

.gb-ai__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.25rem 0.3rem 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(237, 234, 228, 0.1);
  font-size: 0.68rem;
}

.gb-ai__chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}

.gb-ai__chip button {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: rgba(237, 234, 228, 0.18);
  color: #edeae4;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
}

.gb-ai__speak {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 0.3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(237, 234, 228, 0.5);
  cursor: pointer;
  vertical-align: -4px;
}

.gb-ai__speak:hover,
.gb-ai__speak.is-playing {
  color: #ff4a1c;
}

.gb-ai__msg.is-error {
  background: rgba(255, 74, 28, 0.16);
  color: #ffd9cd;
}

.gb-ai__msg.is-loading {
  font-style: italic;
  opacity: 0.65;
}

.gb-ai__send:disabled,
.gb-ai__form input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gb-ai__msg a {
  color: #ffb9a4;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.gb-ai__msg strong {
  color: #fff;
  font-weight: 600;
}
