/*
 * Dentool Sync — the sold marker on the webshop.
 *
 * Two things are styled here: the stamp that sits on the product image (both in the stock list and
 * on the product page) and the notice inside the product summary. Everything is scoped under
 * .dentool-sold / .dentool-sold-notice, so the file cannot touch a product that is still for sale.
 *
 * Colours follow the Total child theme: #d21249 is the theme's button red, #f7f7f7 its light panel
 * background. Buttons are square, uppercase and letter-spaced like the theme's own.
 *
 * The stamp is a ::before on the element WooCommerce's post_class() marks, which is the <li> in the
 * loop and the wrapping <div> on the product page. That deliberately avoids hooking into the theme's
 * gallery markup: the class always lands, whatever template the theme renders. Its text comes from
 * an inline rule printed by the plugin, because it has to be in the language of the page.
 */

.dentool-sold {
    position: relative;
}

.dentool-sold::before {
    /* content is set per language in the inline rule the plugin prints. */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 6;
    display: block;
    padding: 8px 14px;
    background: #1c1c1c;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    /* The stamp is decoration over the image; it must never swallow a click on the product link. */
    pointer-events: none;
}

.dentool-sold-notice {
    margin: 0 0 24px;
    padding: 20px 22px;
    border-left: 4px solid #d21249;
    background: #f7f7f7;
    color: #222;
}

.dentool-sold-notice__heading {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.dentool-sold-notice__text {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.6;
}

.dentool-sold-notice__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
}

.dentool-sold-notice__button,
.dentool-sold-notice__button:visited {
    display: inline-block;
    padding: 12px 22px;
    background: #d21249;
    border: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
}

.dentool-sold-notice__button:hover,
.dentool-sold-notice__button:focus {
    background: #a90e3a;
    color: #fff;
    text-decoration: none;
}

.dentool-sold-notice__link,
.dentool-sold-notice__link:visited {
    color: #d21249;
    font-size: 14px;
    text-decoration: underline;
}

.dentool-sold-notice__link:hover,
.dentool-sold-notice__link:focus {
    color: #a90e3a;
}

/*
 * The theme's own "Forespørgsel på pris" button on a sold machine.
 *
 * Matched on the class prefix because the theme names it per language (get_price_da / _en / _de).
 * Only ever hidden on a single product page the plugin has marked sold, and only while the
 * dentool_sync_hide_price_button_when_sold filter says so — the body class is not printed otherwise,
 * so this rule then matches nothing.
 */
.dentool-product-sold [class*="get_price_"] {
    display: none !important;
}
