/* ═════════════════════════════════════════════════════════════════════════
   TakeAMindBreak.com — Interactive & Mindful Transition Loading Screen
   Design System: Botanical Sanctuary Wellness
   Palette: Eucalyptus #1C2D24 | Fresh Mint #6B9E82 | Warm Gold #E2B86B | Cream #FAF9F5
   ═════════════════════════════════════════════════════════════════════════ */

/* Fullscreen Backdrop Container */
.mindful-loader-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 9999;
  background-color: var(--loader-bg, rgba(28, 45, 36, 0.94));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 3vh, 2rem) 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1),
              visibility 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
  box-sizing: border-box;
}

.mindful-loader-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mindful-loader-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

/* Background Canvas for Dew Drops & Burst Particles */
.loader-dew-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: auto;
  cursor: crosshair;
}

/* Central Content Container (Centerpiece) */
.loader-centerpiece {
  position: relative;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 520px;
  width: 100%;
  pointer-events: none; /* Let canvas receive bubble clicks */
  margin-top: 1rem;
}

/* Interactive Hint Badge */
.loader-tap-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: rgba(107, 158, 130, 0.2);
  border: 1px solid rgba(107, 158, 130, 0.4);
  border-radius: 100px;
  color: #A8D5BA;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  animation: hintPulse 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.04); }
}

/* Breathe-Sync Pulse Ring */
.breath-ring-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  pointer-events: none;
}

.breath-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(107, 158, 130, 0.35);
  box-shadow: 0 0 25px rgba(107, 158, 130, 0.25), inset 0 0 20px rgba(107, 158, 130, 0.15);
  animation: breathPulse 4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.breath-ring-inner {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107, 158, 130, 0.25) 0%, rgba(18, 29, 23, 0.1) 75%);
  border: 1.5px dashed rgba(226, 184, 107, 0.4);
  animation: breathPulseInner 4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.breath-ring-text {
  position: relative;
  z-index: 2;
  font-family: 'Outfit', -apple-system, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #FAF9F5;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  animation: breathTextFade 4s ease-in-out infinite;
  text-align: center;
  max-width: 120px;
  line-height: 1.3;
}

@keyframes breathPulse {
  0%, 100% {
    transform: scale(0.88);
    border-color: rgba(107, 158, 130, 0.3);
    box-shadow: 0 0 15px rgba(107, 158, 130, 0.15);
  }
  50% {
    transform: scale(1.15);
    border-color: rgba(107, 158, 130, 0.7);
    box-shadow: 0 0 35px rgba(107, 158, 130, 0.45);
  }
}

@keyframes breathPulseInner {
  0%, 100% {
    transform: scale(0.9);
    border-color: rgba(226, 184, 107, 0.3);
  }
  50% {
    transform: scale(1.12);
    border-color: rgba(226, 184, 107, 0.8);
  }
}

@keyframes breathTextFade {
  0%, 100% { opacity: 0.85; transform: translateY(0); }
  25%      { opacity: 1; }
  50%      { opacity: 0.85; transform: scale(1.05); }
  75%      { opacity: 1; }
}

/* 3D Flip Insight Card Container */
.mindful-insight-flipper {
  perspective: 1000px;
  width: 100%;
  max-width: 420px;
  margin-bottom: 1rem;
  pointer-events: auto;
}

.mindful-insight-card {
  background: #FAF9F5;
  border-radius: 16px;
  padding: 1.1rem 1.35rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(226, 184, 107, 0.35);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transform-style: preserve-3d;
  animation: cardFlipIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) both;
  position: relative;
  overflow: hidden;
}

.mindful-insight-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #E2B86B, #6B9E82);
}

@keyframes cardFlipIn {
  0% {
    opacity: 0;
    transform: rotateX(70deg) translateY(20px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: rotateX(0deg) translateY(0) scale(1);
  }
}

.insight-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  padding: 0.35rem;
  background: rgba(107, 158, 130, 0.12);
  border-radius: 10px;
}

.insight-body {
  flex: 1;
}

.insight-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6B9E82;
  margin-bottom: 0.25rem;
  display: block;
}

.insight-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #1C2D24;
  font-weight: 500;
  margin: 0;
}

/* Minimalist Progress Rail */
.loader-progress-container {
  width: 100%;
  max-width: 420px;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: none;
}

.loader-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}

.loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--loader-primary, #6B9E82) 0%, var(--loader-secondary, #E2B86B) 100%);
  border-radius: 100px;
  transition: width 0.08s linear;
  box-shadow: 0 0 12px var(--loader-primary, rgba(107, 158, 130, 0.6));
}

.loader-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #93A89D;
  font-weight: 600;
}

/* ═════════════════════════════════════════════════════════════════════════
   AdSense Safe Dedicated Card Container (z-index: 10000)
   40px Margin Exclusion Zone enforced in JS canvas physics
   ═════════════════════════════════════════════════════════════════════════ */
.loader-ad-container {
  position: relative;
  z-index: 10000;
  width: 100%;
  max-width: 480px;
  background: #FAF9F5;
  border-radius: 14px;
  padding: 0.55rem 0.85rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(226, 184, 107, 0.25);
  pointer-events: auto;
  text-align: center;
  margin-bottom: 0.25rem;
  box-sizing: border-box;
}

.loader-ad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  color: #6B7C72;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.loader-ad-badge {
  background: rgba(107, 158, 130, 0.15);
  color: #2C3E35;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

.loader-ad-content {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7C72;
  font-size: 0.78rem;
}

@media (max-height: 700px) {
  .breath-ring-wrapper { width: 130px; height: 130px; margin-bottom: 0.75rem; }
  .breath-ring-text { font-size: 0.82rem; }
  .mindful-insight-card { padding: 0.75rem 1rem; }
  .insight-text { font-size: 0.8rem; }
  .loader-tap-hint { margin-bottom: 0.65rem; font-size: 0.72rem; }
}
