/* ==============================================================
   EccoPrint Shared CSS for CMS Pages
   Source of truth: view/frontend/web/css/eccoprint-v5.1Clean.css
   Spec: docs/superpowers/specs/2026-04-22-cms-pages-design-streamline-design.md
   ============================================================== */

:root {
  /* === Primær identitet === */
  --ecco-primary: #343a4c;
  --ecco-primary-light: #45516e;

  /* === Accent (brun) === */
  --ecco-accent: #ad825e;
  --ecco-accent-hover: #9a7352;
  --ecco-accent-dark: #876444;

  /* === Neutrals === */
  --ecco-white: #ffffff;
  --ecco-light-bg: #f8f9fa;
  --ecco-border: #e9ecef;
  --ecco-border-dark: #ced4da;
  --ecco-text: #495057;
  --ecco-text-light: #6c757d;
  --ecco-text-dark: #212529;

  /* === Form === */
  --ecco-radius: 8px;
  --ecco-radius-sm: 6px;
  --ecco-radius-pill: 50px;
  --ecco-shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
  --ecco-shadow: 0 4px 12px rgba(0,0,0,0.08);
  --ecco-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --ecco-transition: 0.2s ease;

  /* === Tip-farver === */
  --ecco-tip-yellow-bg: #fff8e6;
  --ecco-tip-blue-bg: #e8f4f8;
  --ecco-tip-green-bg: #d4edda;

  /* === Legacy aliases (bagudkompatibilitet under migrering) === */
  --primary-color: var(--ecco-primary);
  --secondary-color: var(--ecco-primary-light);
  --accent-color: var(--ecco-accent);
  --background-color: var(--ecco-light-bg);
  --text-color: var(--ecco-text-dark);
  --light-gray: var(--ecco-border);
}

/* ==============================================================
   Main page wrapper & hero
   ============================================================== */

main.material-page {
  width: auto;
  max-width: 960px;
  margin: 20px auto;
  padding: 30px;
  background-color: var(--ecco-white);
  box-shadow: var(--ecco-shadow);
  border-radius: 10px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ecco-text-dark);
}

.material-header {
  text-align: center;
  background-color: var(--ecco-light-bg);
  padding: 40px 20px;
  margin-bottom: 20px;
  box-shadow: var(--ecco-shadow-sm);
}

.material-header h1 {
  font-size: 3.6rem;
  color: var(--ecco-primary);
  line-height: 1.3;
}

.material-header h2 {
  margin-bottom: 1em !important;
}

.material-header p {
  font-size: 16px;
  color: var(--ecco-text-dark);
  padding: 0px 40px;
}

.header-image {
  text-align: center;
  margin: 20px 0;
}

.header-image img {
  max-height: 360px;
  height: auto;
  width: auto;
}

/* ==============================================================
   Typography / headings (scoped til .material-page)
   ============================================================== */

.material-page h1, .material-page h2, .material-page h3, .material-page h4, .material-page h5 {
  margin-top: 0.5em;
  margin-bottom: 1em;
}

.material-page h1 {
  color: var(--ecco-primary);
  text-align: center;
  border-bottom: 3px solid var(--ecco-accent);
  padding-bottom: 0.5em;
  font-size: 2.8em;
}

.material-page h2 {
  color: var(--ecco-primary-light);
  font-size: 1.8em;
  margin-top: 0;
  margin-bottom: 0.8em;
  font-weight: 600;
}

.material-page h3 {
  color: var(--ecco-primary);
  font-size: 1.8em;
  font-weight: 600;
  border-bottom: 2px solid var(--ecco-primary-light);
  padding-bottom: 0.3em;
}

.material-page h4 {
  color: var(--ecco-primary-light);
  font-size: 1.4em;
  font-weight: 500;
  border-left: 3px solid var(--ecco-accent);
  padding-left: 0.5em;
}

.material-page h5 {
  color: var(--ecco-text-dark);
  font-size: 1.2em;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  margin-bottom: 20px;
}

.material-page p {
  margin-bottom: 1em;
}

/* ==============================================================
   Cards / sections
   ============================================================== */

