/* Sky Facility — agent.css. Tilbudsagenten. Bygger på variablene i tokens.css. */

.sf-launcher {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: calc(clamp(0.75rem, 2vw, 1.5rem) + 4.1rem);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.05rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 18px 40px -20px rgba(13, 19, 18, 0.65);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.sf-launcher:hover { transform: translateY(-2px); background: var(--ink-2); }
.sf-launcher__prikk { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--gold-bright); flex: none; box-shadow: 0 0 0 3px rgba(226, 196, 126, 0.25); }
@media (min-width: 1000px) { .sf-launcher { bottom: clamp(0.75rem, 2vw, 1.5rem); } }

.sf-agent {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: calc(clamp(0.75rem, 2vw, 1.5rem) + 4.1rem);
  z-index: 90;
  width: min(410px, calc(100vw - 1.5rem));
  max-height: min(76vh, 660px);
  display: grid;
  grid-template-rows: auto auto 1fr auto auto auto auto;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 40px 90px -45px rgba(13, 19, 18, 0.6);
  overflow: hidden;
  animation: sf-inn 0.28s var(--ease);
}
@media (min-width: 1000px) { .sf-agent { bottom: calc(clamp(0.75rem, 2vw, 1.5rem) + 3.4rem); } }
/* Bevisst uten opacity: skulle animasjonen ikke loepe, staar panelet likevel synlig. */
@keyframes sf-inn { from { transform: translateY(12px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .sf-agent { animation: none; } .sf-launcher:hover { transform: none; } }

.sf-agent__topp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
}
.sf-agent__merke { display: flex; align-items: center; gap: 0.65rem; min-width: 0; flex: 1 1 auto; }
.sf-agent__skilt {
  width: 2rem; height: 2rem; flex: none;
  display: grid; place-items: center;
  background: var(--paper); color: var(--ink);
  border-radius: 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em;
}
.sf-agent__merke strong { display: block; font-size: 0.95rem; line-height: 1.25; }
.sf-agent__merke span { display: block; font-size: 0.72rem; color: rgba(246, 244, 239, 0.66); }
.sf-agent__lukk {
  flex: none; width: 2rem; height: 2rem;
  background: rgba(246, 244, 239, 0.1); color: var(--paper);
  border: 0; border-radius: 8px; font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.sf-agent__lukk:hover { background: rgba(246, 244, 239, 0.2); }

.sf-agent__ny {
  flex: none; width: 2rem; height: 2rem; margin-right: 0.35rem;
  background: rgba(246, 244, 239, 0.1); color: var(--paper);
  border: 0; border-radius: 8px; font-size: 1rem; line-height: 1; cursor: pointer;
}
.sf-agent__ny:hover { background: rgba(246, 244, 239, 0.2); }

.sf-agent__fram { height: 3px; background: var(--line); overflow: hidden; }
.sf-agent__fram span {
  display: block; height: 100%; width: 0;
  background: var(--gold);
  transition: width 0.35s var(--ease);
}

.sf-agent__logg {
  padding: 0.9rem 0.9rem 0.35rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.sf-melding { display: flex; margin-bottom: 0.6rem; }
.sf-melding--bruker { justify-content: flex-end; }
.sf-boble {
  max-width: 88%;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  background: var(--white);
  border: 1px solid var(--line);
}
.sf-melding--bruker .sf-boble { background: var(--ink); color: var(--paper); border-color: transparent; }
.sf-boble p { margin: 0 0 0.5rem; }
.sf-boble p:last-child { margin-bottom: 0; }
.sf-boble ul { margin: 0.25rem 0 0.5rem; padding-left: 1.05rem; }
.sf-boble li { margin-bottom: 0.15rem; }
.sf-boble ul:last-child { margin-bottom: 0; }
.sf-boble strong { font-weight: 600; }

.sf-kicker {
  margin: 0 0 0.3rem !important;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted-2);
}
.sf-boble ol.sf-liste { margin: 0.25rem 0 0.6rem; padding-left: 1.3rem; }
.sf-boble ol.sf-liste li { margin-bottom: 0.2rem; }
.sf-boble ol.sf-liste li::marker { color: var(--muted-2); font-variant-numeric: tabular-nums; }

.sf-agent__skriver {
  padding: 0 0.9rem 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.sf-agent__skriver span {
  display: inline-block; width: 0.3rem; height: 0.3rem; margin-right: 0.14rem;
  border-radius: 50%; background: var(--gold-line); animation: sf-prikk 1.1s infinite;
}
.sf-agent__skriver span:nth-child(2) { animation-delay: 0.15s; }
.sf-agent__skriver span:nth-child(3) { animation-delay: 0.3s; }
@keyframes sf-prikk { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.sf-agent__valg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem 0.5rem;
  max-height: 8.6rem;
  overflow-y: auto;
}
.sf-valg {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
}
.sf-valg:hover { background: var(--gold-soft); border-color: var(--gold-line); }
.sf-valg--prim { background: var(--gold); border-color: var(--gold); color: var(--paper); font-weight: 600; }
.sf-valg--prim:hover { background: #6d4c10; border-color: #6d4c10; }

.sf-agent__skjema {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem 0.35rem;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.sf-agent__skjema input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
}
.sf-agent__send {
  flex: none;
  padding: 0.6rem 0.95rem;
  border: 0;
  border-radius: 9px;
  background: var(--gold);
  color: var(--paper);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.sf-agent__send:hover { background: #6d4c10; }

.sf-agent__fot {
  margin: 0;
  padding: 0.45rem 0.9rem 0.7rem;
  background: var(--paper-2);
  font-size: 0.72rem;
  color: var(--muted);
}

@media (max-width: 560px) {
  .sf-agent {
    right: 0; left: 0; bottom: 0;
    width: 100%;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
  }
  .sf-boble { max-width: 94%; }
}

html.sf-agent-apen .sticky-cta { transform: translateY(110%); }

/* Inngangene til agenten fra siden */
.service-card__ask {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.service-card__ask:hover { border-bottom-color: var(--gold-line); }
.service-card__ask span { transition: transform 0.2s var(--ease); }
.service-card__ask:hover span { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .service-card__ask:hover span { transform: none; } }

.summary-note--agent { margin-top: 0.75rem; }
.link-agent {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-bright);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  cursor: pointer;
}
.link-agent:hover { color: var(--paper); }
