/**
 * Welcome discount popup — front office (scoped styles)
 */
html.presta-pncd-welcome-open,
html.presta-pncd-welcome-open body {
  overflow: hidden;
}

.presta-pncd-welcome-root {
  --pncd-welcome-accent: #0d9488;
  --pncd-welcome-accent-soft: rgba(13, 148, 136, 0.12);
  --pncd-welcome-accent-text: #0f766e;
  --pncd-welcome-surface: #ffffff;
  --pncd-welcome-muted: #64748b;
  --pncd-welcome-border: rgba(15, 23, 42, 0.08);
  --pncd-welcome-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 24px 48px -12px rgba(15, 23, 42, 0.18);
  --pncd-welcome-radius: 18px;
  --pncd-welcome-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  position: fixed;
  inset: 0;
  z-index: 99990;
  font-family: var(--pncd-welcome-font);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.presta-pncd-welcome-root *,
.presta-pncd-welcome-root *::before,
.presta-pncd-welcome-root *::after {
  box-sizing: border-box;
}

.presta-pncd-welcome-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@supports not (backdrop-filter: blur(8px)) {
  .presta-pncd-welcome-overlay {
    background: rgba(15, 23, 42, 0.58);
  }
}

.presta-pncd-welcome-modal {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 28px));
  max-height: min(88vh, 680px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--pncd-welcome-surface);
  border-radius: var(--pncd-welcome-radius);
  box-shadow: var(--pncd-welcome-shadow);
  border: 1px solid var(--pncd-welcome-border);
}

#prestaPncdWelcomeRoot[aria-hidden="false"] .presta-pncd-welcome-modal {
  animation: prestaPncdWelcomeModalIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes prestaPncdWelcomeModalIn {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  #prestaPncdWelcomeRoot[aria-hidden="false"] .presta-pncd-welcome-modal {
    animation: none;
  }
}

.presta-pncd-welcome-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  color: #475569;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.presta-pncd-welcome-close:hover {
  background: #f1f5f9;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.presta-pncd-welcome-close:focus {
  outline: none;
}

.presta-pncd-welcome-close:focus-visible {
  outline: 2px solid var(--pncd-welcome-accent);
  outline-offset: 2px;
}

.presta-pncd-welcome-close-icon {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 300;
  display: block;
  margin-top: -2px;
}

.presta-pncd-welcome-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

/* Top band + title */
.presta-pncd-welcome-head {
  flex-shrink: 0;
  padding: 28px 52px 22px 26px;
  background: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 45%, #ffffff 100%);
  border-bottom: 1px solid var(--pncd-welcome-border);
  position: relative;
}

.presta-pncd-welcome-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--pncd-welcome-radius) 0 0 0;
  background: linear-gradient(180deg, var(--pncd-welcome-accent) 0%, #14b8a6 100%);
}

.presta-pncd-welcome-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}

.presta-pncd-welcome-copy {
  flex: 1 1 200px;
  min-width: 0;
}

.presta-pncd-welcome-title {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #0f172a;
}

.presta-pncd-welcome-subtitle.rte-content {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--pncd-welcome-muted);
}

.presta-pncd-welcome-subtitle.rte-content p:first-child {
  margin-top: 0;
}

.presta-pncd-welcome-subtitle.rte-content p:last-child {
  margin-bottom: 0;
}

.presta-pncd-welcome-image-wrap {
  flex: 0 1 200px;
  min-height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--pncd-welcome-border);
}

.presta-pncd-welcome-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
}

/* Scrollable body */
.presta-pncd-welcome-body {
  flex: 1;
  min-height: 0;
  padding: 20px 22px 24px;
  background: #fff;
}

.presta-pncd-welcome-intro {
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #334155;
}

/* Tiers panel */
.presta-pncd-welcome-tiers-panel {
  margin: 0;
  padding: 0;
  border: none;
}

.presta-pncd-welcome-tiers-panel-head {
  margin-bottom: 14px;
}

.presta-pncd-welcome-tiers-title {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #0f172a;
}

.presta-pncd-welcome-tiers-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--pncd-welcome-muted);
}

.presta-pncd-welcome-tiers-table-wrap {
  overflow-x: auto;
  margin: 0;
  border-radius: 14px;
  border: 1px solid var(--pncd-welcome-border);
  background: #fafafa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.presta-pncd-welcome-tiers-table {
  width: 100%;
  min-width: 280px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.presta-pncd-welcome-tiers-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pncd-welcome-muted);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--pncd-welcome-border);
}

.presta-pncd-welcome-tiers-table thead th:nth-child(2),
.presta-pncd-welcome-tiers-table thead th:nth-child(3) {
  text-align: right;
}

.presta-pncd-welcome-tiers-table tbody td {
  padding: 14px 14px;
  vertical-align: middle;
  color: #1e293b;
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  transition: background 0.15s ease;
}

.presta-pncd-welcome-tiers-table tbody tr:last-child td {
  border-bottom: none;
}

.presta-pncd-welcome-tiers-table tbody tr:hover td {
  background: #f8fafc;
}

.presta-pncd-welcome-tiers-table tbody td:first-child {
  font-weight: 600;
  color: #0f172a;
}

.presta-pncd-welcome-tiers-table tbody td:nth-child(2),
.presta-pncd-welcome-tiers-table tbody td:nth-child(3) {
  text-align: right;
  white-space: nowrap;
}

.presta-pncd-welcome-tiers-table tbody td:nth-child(3) {
  font-weight: 700;
  color: var(--pncd-welcome-accent-text);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, var(--pncd-welcome-accent-soft) 100%);
}

.presta-pncd-welcome-tiers-table tbody tr:hover td:nth-child(3) {
  background: linear-gradient(90deg, #f8fafc 0%, rgba(13, 148, 136, 0.14) 100%);
}

.presta-pncd-welcome-fine-print {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--pncd-welcome-border);
  font-size: 0.75rem;
  line-height: 1.5;
  color: #94a3b8;
}

.presta-pncd-welcome-fine-print a {
  color: var(--pncd-welcome-accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 480px) {
  .presta-pncd-welcome-head {
    padding: 24px 48px 18px 20px;
  }

  .presta-pncd-welcome-body {
    padding: 16px 16px 20px;
  }

  .presta-pncd-welcome-close {
    right: 10px;
    top: 10px;
    width: 36px;
    height: 36px;
  }
}
