/* ================================================================
   Contentmodules - Modular page components
   Uses design tokens from egrannar.css and per-BRF theme.css
   ================================================================ */

/* ----------------------------------------------------------------
   1. Shared module styles
   ---------------------------------------------------------------- */
.eg-module {
  padding: 56px 24px;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.eg-module + .eg-module {
  padding-top: 24px;
}

.eg-module:has(+ .eg-module) {
  padding-bottom: 24px;
}

.eg-modules-wrap {
  position: relative;
}

.eg-modules-edit {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  opacity: 0.85;
  box-shadow: var(--shadow-md);
}

.eg-modules-edit:hover {
  opacity: 1;
}

.eg-module-heading {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.eg-module-subheading {
  font-size: 16px;
  color: var(--text2);
  margin-bottom: 24px;
  line-height: 1.6;
}

.eg-module-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.eg-module-buttons .btn {
  border-radius: 50px;
  padding: 10px 28px;
  font-weight: 600;
  font-size: 15px;
}

/* ----------------------------------------------------------------
   2. Hero
   ---------------------------------------------------------------- */
.eg-hero {
  position: relative;
  padding: 0;
  max-width: none;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.eg-hero--overlay {
  min-height: 480px;
}

.eg-hero--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}

.eg-hero--fullwidth {
  background-color: var(--brand-primary);
  min-height: 320px;
}

.eg-hero--minimal {
  min-height: auto;
  padding: 64px 24px;
  text-align: center;
  background: var(--bg);
}

/* Hero image */
.eg-hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.eg-hero--split .eg-hero-image {
  position: relative;
  inset: auto;
}

.eg-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero image cycling (crossfade slideshow) */
.eg-hero-image--cycle .eg-hero-cycle-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: heroImageCycle var(--hero-cycle-duration) infinite;
}

/* Keyframes generated inline per module (percentage depends on image count) */

/* Hero overlay variants */
.eg-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.eg-hero-overlay--gradient-left {
  background: linear-gradient(to right, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.3) 40%, transparent 70%);
}

.eg-hero-overlay--gradient-bottom {
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

.eg-hero-overlay--scrim {
  background: rgba(0,0,0,0.4);
}

.eg-hero-overlay--none {
  display: none;
}

.eg-hero-overlay--frost {
  background: none;
}

/* Hero content */
.eg-hero-content {
  position: relative;
  z-index: 2;
  padding: 48px 48px;
  max-width: 680px;
}

/* Frosted glass panel behind content */
.eg-hero--frost .eg-hero-content {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.2);
  margin: 32px;
  max-width: 520px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.eg-hero--overlay .eg-hero-content,
.eg-hero--fullwidth .eg-hero-content {
  color: #ffffff;
}

.eg-hero--overlay .eg-hero-content h1,
.eg-hero--overlay .eg-hero-content p,
.eg-hero--fullwidth .eg-hero-content h1,
.eg-hero--fullwidth .eg-hero-content p {
  color: inherit;
}

.eg-hero--split .eg-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
}

.eg-hero--minimal .eg-hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.eg-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.eg-hero--minimal .eg-hero-badge {
  background: var(--brf-primary-light, var(--g100));
  border-color: transparent;
  color: var(--brand-primary);
}

.eg-hero--split .eg-hero-badge {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: inherit;
}

.eg-hero-title {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
  color: inherit;
}

.eg-hero--minimal .eg-hero-title {
  text-shadow: none;
  color: var(--text);
}

.eg-hero--split .eg-hero-title {
  text-shadow: none;
  color: inherit;
}

.eg-hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 24px;
  opacity: 0.9;
  color: inherit;
}

.eg-hero--minimal .eg-hero-subtitle {
  color: var(--text2);
  opacity: 1;
}

