/* Fosure Hjælp-widget — isoleret fra styles.css */

.fosure-help-root {
  --fosure-help-primary: var(--primary, oklch(0.46 0.13 258));
  --fosure-help-primary-dark: var(--primary-dark, oklch(0.34 0.11 260));
  --fosure-help-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.fosure-help-launcher {
  display: flex;
  align-items: stretch;
  border: none;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  background: transparent;
  box-shadow: var(--fosure-help-shadow);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fosure-help-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.fosure-help-launcher:focus-visible {
  outline: 2px solid var(--fosure-help-primary);
  outline-offset: 3px;
}

.fosure-help-launcher__main {
  display: flex;
  align-items: center;
  flex: 3;
  padding: 12px 16px 12px 20px;
  background: #fff;
  color: var(--fosure-help-primary-dark);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.fosure-help-launcher__accent {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 44px;
  background: var(--fosure-help-primary);
  position: relative;
  flex-shrink: 0;
}

.fosure-help-launcher__accent::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 0;
  bottom: 0;
  width: 20px;
  background: var(--fosure-help-primary);
  transform: skewX(-18deg);
}

.fosure-help-launcher__bubble {
  position: relative;
  z-index: 1;
  display: block;
}

.fosure-help-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(380px, calc(100vw - 32px));
  max-height: min(70vh, 640px);
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--fosure-help-shadow);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fosure-help-panel[hidden] {
  display: none !important;
}

.fosure-help-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.fosure-help-panel__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.fosure-help-panel__close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 4px 8px;
  border-radius: 8px;
}

.fosure-help-panel__close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.fosure-help-panel__body {
  overflow-y: auto;
  padding: 12px 16px 16px;
  -webkit-overflow-scrolling: touch;
}

.fosure-help-section-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.fosure-help-faq {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.fosure-help-faq-more {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--fosure-help-primary-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

.fosure-help-faq-more:hover {
  border-color: var(--fosure-help-primary);
  background: var(--primary-soft, #eef2ff);
}

.fosure-help-faq__item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
}

.fosure-help-faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border: none;
  background: #f8fafc;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
}

.fosure-help-faq__question:hover {
  background: #f1f5f9;
}

.fosure-help-faq__chevron {
  flex-shrink: 0;
  transition: transform 0.15s ease;
  color: var(--fosure-help-primary);
}

.fosure-help-faq__item.is-open .fosure-help-faq__chevron {
  transform: rotate(180deg);
}

.fosure-help-faq__answer {
  padding: 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #475569;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, padding 0.2s ease;
}

.fosure-help-faq__item.is-open .fosure-help-faq__answer {
  padding: 0 14px 12px;
  max-height: 400px;
}

.fosure-help-faq__answer a {
  color: var(--fosure-help-primary);
}

.fosure-help-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 4px 0 16px;
}

.fosure-help-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.fosure-help-topic {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.fosure-help-topic:hover,
.fosure-help-topic.is-selected {
  border-color: var(--fosure-help-primary);
  background: var(--primary-soft, #eef2ff);
  color: var(--fosure-help-primary-dark);
}

.fosure-help-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
}

.fosure-help-hint[hidden] {
  display: none !important;
}

.fosure-help-field {
  margin-bottom: 12px;
}

.fosure-help-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.fosure-help-field input,
.fosure-help-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
}

.fosure-help-field textarea {
  min-height: 88px;
  resize: vertical;
}

.fosure-help-field input:focus,
.fosure-help-field textarea:focus {
  outline: 2px solid var(--fosure-help-primary);
  outline-offset: 1px;
  border-color: var(--fosure-help-primary);
}

.fosure-help-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.fosure-help-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.fosure-help-btn {
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.fosure-help-btn--secondary {
  background: #f1f5f9;
  color: #0f172a;
}

.fosure-help-btn--secondary:hover {
  background: #e2e8f0;
}

.fosure-help-btn--primary {
  background: var(--fosure-help-primary);
  color: #fff;
}

.fosure-help-btn--primary:hover:not(:disabled) {
  background: var(--fosure-help-primary-dark);
}

.fosure-help-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.fosure-help-footnote {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
  text-align: center;
}

.fosure-help-success {
  text-align: center;
  padding: 24px 8px;
}

.fosure-help-success__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.fosure-help-success__ref {
  margin: 0 0 12px;
  font-size: 14px;
  color: #475569;
}

.fosure-help-success__ref code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  color: var(--fosure-help-primary-dark);
}

.fosure-help-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 13px;
  color: #991b1b;
}

.fosure-help-error[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .fosure-help-root {
    right: 16px;
    bottom: 16px;
  }

  .fosure-help-panel {
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fosure-help-launcher,
  .fosure-help-faq__chevron,
  .fosure-help-faq__answer {
    transition: none;
  }
}
