/**
 * Ploko — webdesign popup (locatie template)
 * Gescoped aan .ploko-overlay en .ploko-trigger
 *
 * @package Ploko
 */

.ploko-overlay,
.ploko-trigger,
button.ploko-trigger {
  --pp-indigo-deepest: #130525;
  --pp-indigo-dark   : #1A0734;
  --pp-indigo-base   : #290B50;
  --pp-ruby-base     : #9C275F;
  --pp-ruby-light    : #B23C74;
  --pp-violet-base   : #B23EFF;
  --pp-violet-pale   : #E2AAFF;

  --pp-text-primary   : #1C0E29;
  --pp-text-secondary : rgba(28, 14, 41, 0.72);
  --pp-off-white      : #FAF8FD;

  --pp-gradient-brand : linear-gradient(135deg, #9C275F 0%, #B23EFF 100%);
  --pp-gradient-hero  : linear-gradient(135deg, #1A0734 0%, #290B50 45%, #7A1A49 100%);

  --pp-shadow-glow    : 0 12px 48px rgba(156,39,95,0.45), 0 4px 16px rgba(178,62,255,0.28);
  --pp-shadow-lifted  : 0 24px 64px rgba(41,11,80,0.20), 0 8px 24px rgba(156,39,95,0.12), 0 0 0 1px rgba(178,62,255,0.10);

  --pp-radius-md  : 14px;
  --pp-radius-lg  : 20px;
  --pp-radius-xl  : 28px;
  --pp-radius-full: 9999px;

  --pp-ease-luxury : cubic-bezier(0.165, 0.84, 0.44, 1);
  --pp-ease-spring : cubic-bezier(0.34, 1.56, 0.64, 1);
  --pp-dur-slow    : 400ms;
  --pp-dur-slower  : 600ms;

  --pp-z-modal     : 9999;
}

/* Scoped reset — alleen binnen popup */
.ploko-overlay *,
.ploko-overlay *::before,
.ploko-overlay *::after,
.ploko-trigger,
button.ploko-trigger,
.ploko-trigger *,
button.ploko-trigger *,
.ploko-trigger *::before,
.ploko-trigger *::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.ploko-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--pp-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--pp-dur-slow) var(--pp-ease-luxury),
    visibility var(--pp-dur-slow) var(--pp-ease-luxury);
  font-family: var(--font-display, 'Plus Jakarta Sans', system-ui, sans-serif);
}

.ploko-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.ploko-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 5, 37, 0.82);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  cursor: pointer;
}

/* Modal */
.ploko-modal {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow: hidden;
  border-radius: var(--pp-radius-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: var(--pp-shadow-lifted), 0 0 0 1px rgba(178,62,255,0.15);
  transform: translateY(32px) scale(0.96);
  transition: transform var(--pp-dur-slower) var(--pp-ease-spring);
  background: var(--pp-off-white);
}

.ploko-overlay.is-open .ploko-modal {
  transform: translateY(0) scale(1);
}

/* Left panel */
.ploko-left {
  background: var(--pp-gradient-hero);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.ploko-left::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(178,62,255,0.20) 0%, transparent 70%);
  top: -80px;
  right: -80px;
  pointer-events: none;
}

.ploko-left::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(156,39,95,0.28) 0%, transparent 70%);
  bottom: 40px;
  left: -40px;
  pointer-events: none;
}

.ploko-left-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100%;
}

.ploko-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(178,62,255,0.18);
  border: 1px solid rgba(178,62,255,0.30);
  color: var(--pp-violet-pale);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--pp-radius-full);
  width: fit-content;
}

.ploko-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pp-violet-base);
  animation: ploko-pulse-dot 2s ease-in-out infinite;
}

@keyframes ploko-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.7); }
}

.ploko-headline {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.025em;
  margin: 0;
}

.ploko-headline-accent {
  background: var(--pp-gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ploko-price-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ploko-price-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.ploko-price {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}

.ploko-price-strike {
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.40);
  text-decoration: line-through;
  margin-top: 2px;
}

.ploko-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.ploko-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.80);
  line-height: 1.4;
}

.ploko-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pp-gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  box-shadow: 0 2px 8px rgba(178,62,255,0.35);
}

.ploko-check svg {
  width: 10px;
  height: 10px;
  stroke: #fff;
  stroke-width: 2.5;
  fill: none;
}

.ploko-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--pp-radius-md);
}

.ploko-stars {
  display: flex;
  gap: 2px;
}

.ploko-stars svg {
  width: 14px;
  height: 14px;
  fill: #F5A623;
}

.ploko-trust-text {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.3;
}

.ploko-trust-text strong {
  color: rgba(255,255,255,0.90);
  font-weight: 600;
}

/* Right panel — natuurlijke flow, hele panel scrolt */
.ploko-right {
  background: var(--pp-off-white);
  padding: 40px 36px;
  display: block;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 90vh;
  max-height: 90dvh;
  color: var(--pp-text-primary);
}

.ploko-right > * + * {
  margin-top: 20px;
}

/* Compacter: ruimte tussen Formidable-blok en 100% vrijblijvend */
.ploko-right > .ploko-form-wrap + .ploko-guarantee {
  margin-top: 10px;
}

.ploko-right-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ploko-right-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pp-ruby-base);
}

