/**
 * DBE E-Learning — Dark green pattern background
 * Reusable across auth pages, landing sections, empty states, etc.
 *
 * Usage:
 *   <div class="pattern-bg-page">
 *     {% include "partials/pattern-bg.html" %}
 *     <main class="pattern-bg-content">…</main>
 *   </div>
 *
 * Include in layout head:
 *   <link rel="stylesheet" href="{{ base_url() }}/assets/css/pattern-bg.css">
 */

.pattern-bg-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.pattern-bg-content {
  position: relative;
  z-index: 1;
}

.pattern-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(var(--color-primary-rgb, 0, 144, 48), 0.35), transparent 60%),
    linear-gradient(165deg, #041a0c 0%, #0a2e16 45%, #0f3d1f 100%);
  overflow: hidden;
  pointer-events: none;
}

/* Large rings — only slices visible at edges */
.pattern-bg__circle {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(var(--color-primary-light-rgb, 184, 224, 196), 0.22);
}

.pattern-bg__circle--1 {
  width: 52rem;
  height: 52rem;
  top: -26rem;
  right: -14rem;
  border-width: 3px;
  border-color: rgba(var(--color-accent-rgb, 192, 144, 48), 0.22);
}

.pattern-bg__circle--2 {
  width: 38rem;
  height: 38rem;
  bottom: -18rem;
  left: -12rem;
  border-color: rgba(var(--color-primary-rgb, 0, 144, 48), 0.45);
  background: radial-gradient(circle, rgba(var(--color-primary-rgb, 0, 144, 48), 0.12) 0%, transparent 68%);
}

.pattern-bg__circle--3 {
  width: 28rem;
  height: 28rem;
  top: 42%;
  left: -10rem;
  border-width: 1px;
  border-color: rgba(var(--color-primary-light-rgb, 184, 224, 196), 0.14);
}

.pattern-bg__circle--4 {
  width: 44rem;
  height: 44rem;
  bottom: -22rem;
  right: -8rem;
  border-width: 2px;
  border-color: rgba(var(--color-accent-rgb, 192, 144, 48), 0.16);
  background: radial-gradient(circle, rgba(var(--color-primary-dark-rgb, 0, 102, 34), 0.4) 0%, transparent 65%);
}

.pattern-bg__swirls {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.pattern-bg__swirls path {
  fill: none;
  stroke: rgba(var(--color-primary-light-rgb, 184, 224, 196), 0.2);
  stroke-width: 2;
  stroke-linecap: round;
}

.pattern-bg__swirls path:nth-child(2) {
  stroke: rgba(var(--color-accent-rgb, 192, 144, 48), 0.18);
  stroke-width: 1.5;
}

.pattern-bg__swirls path:nth-child(3) {
  stroke: rgba(var(--color-primary-rgb, 0, 144, 48), 0.35);
  stroke-width: 2.5;
}

.pattern-bg__swirls path:nth-child(4) {
  stroke: rgba(var(--color-primary-light-rgb, 184, 224, 196), 0.1);
  stroke-width: 1;
}

/* Optional: pattern inside a section instead of full viewport */
.pattern-bg-section {
  position: relative;
  overflow: hidden;
}

.pattern-bg-section > .pattern-bg {
  position: absolute;
}

.pattern-bg-section > .pattern-bg-content {
  position: relative;
  z-index: 1;
}