.eg-hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.eg-hero-cta {
  border-radius: 50px !important;
  padding: 12px 32px !important;
  font-weight: 600;
  font-size: 16px;
  text-shadow: none;
  color: var(--hero-bg, #000000) !important;
  background: var(--hero-text, #ffffff) !important;
  border: none !important;
  transition: opacity 0.2s, transform 0.15s;
}

.eg-hero-cta:hover {
  color: var(--hero-bg, #000000) !important;
  background: var(--hero-text, #ffffff) !important;
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ----------------------------------------------------------------
   3. About
   ---------------------------------------------------------------- */
.eg-about {
  /* Padding inherited from .eg-module / .eg-module + .eg-module */
}

.eg-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
}

.eg-about-grid--image-left {
  direction: rtl;
}

.eg-about-grid--image-left > * {
  direction: ltr;
}

.eg-about-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text2);
  margin-bottom: 24px;
}

.eg-about-body p {
  margin-bottom: 12px;
}

.eg-about-facts {
  display: grid;
  /* auto-fit reflows cards when value text (e.g. city name) cannot fit at min width */
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 24px;
}

.eg-about-fact {
  /* container query lets the value font-size scale with the card's actual width,
     not the viewport - works regardless of 1/2/3 columns or sidebar context */
  container-type: inline-size;
  text-align: center;
  background: var(--surface2, rgba(0,0,0,0.03));
  border-radius: var(--r, 12px);
  padding: 20px 16px;
  min-width: 0;
}

.eg-about-fact-value {
  font-size: clamp(20px, 14cqi, 32px);
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.2;
  /* safety net for very long single words (e.g. "Hammarby Sjöstad") -
     allow breaking anywhere rather than overflowing the card */
  overflow-wrap: anywhere;
  hyphens: auto;
}

.eg-about-fact-label {
  font-size: 13px;
  color: var(--text3);
  font-weight: 500;
  margin-top: 4px;
}

.eg-about-media {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eg-about-image {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
}

.eg-about-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r);
}

.eg-about-quote {
  position: absolute;
  bottom: 16px;
  left: 16px;
  max-width: 70%;
  /* Frosted glass: 0.45 ger bra effekt mot ljusa bilder.
     Mot mycket mörka bilder kan kontrasten bli svag - höj till 0.55-0.6 vid behov. */
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--r-sm);
  padding: 14px 18px;
  margin: 0;
  border-left: 3px solid var(--brand-primary);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.eg-about-quote p {
  font-size: 14px;
  font-style: italic;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.5;
}

.eg-about-quote cite {
  font-size: 12px;
  color: var(--text2, #4b5563);
  font-style: normal;
  font-weight: 600;
}

/* Standalone quote (no image) - large, centered, no background box.
   Font size set via data-length attribute on the element:
   short (<50 chars) = 32px, medium (50-120) = 24px, long (>120) = 18px */
.eg-about-quote-standalone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  padding: 0 16px;
  margin: 0;
  border: none;
}

.eg-about-quote-standalone .eg-quote-inner {
  border-left: 2px solid var(--brand-primary);
  padding-left: 24px;
}

.eg-about-quote-standalone p {
  font-size: 32px;
  font-style: italic;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.4;
  font-weight: 500;
}

.eg-about-quote-standalone[data-length="medium"] p {
  font-size: 24px;
  line-height: 1.5;
}

.eg-about-quote-standalone[data-length="long"] p {
  font-size: 18px;
  line-height: 1.6;
}

.eg-about-quote-standalone cite {
  font-size: 14px;
  color: var(--text3, #9ca3af);
  font-style: normal;
  font-weight: 600;
}

/* ----------------------------------------------------------------
   4. Quickactions
   ---------------------------------------------------------------- */
.eg-quickactions {
  padding-top: 56px;
  padding-bottom: 56px;
}

.eg-quickactions-grid {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

/* Desktop: always one row, equal columns based on card count */
.eg-quickactions-grid--cols-1 { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
.eg-quickactions-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.eg-quickactions-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.eg-quickactions-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.eg-quickactions-grid--cols-5 { grid-template-columns: repeat(5, 1fr); }

.eg-quickactions-grid--bento .eg-quickaction-card--featured {
  grid-column: span 2;
}

.eg-quickaction-card {
  background: var(--white);
  border-radius: var(--r);
  padding: 28px 24px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  display: block;
}

.eg-quickaction-card:hover {
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.eg-quickaction-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brf-primary-light, var(--g100));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.eg-quickaction-icon i {
  font-size: 22px;
  color: var(--brand-primary);
}

.eg-quickaction-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.eg-quickaction-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 12px;
}

.eg-quickaction-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--brand-primary);
  transition: background 0.2s;
}

.eg-quickaction-link:hover {
  background: var(--brf-primary-light, var(--g100));
  color: var(--brand-primary);
}

/* ----------------------------------------------------------------
   5. Map
   ---------------------------------------------------------------- */
.eg-map {
  padding-top: 56px;
  padding-bottom: 56px;
}

/* Side-by-side layouts (left/right) */
.eg-map-grid--right {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--white);
}

