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

:root {
  --wcpp-primary: #0a7d3e;
  --wcpp-accent: #f59e0b;
  --wcpp-topbar-height: 76px;
  --wcpp-adminbar-offset: 0px;
}

body.admin-bar { --wcpp-adminbar-offset: 32px; }
@media (max-width: 782px) {
  body.admin-bar { --wcpp-adminbar-offset: 46px; }
}

/* ===== PERSISTENTE TOPBAR ===== */
.wcpp-topbar {
  position: fixed;
  top: var(--wcpp-adminbar-offset, 0px);
  left: 0;
  right: 0;
  z-index: 99998;
  min-height: 76px;
  padding: 10px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,0.22), transparent 28%),
    radial-gradient(circle at 88% 35%, rgba(245,158,11,0.42), transparent 30%),
    linear-gradient(135deg, #06281a 0%, var(--wcpp-primary) 52%, #08351f 100%);
  border-bottom: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 16px 44px rgba(0,0,0,0.22), 0 2px 0 rgba(255,255,255,0.10) inset;
  transform: translateY(-120%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  isolation: isolate;
}
.wcpp-topbar.wcpp-visible { transform: translateY(0); }

.wcpp-topbar__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.14) 38%, transparent 54%);
  transform: translateX(-100%);
  animation: wcppTopbarShine 5.5s ease-in-out infinite;
  z-index: -1;
}

.wcpp-topbar__inner {
  position: relative;
  width: min(1180px, 100%);
  min-height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.wcpp-topbar__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 25px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18), 0 0 0 5px rgba(255,255,255,0.07);
  animation: wcppIconPulse 2.7s ease-in-out infinite;
}

.wcpp-topbar__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.wcpp-topbar__eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
}

.wcpp-topbar__text {
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 1px 1px rgba(0,0,0,0.18);
}

.wcpp-topbar__text strong { color: #fff7db; }

.wcpp-topbar__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 48%, #fef3c7 100%);
  color: #0f3b25;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(0,0,0,0.22), 0 0 0 4px rgba(255,255,255,0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  font-family: inherit;
}
.wcpp-topbar__btn:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 16px 34px rgba(0,0,0,0.28), 0 0 0 6px rgba(255,255,255,0.14);
  filter: brightness(1.03);
}
.wcpp-topbar__btn:active { transform: scale(0.98); }
.wcpp-topbar__btn:disabled,
.wcpp-topbar__btn.wcpp-is-busy {
  cursor: wait;
  opacity: 0.72;
}

.wcpp-topbar__close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.78);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.wcpp-topbar__close:hover {
  background: rgba(255,255,255,0.20);
  color: #fff;
  transform: rotate(8deg);
}

.wcpp-topbar.wcpp-topbar--ios-warning {
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,0.20), transparent 26%),
    radial-gradient(circle at 88% 34%, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(135deg, #7c2d12 0%, #ea580c 52%, #9a3412 100%);
}
.wcpp-topbar--ios-warning .wcpp-topbar__btn { color: #8a3412; }

body.wcpp-has-topbar {
  padding-top: var(--wcpp-topbar-height, 76px) !important;
  transition: padding-top 0.25s ease;
}

@keyframes wcppTopbarShine {
  0%, 52% { transform: translateX(-100%); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}
@keyframes wcppIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

@media (max-width: 680px) {
  .wcpp-topbar {
    min-height: 96px;
    padding: 9px 10px;
  }
  .wcpp-topbar__inner {
    min-height: 78px;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    flex-wrap: wrap;
    padding-right: 38px;
  }
  .wcpp-topbar__icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 21px;
  }
  .wcpp-topbar__copy {
    flex: 1 1 calc(100% - 52px);
  }
  .wcpp-topbar__eyebrow { font-size: 9.5px; padding: 3px 7px; }
  .wcpp-topbar__text { font-size: 13.2px; line-height: 1.25; }
  .wcpp-topbar__btn {
    margin-left: 49px;
    min-height: 38px;
    padding: 9px 15px;
    font-size: 13px;
    flex: 1 1 auto;
  }
  .wcpp-topbar__close {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
  }
  body.wcpp-has-topbar { padding-top: var(--wcpp-topbar-height, 96px) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .wcpp-topbar,
  .wcpp-topbar__btn,
  .wcpp-topbar__close,
  .wcpp-floater,
  .wcpp-popup,
  .wcpp-toast { transition: none !important; animation: none !important; }
}

/* ===== LOYALTY BAR ===== */
.wcpp-loyalty {
  position: fixed;
  top: var(--wcpp-adminbar-offset, 0px);
  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, top 0.25s ease;
  color: #1f2937;
}
.wcpp-loyalty.wcpp-visible { transform: translateY(0); }
body.wcpp-has-topbar .wcpp-loyalty { top: calc(var(--wcpp-adminbar-offset, 0px) + var(--wcpp-topbar-height, 76px)); }
body.wcpp-has-topbar.wcpp-has-loyalty { padding-top: calc(var(--wcpp-topbar-height, 76px) + 44px) !important; }
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-has-loyalty { padding-top: calc(var(--wcpp-topbar-height, 96px) + 44px) !important; }
}

/* ===== FLOATING BELL KNOP ===== */
.wcpp-floater {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99997;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wcpp-primary), #064e2f);
  color: white;
  border: 1px solid rgba(255,255,255,0.28);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.23), 0 0 0 7px rgba(10,125,62,0.12);
  transition: transform 0.3s, box-shadow 0.3s, opacity 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.08) rotate(-4deg);
  box-shadow: 0 16px 40px rgba(0,0,0,0.30), 0 0 0 9px rgba(10,125,62,0.16);
}
.wcpp-floater__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 22px;
  height: 22px;
  background: var(--wcpp-accent);
  color: white;
  font-size: 12px;
  line-height: 18px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  border: 2px solid white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
}

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

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

.wcpp-popup {
  background: white;
  border-radius: 22px;
  padding: 28px 24px;
  max-width: 430px;
  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: 66px;
  height: 66px;
  background: linear-gradient(135deg, var(--wcpp-accent), #d97706);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 33px;
  box-shadow: 0 10px 26px rgba(245,158,11,0.28);
}

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

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

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

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

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

.wcpp-btn--primary {
  background: var(--wcpp-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(10,125,62,0.28);
}
.wcpp-btn--primary:hover {
  filter: brightness(0.92);
  box-shadow: 0 8px 20px rgba(10,125,62,0.34);
}

.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: 800;
  font-size: 0.85rem;
}

/* ===== TOAST ===== */
.wcpp-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  background: #111827;
  color: white;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  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: min(92vw, 560px);
  text-align: center;
}
.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: 54px; height: 54px; font-size: 23px; }
  .wcpp-popup { padding: 22px 18px; border-radius: 18px; }
  .wcpp-popup__title { font-size: 1.2rem; }
  .wcpp-popup__buttons { flex-direction: column-reverse; }
  .wcpp-toast { bottom: 16px; }
}
