<template>
  <div class="help">
    <div class="help-text-content" v-html="text"></div>
  </div>
</template>

<script>
import {mapStores} from "pinia";
import {useHelpStore} from "@/store/help.js";

export default {
  name: "HelpText",
  computed: {
    ...mapStores(useHelpStore),
    text() {
      return this.helpStore.text;
    },
  }
}
</script>

<style scoped>
.help {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.help-text-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 1rem;
}


/* Text content styling */
.help-text-content :deep(blockquote) {
  margin: 0 0 2rem 0;
  padding: 1.6rem;
  background: #c3cfdf;
  color: #002F54;
  font-size: 1.4rem;
  font-weight: 500;
  border-radius: 0.4rem;
}

.help-text-content :deep(blockquote p) {
  margin: 0;
  line-height: 1.6;
  color: #002F54;
  font-size: 1.4rem;
  font-weight: 400;
}

.help-text-content :deep(h3) {
  margin: 3rem 0 1.6rem 0;
  font-size: 1.4rem;
  font-weight: 500;
  color: #6B869C;
}

.help-text-content :deep(h3:first-child) {
  margin-top: 0;
}

.help-text-content :deep(p) {
  margin: 0 0 1.6rem 0;
  line-height: 1.6;
  font-size: 1.4rem;
  font-weight: 400;
  color: #6b7280;
}

.help-text-content :deep(strong) {
  font-weight: 600;
  color: #6b7280;
}

.help-text-content :deep(img) {
  max-width: 100%;
  height: auto;
  margin: 1.6rem 0;
  border-radius: 0.8rem;
  box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.1);
}

.help-text-content :deep(ul) {
  margin: 0 0 1.6rem 0;
  padding-left: 2rem;
  list-style-type: disc;
}

.help-text-content :deep(li) {
  margin: 0.8rem 0;
  line-height: 1.6;
  font-size: 1.4rem;
  font-weight: 400;
  color: #6b7280;
}

.help-text-content :deep(li::marker) {
  color: #c3cfdf;
}
</style>