.ploko-right-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--pp-text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.ploko-right-sub {
  font-size: 0.8125rem;
  color: rgba(28,14,41,0.60);
  line-height: 1.5;
  margin-top: 2px;
}

.ploko-urgency {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(156,39,95,0.08) 0%, rgba(178,62,255,0.06) 100%);
  border: 1px solid rgba(156,39,95,0.18);
  border-radius: var(--pp-radius-md);
}

.ploko-urgency-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.ploko-urgency-text {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--pp-ruby-base);
  line-height: 1.3;
}

.ploko-urgency-text strong {
  font-weight: 700;
}

.ploko-form-wrap {
  position: relative;
  width: 100%;
}

.ploko-guarantee {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 0;
  padding: 12px 14px;
  background: rgba(230, 245, 238, 0.6);
  border: 1px solid rgba(26, 122, 76, 0.18);
  border-radius: var(--pp-radius-md);
  clear: both;
}

.ploko-guarantee-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(26, 122, 76, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.ploko-guarantee-icon svg {
  width: 16px;
  height: 16px;
  stroke: #1A7A4C;
  stroke-width: 2;
  fill: none;
}

.ploko-guarantee-text {
  font-size: 0.75rem;
  color: rgba(28,14,41,0.55);
  line-height: 1.4;
}

.ploko-guarantee-text strong {
  color: #1A7A4C;
  font-weight: 600;
}

/* Close button (button-tag voor specificiteit t.o.v. theme/Elementor) */
button.ploko-close,
.ploko-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.80);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 200ms ease, transform 200ms ease;
  padding: 0;
}

button.ploko-close:hover,
.ploko-close:hover {
  background: rgba(255,255,255,0.22);
  transform: scale(1.08);
}

button.ploko-close svg,
.ploko-close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* Trigger button */
.ploko-trigger {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: calc(var(--pp-z-modal) - 1);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  height: 54px;
  border: none;
  border-radius: var(--pp-radius-full);
  background: var(--pp-gradient-brand);
  color: #fff;
  font-family: var(--font-display, 'Plus Jakarta Sans', system-ui, sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--pp-shadow-glow);
  transition:
    transform 200ms var(--pp-ease-spring),
    box-shadow 200ms ease;
  animation: ploko-trigger-bounce 3s var(--pp-ease-spring) 2s infinite;
}

button.ploko-trigger:hover,
.ploko-trigger:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 56px rgba(156,39,95,0.55), 0 4px 18px rgba(178,62,255,0.35);
}

.ploko-trigger-icon {
  width: 22px;
  height: 22px;
  background: rgba(255,255,255,0.22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ploko-trigger-icon svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
  stroke-width: 2.2;
  fill: none;
}

@keyframes ploko-trigger-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@media (max-width: 680px) {
  /*
   * Mobiel: bottom sheet; .ploko-right scrollt; safe-area.
   */
  .ploko-modal {
    display: flex;
    flex-direction: column;
    grid-template-columns: unset;
    width: 100%;
    max-height: min(92dvh, 100dvh);
    min-height: 0;
    border-radius: 20px 20px 0 0;
    align-self: flex-end;
    margin: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .ploko-overlay {
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 env(safe-area-inset-bottom, 0);
  }

  .ploko-overlay.is-open .ploko-modal {
    transform: translateY(0) scale(1);
  }

  .ploko-left {
    flex-shrink: 0;
    padding: max(20px, env(safe-area-inset-top, 0px)) 20px 20px;
  }

  .ploko-left-inner {
    gap: 16px;
  }

  .ploko-headline {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem);
  }

  .ploko-price {
    font-size: clamp(1.85rem, 8vw, 2.2rem);
  }

  .ploko-price-strike {
    font-size: 0.95rem;
  }

  .ploko-right {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 20px 16px
      calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .ploko-right > * + * {
    margin-top: 16px;
  }

  .ploko-right-header {
    gap: 4px;
  }

  .ploko-right-title {
    font-size: 1.15rem;
  }

  .ploko-urgency {
    padding: 10px 12px;
  }

  .ploko-urgency-text {
    font-size: 0.7rem;
    line-height: 1.4;
  }

  /* Ruimte onder laatste veld / submit in scroll area */
  .ploko-form-wrap {
    padding-bottom: 8px;
  }

  .ploko-guarantee {
    margin-top: 8px;
    margin-bottom: 8px;
  }

  /* Sluit: groter aanraakvlak, onder notch */
  button.ploko-close,
  .ploko-close {
    top: max(12px, env(safe-area-inset-top, 0px));
    right: 12px;
    width: 44px;
    height: 44px;
  }

  /*
   * Trigger rechts, hoger dan WhatsApp/taal-widget (linksonder = vlag).
   */
  button.ploko-trigger,
  .ploko-trigger {
    left: auto;
    right: 16px;
    bottom: calc(104px + env(safe-area-inset-bottom, 0px));
    height: 48px;
    padding: 0 18px;
    font-size: 0.8rem;
  }

  .ploko-left .ploko-features,
  .ploko-left .ploko-trust {
    display: none;
  }
}

/* Voorkom interferentie met de WhatsApp/floating buttons rechtsonder */
@media (min-width: 681px) {
  button.ploko-trigger,
  .ploko-trigger { right: 28px; bottom: 92px; }
}
