/* FlyPrice — variation-aware price block */
.flyprice {
    --fp-accent: #237916;
    --fp-accent-dark: #1a5c11;
    --fp-text: #111;
    --fp-text-soft: #2a2a2a;
    --fp-muted: #6b6b6b;
    --fp-radius-sm: 14px;
    --fp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-family: var(--fp-font);
    color: var(--fp-text);
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 6px 16px;
    box-shadow: none;
    text-align: center;
    line-height: 1.45;
    overflow: visible;
    position: relative;
}
.flyprice__chart-wrap { padding: 0; }

.flyprice__chart-wrap {
    position: relative;
    margin: 0 auto;
    min-height: 120px;
    display: flex; align-items: center; justify-content: center;
    overflow: visible;
}

.flyprice__sparkline-stage {
    position: absolute; left: 0; right: 0; top: 50%;
    width: 100%; height: 110px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 0;
}
.flyprice__sparkline {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    overflow: visible;
}
.flyprice__sparkline-line {
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
}
.flyprice__sparkline-area { opacity: 0; }
.flyprice__sparkline-dot {
    position: absolute;
    width: 14px; height: 14px;
    background: #237916;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Start animation only when block is marked visible (via IntersectionObserver) */
.flyprice.is-visible .flyprice__sparkline-line {
    animation: flyprice-draw 2.6s cubic-bezier(.4,.2,.5,1) forwards;
}
.flyprice.is-visible .flyprice__sparkline-area {
    animation: flyprice-fade 1.2s ease forwards 1.4s;
}
.flyprice.is-visible .flyprice__sparkline-dot {
    animation: flyprice-dot .4s ease forwards 2.4s, flyprice-pulse 2.4s ease-in-out infinite 2.8s;
}
@keyframes flyprice-draw { to { stroke-dashoffset: 0; } }
@keyframes flyprice-fade { to { opacity: 1; } }
@keyframes flyprice-dot {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes flyprice-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, -50%) scale(1.35); }
}

/* Price bubble */
.flyprice__bubble {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: var(--fp-radius-sm);
    padding: 14px 22px 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
    transition: transform .25s ease, box-shadow .25s ease;
}
.flyprice__bubble.is-bumping { animation: flyprice-bump .55s cubic-bezier(.22,.61,.36,1); }
@keyframes flyprice-bump {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}

.flyprice__price-row { display: inline-flex; align-items: center; gap: 10px; }
.flyprice__price {
    font-size: 30px; font-weight: 800;
    color: var(--fp-accent);
    letter-spacing: -.015em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.flyprice__price .woocommerce-Price-currencySymbol { font-weight: 800; }

.flyprice__savings {
    display: inline-flex; align-items: center;
    padding: 4px 9px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    font-size: 12px; font-weight: 800;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(220,38,38,.25);
    font-variant-numeric: tabular-nums;
}
.flyprice__savings[hidden] { display: none; }

.flyprice__verified {
    font-size: 13px; color: var(--fp-text-soft); font-weight: 500;
    white-space: nowrap;
}
.flyprice__verified.is-flash {
    animation: flyprice-flash .9s ease;
}
@keyframes flyprice-flash {
    0%   { color: var(--fp-text-soft); }
    35%  { color: var(--fp-accent); transform: translateY(-1px); }
    100% { color: var(--fp-text-soft); }
}

/* Mobile */
@media (max-width: 600px) {
    .flyprice { padding: 22px 16px 18px; border-radius: 18px; }
    .flyprice__headline { font-size: 16px; }
    .flyprice__subline { font-size: 15px; }
    .flyprice__tagline { font-size: 13px; }
    .flyprice__chart-wrap { min-height: 100px; }
    .flyprice__sparkline-stage { height: 92px; }
    .flyprice__bubble { padding: 12px 18px 10px; }
    .flyprice__price { font-size: 26px; }
    .flyprice__savings { font-size: 11px; padding: 3px 8px; }
    .flyprice__verified { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .flyprice__sparkline-line { animation: none; stroke-dashoffset: 0; }
    .flyprice__sparkline-area { animation: none; opacity: 1; }
    .flyprice__sparkline-dot  { animation: none; opacity: 1; transform: none; }
    .flyprice__bubble.is-bumping { animation: none; }
    .flyprice__verified.is-flash { animation: none; }
}