.material-section {
  background-color: var(--ecco-white);
  border-radius: 10px;
  box-shadow: var(--ecco-shadow-sm);
  margin-bottom: 30px;
  padding: 25px;
  transition: transform 0.3s ease;
}

.material-section:hover {
  transform: translateY(-5px);
}

/* ==============================================================
   Table of Contents (TOC)
   ============================================================== */

.toc {
  background-color: var(--ecco-white);
  border: 1px solid var(--ecco-border);
  border-radius: 10px;
  box-shadow: var(--ecco-shadow);
  margin-bottom: 40px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.toc.sticky-toc {
  box-shadow: var(--ecco-shadow-sm);
}

.toc-title {
  background-color: var(--ecco-primary);
  color: var(--ecco-white);
  padding: 15px 20px;
  font-size: 1.2em;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

.toc-title:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toc-title::after {
  content: "\25BC";
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.toc-title.active::after {
  transform: rotate(180deg);
}

.toc-content {
  display: none;
  padding: 20px;
  border-radius: 0 0 8px 8px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

.toc-content.active {
  display: block;
}

.toc-content ul {
  list-style-type: none;
  padding: 0;
}

.toc-content li {
  margin-bottom: 8px;
}

.toc-content a {
  color: var(--ecco-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.toc-content a:hover {
  color: var(--ecco-accent);
}

/* ==============================================================
   Tip-bokse
   Konvention: .tip = gul (advarsel/anbefaling)
               .note / .typisk-anvendelse = blå (info)
   ============================================================== */

.tip, .note, .typisk-anvendelse {
  padding: 15px;
  margin: 20px 0;
  border-radius: var(--ecco-radius-sm);
  box-shadow: var(--ecco-shadow-sm);
  border-left: 4px solid var(--ecco-accent);
}

.tip {
  background-color: var(--ecco-tip-yellow-bg);
}

.note, .typisk-anvendelse {
  background-color: var(--ecco-tip-blue-bg);
}

.tip strong, .note strong, .typisk-anvendelse strong {
  font-weight: bold;
}

/*
 * VIGTIGT: Magento bruger SELV klassen .note til hjaelpetekst i formularer
 * (<div class="field note"> paa login, opret konto og glemt adgangskode).
 * Denne fil indlaeses paa ALLE sider via Magento_Cms/layout/default.xml - handlen hedder
 * "default", ikke "cms_page_view" - saa tip-boksen ovenfor lagde en blaa flade med brun kantstreg
 * paa de formularer (set af Ash 11-09-2026).
 *
 * Nulstillingen er scopet til .form/.fieldset, saa CMS-sidernes tip-bokse er uroerte: CMS-indhold
 * ligger aldrig inde i en formular. Typografien for formular-noterne saettes i
 * source/_account-forms.less.
 */
.form .note,
.fieldset .note {
  padding: 0;
  margin: 3px 0 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
}

/* ==============================================================
   CTA buttons
   ============================================================== */

.cta-button, .label-order-cta {
  display: inline-block;
  padding: 15px 30px;
  background-color: var(--ecco-accent);
  color: var(--ecco-white);
  text-decoration: none;
  border-radius: var(--ecco-radius-pill);
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  text-align: center;
  margin: 20px auto;
}

.cta-button:hover, .label-order-cta:hover {
  background-color: var(--ecco-accent-hover);
  transform: scale(1.05);
}

/* ==============================================================
   Utilities
   ============================================================== */

.ecco-muted {
  color: var(--ecco-text-light);
}

.ecco-accent-text {
  color: var(--ecco-accent);
}

/* ==============================================================
   Responsive (<768px)
   ============================================================== */

@media (max-width: 768px) {
  main.material-page {
    padding: 20px 10px;
  }

  .material-section {
    padding: 20px;
  }

  main.material-page h1 {
    font-size: 2em;
  }

  main.material-page h2 {
    font-size: 1.5em;
  }

  main.material-page h3 {
    font-size: 1.3em;
  }

  main.material-page h4 {
    font-size: 1.2em;
  }

  main.material-page h5 {
    font-size: 1em;
  }
}
