/* RecodarServices_UnitSuite - base-price box.
 *
 * Colour slots: --rcs-us-label --rcs-us-value --rcs-us-content --rcs-us-box-bg --rcs-us-box-border
 */

.rcs-unitsuite {
    margin: 6px 0 0;
    font-family: var(--rcs-font-body, inherit);
    line-height: 1.4;
}

.rcs-unitsuite-row {
    display: block;
    font-size: 13px;
    color: var(--rcs-us-value, var(--rcs-color-secondary, #585858));
}

.rcs-unitsuite-row + .rcs-unitsuite-row {
    margin-top: 2px;
}

.rcs-unitsuite-label {
    font-weight: 500;
    color: var(--rcs-us-label, var(--rcs-price-old-color, #9CA3AF));
}

.rcs-unitsuite-value {
    font-weight: 600;
    color: var(--rcs-us-value, var(--rcs-color-secondary, #585858));
    white-space: nowrap;
}

/* Content line ("Inhalt: ...") gets its own colour slot. */
.rcs-unitsuite-content .rcs-unitsuite-value {
    color: var(--rcs-us-content, var(--rcs-color-secondary, #585858));
}

/* Inline preset stays on one line; parentheses come from the template. */
.rcs-unitsuite--inline .rcs-unitsuite-row {
    display: inline;
    font-size: 13px;
}

/* ── Product detail page ─────────────────────────────────────────────────── */

.rcs-unitsuite--product {
    margin-top: 8px;
}

.rcs-unitsuite--product .rcs-unitsuite-row {
    font-size: 14px;
}

.rcs-unitsuite--product.rcs-unitsuite--product_detail {
    padding: 8px 12px;
    border: 1px solid var(--rcs-us-box-border, var(--rcs-color-border, #E5E7EB));
    border-radius: 10px;
    background: var(--rcs-us-box-bg, #FAFAFA);
}

/* Two-column grid so the "Inhalt" and "Grundpreis" values line up in one
   column regardless of the (differently wide) labels. */
.rcs-unitsuite--product_detail {
    display: inline-grid;
    grid-template-columns: auto auto;
    column-gap: 10px;
    row-gap: 2px;
    align-items: baseline;
}

.rcs-unitsuite--product_detail .rcs-unitsuite-row {
    display: contents;
}

.rcs-unitsuite--product_detail .rcs-unitsuite-label,
.rcs-unitsuite--product_detail .rcs-unitsuite-value {
    min-width: 0;
    white-space: nowrap;
}

/* Legal / with-old-price: the base price value picks up the price colour. */
.rcs-unitsuite--legal .rcs-unitsuite-value,
.rcs-unitsuite--with_old_price .rcs-unitsuite-value {
    color: var(--rcs-us-value, var(--rcs-price-current-color, #1F2937));
}

/* ── Category / list tiles ───────────────────────────────────────────────── */
/* Compact and muted so it does not fight the tile price. */

.rcs-unitsuite--list {
    margin-top: 3px;
}

.rcs-unitsuite--list .rcs-unitsuite-row {
    font-size: 12px;
    color: var(--rcs-us-label, var(--rcs-price-old-color, #9CA3AF));
}

.rcs-unitsuite--list .rcs-unitsuite-value {
    font-weight: 500;
    color: var(--rcs-us-value, var(--rcs-price-old-color, #9CA3AF));
}

/* ── Live Search dropdown row ────────────────────────────────────────────── */
/* Narrow and beside a thumbnail; it must never push the price column out. */

.rcs-unitsuite--livesearch {
    margin-top: 2px;
    min-width: 0;
}

.rcs-unitsuite--livesearch .rcs-unitsuite-row {
    font-size: 12px;
    color: var(--rcs-us-label, var(--rcs-price-old-color, #9CA3AF));
}

.rcs-unitsuite--livesearch .rcs-unitsuite-value {
    font-weight: 500;
    color: var(--rcs-us-value, var(--rcs-price-old-color, #9CA3AF));
}

/* One line, cut off rather than wrapped: a second line moves every row below. */
.rcs-unitsuite--livesearch .rcs-unitsuite-row,
.rcs-unitsuite--livesearch .rcs-unitsuite-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The boxed preset has no room here; it renders as plain rows instead. */
.rcs-unitsuite--livesearch.rcs-unitsuite--product_detail {
    display: block;
    padding: 0;
    border: 0;
    background: none;
}

/* ── Cart / mini-cart / checkout line ────────────────────────────────────── */

.rcs-unitsuite--cart {
    margin-top: 3px;
}

.rcs-unitsuite--cart .rcs-unitsuite-row {
    font-size: 12px;
    color: var(--rcs-us-label, var(--rcs-price-old-color, #9CA3AF));
}

/* ── Optional "base price beside price" layout on the product page ────────── */
/* Box pinned top-right of the price container; set by unitsuite.js. */

.rcs-unitsuite-pricerow {
    position: relative;
}

.rcs-unitsuite-pricerow > .rcs-unitsuite[data-rcs-us-align="right"] {
    position: absolute;
    top: 0;
    right: 0;
    max-width: 55%;
    margin-top: 0;
}

@media (max-width: 768px) {
    .rcs-unitsuite-pricerow > .rcs-unitsuite[data-rcs-us-align="right"] {
        position: static;
        max-width: none;
        margin-top: 8px;
    }
}

/* ── Utility classes for custom templates ────────────────────────────────── */
/* Use these instead of inline styles inside a custom output template. */

.rcs-unitsuite .rcs-unitsuite-normal { font-weight: 400; }
.rcs-unitsuite .rcs-unitsuite-strong { font-weight: 700; }
.rcs-unitsuite .rcs-unitsuite-muted  { color: var(--rcs-us-label, var(--rcs-price-old-color, #9CA3AF)); }
.rcs-unitsuite .rcs-unitsuite-block  { display: block; }
