/**
 * Amelia – Old Prices
 *
 * Everything is driven by CSS variables. The values below are just the
 * fallback defaults – the plugin's Appearance panel (Settings → Old Prices)
 * writes the active values as an inline :root{...} block after this file,
 * so most people never need to touch this CSS at all. Overriding it from
 * the theme still works the same way, e.g.:
 *
 *   :root {
 *       --am-old-price-color: #c0392b;
 *       --am-old-price-line: line-through;   // re-enable the strikethrough
 *   }
 */

:root {
    --am-old-price-color: inherit;
    --am-old-price-opacity: 1;
    --am-old-price-size: .9em;
    --am-old-price-weight: inherit;
    --am-old-price-gap: 8px;
    --am-old-price-line: none;

    --am-old-price-note-color: inherit;
    --am-old-price-note-opacity: .55;
    --am-old-price-note-size: .72em;
}

/* Old price */
.am-old-price {
    color: var(--am-old-price-color);
    opacity: var(--am-old-price-opacity);
    font-size: var(--am-old-price-size);
    font-weight: var(--am-old-price-weight);
    margin-right: var(--am-old-price-gap);
    text-decoration: var(--am-old-price-line);
    white-space: nowrap;
}

/* Date note below the item */
.am-old-price-note {
    display: block;
    width: 100%;
    color: var(--am-old-price-note-color);
    opacity: var(--am-old-price-note-opacity);
    font-size: var(--am-old-price-note-size);
    line-height: 1.2;
    margin-top: 2px;
    text-decoration: none;
}

/* The cascader item is a flex row – this keeps the price on one line and
   lets the date note wrap onto its own row. */
.am-adv-select__item {
    flex-wrap: wrap;
}

.am-adv-select__item .am-adv-select__item-price {
    white-space: nowrap;
}

/* Cart: the old price sits inside the same small price box as the current
   price, so it needs to lay out inline with it rather than the box's own
   (unrelated) internal spacing rules. The "+VAT" box next to it is a
   separate sibling element and is untouched by this. The date note isn't
   rendered here at all (too little room) – it's only a title tooltip. */
.am-fs__cserv-price:not(.am-fs__cserv-tax) {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}

/* Narrow screens – shrink the old price so it does not push the current one
   out of the item. */
@media (max-width: 480px) {
    :root {
        --am-old-price-size: .82em;
        --am-old-price-gap: 5px;
    }
}
