/* ============================================
   WooCommerce Push Pro — Frontend Styles
   ============================================ */

:root {
  --wcpp-primary: #0a7d3e;
  --wcpp-accent: #f59e0b;
  --wcpp-primary-dark: color-mix(in srgb, var(--wcpp-primary) 85%, black);
}

/* ===== PERSISTENTE TOPBAR ===== */
.wcpp-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99998;
  background: linear-gradient(135deg, var(--wcpp-primary), var(--wcpp-primary-dark));
  color: white;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transform: translateY(-100%);
  transition: transform 0.4s ease;
}
.wcpp-topbar.wcpp-visible { transform: translateY(0); }

/* iOS waarschuwingsvariant — oranje ipv groen */
.wcpp-topbar.wcpp-topbar--ios-warning {
  background: linear-gradient(135deg, #d97706, #b45309);
}
.wcpp-topbar--ios-warning .wcpp-topbar__btn {
  color: #b45309;
}

/* ===== LOYALTY BAR ===== */
.wcpp-loyalty {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 99996;
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transform: translateY(-100%);
  transition: transform 0.4s ease;
  color: #1f2937;
}
.wcpp-loyalty.wcpp-visible { transform: translateY(0); }

/* Posities afhankelijk van of topbar er ook is */
.wcpp-loyalty { top: 0; }
body.wcpp-has-topbar .wcpp-loyalty { top: 44px; }
body.wcpp-has-topbar.wcpp-has-loyalty { padding-top: 88px; }
body.wcpp-has-loyalty:not(.wcpp-has-topbar) { padding-top: 44px; }

.wcpp-loyalty__text {
  flex: 1;
  min-width: 0;
}
.wcpp-loyalty__progress {
  width: 120px;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.wcpp-loyalty__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--wcpp-primary), var(--wcpp-accent));
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wcpp-loyalty__count {
  font-weight: 700;
  color: var(--wcpp-primary);
  white-space: nowrap;
  font-size: 12px;
}

@media (max-width: 600px) {
  .wcpp-loyalty { padding: 8px 10px; gap: 8px; font-size: 12px; }
  .wcpp-loyalty__progress { width: 70px; height: 6px; }
  body.wcpp-has-topbar .wcpp-loyalty { top: 56px; }
  body.wcpp-has-topbar.wcpp-has-loyalty { padding-top: 100px; }
}

.wcpp-topbar__text {
  flex: 1;
  text-align: center;
  max-width: 700px;
}

.wcpp-topbar__btn {
  background: white;
  color: var(--wcpp-primary);
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.wcpp-topbar__btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wcpp-topbar__close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.wcpp-topbar__close:hover { color: white; }

/* Schuif body inhoud naar beneden als bar zichtbaar is */
body.wcpp-has-topbar {
  padding-top: 44px;
}

@media (max-width: 600px) {
  .wcpp-topbar { padding: 8px 10px; font-size: 13px; gap: 8px; }
  .wcpp-topbar__text { font-size: 12px; }
  .wcpp-topbar__btn { padding: 6px 12px; font-size: 12px; }
  body.wcpp-has-topbar { padding-top: 56px; }
}

/* ===== FLOATING BELL KNOP ===== */
.wcpp-floater {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99997;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wcpp-primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: transform 0.3s, box-shadow 0.3s;
  opacity: 0;
  transform: scale(0);
  font-family: inherit;
}
.wcpp-floater.wcpp-visible {
  opacity: 1;
  transform: scale(1);
}
.wcpp-floater:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}
.wcpp-floater__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--wcpp-accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 10px;
  border: 2px solid white;
}

/* ===== POPUP MODAL ===== */
.wcpp-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: wcppFadeIn 0.3s ease;
}
.wcpp-popup-overlay.wcpp-visible { display: flex; }

@keyframes wcppFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wcpp-popup {
  background: white;
  border-radius: 20px;
  padding: 28px 24px;
  max-width: 420px;
  width: 100%;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: wcppSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 25px 80px rgba(0,0,0,0.25);
}

@keyframes wcppSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.wcpp-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.05);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.wcpp-popup__close:hover { background: rgba(0,0,0,0.1); color: #111; }

.wcpp-popup__icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--wcpp-accent), #d97706);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 32px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--wcpp-accent) 40%, transparent);
}

.wcpp-popup__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #111;
  line-height: 1.3;
}

.wcpp-popup__text {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 16px;
}

.wcpp-popup__incentive {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-left: 4px solid var(--wcpp-accent);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  font-weight: 500;
  color: #78350f;
}

.wcpp-popup__buttons {
  display: flex;
  gap: 10px;
}

.wcpp-btn {
  flex: 1;
  padding: 13px 16px;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  font-family: inherit;
}
.wcpp-btn:active { transform: scale(0.97); }

.wcpp-btn--primary {
  background: var(--wcpp-primary);
  color: white;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--wcpp-primary) 30%, transparent);
}
.wcpp-btn--primary:hover {
  background: var(--wcpp-primary-dark);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--wcpp-primary) 40%, transparent);
}

.wcpp-btn--secondary {
  background: #f3f4f6;
  color: #4b5563;
}
.wcpp-btn--secondary:hover { background: #e5e7eb; }

/* ===== iOS UITLEG ===== */
.wcpp-ios-modal__steps {
  list-style: none;
  counter-reset: step;
  margin: 16px 0 20px;
  padding: 0;
}
.wcpp-ios-modal__steps li {
  counter-increment: step;
  padding: 10px 0 10px 44px;
  position: relative;
  font-size: 0.92rem;
  color: #374151;
}
.wcpp-ios-modal__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  width: 30px;
  height: 30px;
  background: var(--wcpp-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ===== TOAST ===== */
.wcpp-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  background: #111;
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 100000;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  max-width: 90vw;
}
.wcpp-toast.wcpp-visible {
  transform: translateX(-50%) translateY(0);
}
.wcpp-toast--success { background: #065f46; }
.wcpp-toast--error { background: #991b1b; }

@media (max-width: 600px) {
  .wcpp-floater { bottom: 16px; right: 16px; width: 52px; height: 52px; }
  .wcpp-popup { padding: 22px 18px; border-radius: 16px; }
  .wcpp-popup__title { font-size: 1.2rem; }
}