.eg-map-grid--left {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--white);
}

/* Full-width map (no side panel, or above/below) */
.eg-map-grid--full {
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.eg-map-canvas {
  min-height: 360px;
  background: var(--bg);
  filter: grayscale(0.3);
  transition: filter 0.3s;
}

.eg-map-grid--full .eg-map-canvas {
  min-height: 420px;
}

.eg-map-canvas:hover {
  filter: grayscale(0);
}

.eg-map-info {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--white);
}

/* Stacked info (above/below) - horizontal layout */
.eg-map-info--stacked {
  padding: 24px 0;
}

.eg-map-info--stacked .eg-module-heading {
  font-size: 22px;
  margin-bottom: 4px;
}

.eg-map-info--stacked .eg-module-subheading {
  margin-bottom: 16px;
}

.eg-map-detail--inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 24px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text2);
}

.eg-map-detail--inline i {
  font-size: 18px;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.eg-map-info .eg-module-heading {
  font-size: 22px;
  margin-bottom: 6px;
}

.eg-map-info .eg-module-subheading {
  margin-bottom: 20px;
}

.eg-map-detail {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.eg-map-detail i {
  font-size: 20px;
  color: var(--brand-primary);
  margin-top: 2px;
  flex-shrink: 0;
}

.eg-map-detail strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.eg-map-detail div {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.5;
}

/* ----------------------------------------------------------------
   6. Gallery
   ---------------------------------------------------------------- */
.eg-gallery {
  padding-top: 56px;
  padding-bottom: 56px;
}

.eg-gallery-grid {
  margin-top: 24px;
}

.eg-gallery-grid--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.eg-gallery-grid--large {
  display: block;
  grid-template-columns: none;
  columns: 2;
  column-gap: 20px;
}

.eg-gallery-grid--large .eg-gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
}

.eg-gallery-grid--large .eg-gallery-item a {
  position: relative;
}

.eg-gallery-grid--masonry {
  display: block;
  grid-template-columns: none;
  columns: 3;
  column-gap: 16px;
}

.eg-gallery-grid--masonry .eg-gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
}

.eg-gallery-item {
  position: relative;
  min-width: 0;
}

.eg-gallery-item a {
  display: block;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.eg-gallery-item--rounded a {
  border-radius: var(--r-sm);
}

.eg-gallery-grid--grid .eg-gallery-item a {
  aspect-ratio: 4/3;
}

.eg-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.eg-gallery-item:hover img {
  transform: scale(1.03);
}

.eg-gallery-caption {
  padding: 6px 4px 0;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: break-word;
}

.eg-gallery-overlay-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}

/* ----------------------------------------------------------------
   7. Text
   ---------------------------------------------------------------- */
.eg-text {
  padding-top: 48px;
  padding-bottom: 48px;
}

.eg-text-grid {
  max-width: 800px;
}

.eg-text-grid--side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: none;
}

.eg-text-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text2);
}

.eg-text-body p {
  margin-bottom: 12px;
}

.eg-text-body ul,
.eg-text-body ol {
  padding-left: 24px;
  margin-bottom: 12px;
}

.eg-text-body li {
  margin-bottom: 4px;
}

.eg-text-image {
  border-radius: var(--r);
  overflow: hidden;
}

