/**
 * TieredPrice frontend – Staffeltabelle (table + blocks), aktive Zeile,
 * Odometer-Preisanimation. Akzentfarbe via --pc-tp-accent (Inline-Style).
 */

.pc-tieredprice { margin: 18px 0; }
.pc-tieredprice__title { font-weight: 700; margin: 0 0 8px; }

/* Layout: Tabelle */
.pc-tieredprice__table { width: auto; min-width: 300px; border-collapse: collapse; }
.pc-tieredprice__table th,
.pc-tieredprice__table td {
    border: 1px solid #e2e4e7;
    padding: 8px 16px;
    text-align: left;
    font-size: 14px;
}
.pc-tieredprice__table thead th {
    background: color-mix(in srgb, var(--pc-tp-accent, #007cba) 8%, #fff);
    font-weight: 700;
}
.pc-tieredprice--table .pc-tieredprice__row.is-active td {
    background: color-mix(in srgb, var(--pc-tp-accent, #007cba) 12%, #fff);
    font-weight: 700;
}
.pc-tp-col-saving { color: var(--pc-tp-accent, #007cba); font-weight: 600; white-space: nowrap; }

/* Layout: Kacheln */
.pc-tieredprice__blocks { display: flex; gap: 10px; flex-wrap: wrap; }
.pc-tieredprice__block {
    border: 2px solid #e2e4e7;
    border-radius: 10px;
    padding: 10px 16px;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    min-width: 96px;
    font-size: 13px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.pc-tieredprice__block .pc-tp-block-price { font-weight: 700; font-size: 15px; }
.pc-tieredprice__block .pc-tp-block-saving {
    background: var(--pc-tp-accent, #007cba); color: #fff;
    font-size: 11px; border-radius: 10px; padding: 1px 8px; margin-top: 4px;
}
.pc-tieredprice--blocks .pc-tieredprice__row.is-active {
    border-color: var(--pc-tp-accent, #007cba);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc-tp-accent, #007cba) 20%, transparent);
}

/* Aktiv-Puls beim Wechsel */
@keyframes pc-tp-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pc-tp-accent, #007cba) 45%, transparent); }
    100% { box-shadow: 0 0 0 10px transparent; }
}
.pc-tieredprice__row.is-active { animation: pc-tp-pulse .45s ease-out 1; }

.pc-tieredprice__hint { color: #6b7280; font-size: 13px; font-style: italic; }

/* Preis-Wrapper + Durchstreichen */
.pc-tp-price .pc-tp-del { opacity: .6; margin-right: 6px; }
.pc-tp-price .pc-tp-ins { text-decoration: none; color: var(--pc-tp-accent, #007cba); }

/* Odometer (mechanische Ziffernrollen) */
.pc-odo {
    display: inline-flex;
    align-items: baseline;
    white-space: pre;
}
.pc-odo.pc-odo-swap { opacity: 0; transition: opacity .05s linear; }
.pc-odo-static { display: inline-block; }
.pc-odo-digit {
    display: inline-block;
    overflow: hidden;
    height: 1em;
    line-height: 1;
    vertical-align: baseline;
}
.pc-odo-strip {
    display: flex;
    flex-direction: column;
    transition: transform .5s cubic-bezier(.25, .6, .3, 1);
    will-change: transform;
}
.pc-odo-strip > span {
    display: block;
    height: 1em;
    line-height: 1;
}

/* Animation abschaltbar / Barrierefreiheit */
.pc-tieredprice--no-anim ~ * .pc-odo-strip,
.pc-tieredprice--no-anim .pc-odo-strip { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
    .pc-odo-strip { transition: none !important; }
    .pc-tieredprice__row.is-active { animation: none; }
}
