/* DermaStore — Sprays / longevity calculator UI.
   Self-contained, scoped to .dsc-* and .dermastore-sprays-trigger. */

/* Calculator trigger — matches the site's canonical button: white fill,
   2px black border, sharp corners, scale-up on hover. Mirrors the
   "Add to cart" / list-item action button defined in wossy_stylesheet.css
   so it reads as a first-class control rather than an afterthought. */
.dermastore-sprays-trigger {
    display: inline-block;
    margin: 0;
    padding: 8px 14px;
    font-family: 'futura-pt', 'Roboto Condensed', inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #000;
    background: #fff;
    border: 2px solid #000;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    transform: scale(1);
    transition: transform 120ms ease;
    white-space: nowrap;
}
.dermastore-sprays-trigger:hover,
.dermastore-sprays-trigger:focus {
    background: #fff;
    color: #000;
    text-decoration: none;
    transform: scale(1.05);
    outline: none;
}
.dermastore-sprays-trigger:active { transform: scale(1); }
.dermastore-sprays-trigger-icon {
    margin-right: 6px;
    font-size: 14px;
    line-height: 1;
    vertical-align: -1px;
}

/* Modal overlay */
.dsc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}
.dsc-overlay.is-open { display: flex; }
html.dsc-modal-open { overflow: hidden; }

.dsc-dialog {
    position: relative;
    background: #fff;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 28px 24px 22px;
    box-sizing: border-box;
}
.dsc-close {
    position: absolute;
    top: 6px; right: 8px;
    width: 30px; height: 30px;
    border: 0; background: transparent;
    font-size: 26px; line-height: 1;
    color: #777; cursor: pointer;
}
.dsc-close:hover { color: #000; }

/* Body */
.dsc-root {
    font-family: inherit;
    color: #1a1a1a;
    font-size: 14px;
}
.dsc-heading {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
}
.dsc-intro {
    margin: 0 0 16px;
    font-size: 13px;
    color: #555;
    line-height: 1.45;
}
.dsc-current { display: block; margin-top: 4px; color: #1a1a1a; }

/* Sliders */
.dsc-sliders { margin: 0 0 14px; }
.dsc-slider { margin: 0 0 12px; }
.dsc-slider-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}
.dsc-slider-label { font-size: 13px; color: #333; }
.dsc-slider-value {
    font-weight: 700;
    font-size: 14px;
    min-width: 22px;
    text-align: right;
    color: #111;
}
.dsc-slider-input {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    height: 4px;
    background: #d8d8d8;
    border-radius: 2px;
    outline: none;
}
.dsc-slider-input::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #1a1a1a;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.dsc-slider-input::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #1a1a1a;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* Warning box */
.dsc-warning-host:empty { display: none; }
.dsc-warn {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    margin: 10px 0 14px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.45;
    border: 1px solid transparent;
}
.dsc-warn-icon { font-size: 20px; line-height: 1; flex: 0 0 auto; margin-top: 1px; }
.dsc-warn-title { font-weight: 700; display: inline; }
.dsc-warn-body { display: inline; }
.dsc-warn-link {
    display: block;
    margin-top: 4px;
    text-decoration: underline;
    color: inherit;
}
.dsc-warn-yellow {
    background: #fffaeb;
    border-color: #f6d97a;
    color: #6b5500;
}
.dsc-warn-orange {
    background: #fff1e0;
    border-color: #f0a957;
    color: #7a3a00;
}
.dsc-warn-red {
    background: #fde8e8;
    border-color: #e07171;
    color: #6e1212;
}

/* Results */
.dsc-results-heading {
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.dsc-results { margin-bottom: 10px; }
.dsc-row {
    display: grid;
    grid-template-columns: minmax(120px, 1.2fr) minmax(80px, 2fr) auto;
    gap: 10px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 3px;
}
.dsc-row + .dsc-row { margin-top: 2px; }
.dsc-row-current { background: #f5f5f5; }
.dsc-row-label {
    font-size: 13px;
    color: #222;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dsc-row-link { color: #1a1a1a; text-decoration: underline; }
.dsc-row-pp { color: #888; font-size: 12px; }
.dsc-bar-wrap {
    background: #ececec;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}
.dsc-bar {
    background: linear-gradient(90deg, #6aa8c8, #2c6f8c);
    height: 100%;
    transition: width 200ms ease;
}
.dsc-row-current .dsc-bar { background: linear-gradient(90deg, #d4a45c, #8a5a18); }
.dsc-row-value {
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    color: #111;
    white-space: nowrap;
}

/* About */
.dsc-about {
    margin-top: 14px;
    font-size: 12px;
    color: #666;
}
.dsc-about summary {
    cursor: pointer;
    list-style: none;
    text-decoration: underline;
}
.dsc-about summary::-webkit-details-marker { display: none; }
.dsc-about-body { margin: 6px 0 0; }

@media (max-width: 480px) {
    .dsc-dialog { padding: 20px 16px 16px; }
    .dsc-row { grid-template-columns: 1fr; gap: 4px; }
    .dsc-bar-wrap { width: 100%; }
    .dsc-row-value { text-align: left; }
}

/* Related-products split (Phase L): the family-of-sizes block and the
   classic "Andra alternativ" block sit side-by-side on desktop and stack
   on mobile, with the family on top by virtue of DOM order. The inline
   template style sets flex-direction: column for mobile-first; this media
   query flips to row at the tablet breakpoint. */
@media (min-width: 768px) {
    .related-split-row {
        flex-direction: row !important;
        align-items: flex-start;
    }
}

/* Out-of-stock siblings (Phase M): mute the whole row with a single
   container-level opacity + grayscale filter so we don't risk opacity
   compounding via cascaded rules. CSS opacity does NOT cascade through
   inheritance - it composites the rendered output once at 0.55, and the
   filter applies at the rendering layer, so image, text, and inline
   pills all desaturate uniformly with zero per-element setup. Hover
   restores full colour so the customer can inspect the row cleanly. */
.box-bestsellers .item-best.oos {
    opacity: 0.55;
    filter: grayscale(100%);
    transition: opacity 160ms ease, filter 160ms ease;
}
.box-bestsellers .item-best.oos:hover {
    opacity: 1;
    filter: none;
}

/* Standalone (in-flow) widget on CMS info pages. Gives the same chrome as
   the modal dialog so the calculator reads as a self-contained card. */
.dsc-standalone {
    max-width: 640px;
    margin: 20px 0;
    padding: 22px 22px 18px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}
.dsc-standalone .dsc-heading { font-size: 20px; }