.eg-text-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Image above/below: full width, limited height */
.eg-text--image-above .eg-text-image,
.eg-text--image-below .eg-text-image {
  max-height: 400px;
  margin-bottom: 24px;
}

.eg-text--image-below .eg-text-image {
  margin-bottom: 0;
  margin-top: 24px;
}

.eg-text--image-above .eg-text-image img,
.eg-text--image-below .eg-text-image img {
  object-fit: cover;
  max-height: 400px;
}

/* ----------------------------------------------------------------
   8. Responsive
   ---------------------------------------------------------------- */
@media (max-width: 991px) {
  .eg-hero-title {
    font-size: 36px;
  }

  .eg-about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .eg-about-grid--image-left {
    direction: ltr;
  }

  .eg-quickactions-grid--cols-5 {
    grid-template-columns: repeat(3, 1fr);
  }

  .eg-quickactions-grid--cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .eg-quickactions-grid--cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .eg-map-grid--right,
  .eg-map-grid--left {
    grid-template-columns: 1fr;
  }

  .eg-map-grid--left .eg-map-info {
    order: 2;
  }

  .eg-map-grid--left .eg-map-canvas {
    order: 1;
  }

  .eg-map-canvas {
    min-height: 280px;
  }

  .eg-gallery-grid--grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .eg-gallery-grid--masonry {
    columns: 2;
  }

  .eg-text-grid--side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .eg-module {
    padding: 32px 16px;
  }

  .eg-hero {
    min-height: 320px;
  }

  .eg-hero--overlay {
    min-height: 360px;
  }

  .eg-hero--split {
    grid-template-columns: 1fr;
  }

  .eg-hero-content {
    padding: 32px 20px;
  }

  .eg-hero-title {
    font-size: 28px;
  }

  .eg-hero-subtitle {
    font-size: 16px;
  }

  .eg-hero-cta {
    padding: 8px 20px;
    font-size: 14px;
  }

  .eg-hero-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .eg-hero-content {
    text-align: center !important;
  }

  .eg-module-heading {
    font-size: 22px;
  }

  .eg-about-quote {
    position: relative;
    bottom: auto;
    left: auto;
    max-width: 100%;
    border-radius: 0 0 var(--r-sm) var(--r-sm);
  }

  .eg-about-quote-standalone {
    padding: 20px 12px 20px 24px;
  }

  .eg-about-quote-standalone p {
    font-size: 24px;
  }

  .eg-about-quote-standalone[data-length="medium"] p {
    font-size: 20px;
  }

  .eg-about-quote-standalone[data-length="long"] p {
    font-size: 16px;
  }

  .eg-quickactions-grid--cols-2,
  .eg-quickactions-grid--cols-3,
  .eg-quickactions-grid--cols-4,
  .eg-quickactions-grid--cols-5 {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .eg-quickactions-grid--cols-1 {
    grid-template-columns: 1fr;
  }

  .eg-quickaction-card {
    padding: 20px 16px;
  }

  .eg-quickaction-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
  }

  .eg-quickaction-icon i {
    font-size: 18px;
  }

  .eg-quickaction-title {
    font-size: 14px;
  }

  .eg-quickaction-desc {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .eg-quickactions-grid--bento .eg-quickaction-card--featured {
    grid-column: span 2;
  }

  .eg-gallery-grid--grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .eg-gallery-grid--large {
    columns: 1;
    column-gap: 0;
  }

  .eg-gallery-grid--large .eg-gallery-item {
    margin-bottom: 12px;
  }

  .eg-gallery-grid--masonry {
    columns: 2;
    column-gap: 8px;
  }

  .eg-gallery-grid--masonry .eg-gallery-item {
    margin-bottom: 8px;
  }
}

/* ----------------------------------------------------------------
   Module admin - module editor (sidaModuler)
   ---------------------------------------------------------------- */
.eg-module-list {
  min-height: 60px;
  padding: 2px;
}

.eg-module-card {
  transition: box-shadow 0.15s ease, opacity 0.15s ease;
  background-color: #fff;
  overflow: hidden;
}

.eg-module-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Text module needs overflow:visible so Redactor's sticky toolbar works
   (position:sticky breaks inside overflow:hidden ancestors) */
.eg-module-card--text {
  overflow: visible;
}

/* Compact text module: constrain editor height, hide save bar */
.eg-module-card--text:not(.eg-module-card--expanded) .eg-inline-editor-wrap {
  max-height: 150px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.eg-module-card--text:not(.eg-module-card--expanded) .eg-inline-editor-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(transparent, #fff);
  pointer-events: none;
}
/* Force toolbar to top in compact mode - disable sticky positioning */
.eg-module-card--text:not(.eg-module-card--expanded) .rx-toolbox-container {
  position: static !important;
  flex-shrink: 0;
}
.eg-module-card--text:not(.eg-module-card--expanded) .rx-editor-container {
  min-height: 0 !important;
}
.eg-module-card--text:not(.eg-module-card--expanded) .eg-inline-save-bar {
  display: none !important;
}

.eg-module-card--inactive {
  opacity: 0.55;
}

.eg-module-card--inactive:hover {
  opacity: 0.8;
}

.eg-module-drag-handle:hover {
  color: var(--bs-primary, #3b684f) !important;
}

.eg-module-sortable-placeholder {
  height: 48px;
  background: #f0f4f1;
  border: 2px dashed #c5d1c9;
  border-radius: 6px;
  margin-bottom: 8px;
}

/* Reduce padding when module content is rendered inside admin preview cards */
.eg-module-rendered-content .eg-module {
  padding: 8px 0;
}
.eg-module-rendered-content .eg-module + .eg-module {
  padding-top: 4px;
}
.eg-module-rendered-content .eg-module-heading {
  font-size: 18px;
  margin-bottom: 4px;
}
.eg-module-rendered-content .eg-module-subheading {
  font-size: 13px;
  margin-bottom: 8px;
}

.eg-module-empty {
  background: #fafbfa;
  border-style: dashed !important;
}

.eg-module-field::placeholder {
  font-style: italic;
  opacity: 0.5;
}

/* ----------------------------------------------------------------
   10. Icon picker (admin)
   ---------------------------------------------------------------- */
.eg-icon-picker {
  width: 320px;
  max-height: 400px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  overflow: hidden;
}

.eg-icon-picker-header {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

.eg-icon-picker-body {
  overflow-y: auto;
  max-height: 340px;
  padding: 8px 12px;
}

.eg-icon-cat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #888;
  margin: 8px 0 4px;
  letter-spacing: 0.5px;
}

.eg-icon-cat:first-child .eg-icon-cat-label {
  margin-top: 0;
}

.eg-icon-cat-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.eg-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 20px;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
}

.eg-icon-btn:hover {
  background: var(--surface2, #f0f0f0);
}

.eg-icon-trigger {
  min-width: 34px;
  font-size: 18px;
}

.eg-icon-trigger i {
  display: block;
}

/* ----------------------------------------------------------------
   9. Documents module
   ---------------------------------------------------------------- */
.eg-documents {
  padding-bottom: 32px;
}

.eg-documents-tree {
  margin-top: 8px;
}

/* Style the jqtree inside documents module */
.eg-documents-tree ul.jqtree-tree {
  margin-left: 0;
}

.eg-documents-tree .jqtree-element {
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.eg-documents-tree .jqtree-element:hover {
  background: var(--surface1, #f5f5f5);
}

.eg-documents-tree .dms-file-icon-wrap {
  vertical-align: middle;
}

.eg-documents-tree .small-info {
  display: inline;
  margin-left: 8px;
  color: var(--text-muted, #888);
  font-size: 0.85em;
}

/* ===================================================================
   Inline text editor - Redactor embedded directly in module card
   =================================================================== */

.eg-inline-editor-wrap {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  transition: border-color 0.15s;
}

.eg-inline-editor-wrap:focus-within {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Give the Redactor editing area a comfortable min-height */
.eg-inline-editor-wrap .rx-editor {
  min-height: 120px;
}

/* Subtle save bar animation */
.eg-inline-save-bar {
  transition: opacity 0.15s;
}
