/* ═══════════════════════════════════════════════════
   Impact Prod — Loader & Consent  |  loader.css
   ═══════════════════════════════════════════════════ */

/* ── Page Loader Overlay ─────────────────────────── */
#ip-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

#ip-loader-overlay.ip-loader-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Inner content ───────────────────────────────── */
.ip-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  padding: 40px;
  user-select: none;
}

/* ── Logo ────────────────────────────────────────── */
.ip-loader-logo {
  animation: ip-logo-breathe 3s ease-in-out infinite;
}

.ip-loader-logo img {
  max-width: 250px;
  max-height: 100px;
  object-fit: contain;
  display: block;
}

@keyframes ip-logo-breathe {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%       { opacity: 0.75; transform: scale(1.04); }
}

/* ── Tagline ─────────────────────────────────────── */
.ip-loader-tagline {
  margin: 0;
  font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.01em;
  line-height: 1.3;
  animation: ip-rise 0.9s ease 0.2s both;
}

/* ── Subtitle ────────────────────────────────────── */
.ip-loader-subtitle {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  animation: ip-rise 0.9s ease 0.45s both;
}

/* ── Animated dots ───────────────────────────────── */
.ip-loader-dots span {
  display: inline-block;
  animation: ip-dot-blink 1.4s ease-in-out infinite;
  color: #BFA76F;
}
.ip-loader-dots span:nth-child(1) { animation-delay: 0s;    }
.ip-loader-dots span:nth-child(2) { animation-delay: 0.2s;  }
.ip-loader-dots span:nth-child(3) { animation-delay: 0.4s;  }

@keyframes ip-dot-blink {
  0%, 80%, 100% { opacity: 0.2; }
  40%           { opacity: 1;   }
}

/* ── Progress bar ────────────────────────────────── */
.ip-loader-bar {
  width: 160px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  border-radius: 1px;
  animation: ip-rise 0.9s ease 0.65s both;
}

.ip-loader-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, transparent, #BFA76F, transparent);
  animation: ip-progress-sweep 1.6s ease 0.5s infinite;
}

@keyframes ip-progress-sweep {
  0%   { transform: translateX(-100%); width: 60%; }
  100% { transform: translateX(267%);  width: 60%; }
}

/* ── Shared animation ────────────────────────────── */
@keyframes ip-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ─────────────────────────────────────────────────── */
/* ── Cookie Consent Toast ───────────────────────── */
/* ─────────────────────────────────────────────────── */

#ip-consent-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 999998;

  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;

  background: rgba(12, 18, 12, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(191, 167, 111, 0.18);
  border-radius: 14px;
  padding: 16px 22px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);

  max-width: 680px;
  width: calc(100% - 48px);

  animation: ip-toast-slide-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ip-toast-slide-up {
  from { opacity: 0; transform: translateX(-50%) translateY(28px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0);    }
}

#ip-consent-toast.ip-toast-out {
  animation: ip-toast-slide-down 0.35s ease forwards;
}

@keyframes ip-toast-slide-down {
  to { opacity: 0; transform: translateX(-50%) translateY(32px); }
}

/* ── Toast body ─────────────────────────────────── */
.ip-consent-body {
  flex: 1;
  min-width: 0;
}

.ip-consent-body p {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

.ip-consent-body strong {
  color: #ffffff;
  font-weight: 600;
}

.ip-consent-body a {
  color: #BFA76F;
  text-decoration: none;
  white-space: nowrap;
}

.ip-consent-body a:hover {
  text-decoration: underline;
}

/* ── Toast actions ──────────────────────────────── */
.ip-consent-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#ip-consent-refuse {
  background: transparent;
  border: none;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.5);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

#ip-consent-refuse:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
}

#ip-consent-accept {
  background: #BFA76F;
  border: none;
  padding: 10px 22px;
  color: #0a0f0a;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  border-radius: 8px;
  transition: filter 0.15s, transform 0.15s;
  white-space: nowrap;
}

#ip-consent-accept:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 540px) {
  #ip-consent-toast {
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    border-radius: 14px 14px 0 0;
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    gap: 14px;
  }

  #ip-consent-toast.ip-toast-out {
    animation: ip-toast-slide-down-mobile 0.35s ease forwards;
  }

  @keyframes ip-toast-slide-down-mobile {
    to { opacity: 0; transform: translateY(100%); }
  }

  @keyframes ip-toast-slide-up {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0);    }
  }

  .ip-consent-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
