/* =========================================================
   DSN Powerall — Frontend Stock Display
   All selectors are prefixed with .dsn-stock to avoid
   conflicts. Override freely in your child theme stylesheet.
   ========================================================= */

/* --- Shared -------------------------------------------- */
.dsn-stock {
    font-size: 0.9em;
    margin: 0.75em 0;
}

/* --- List ---------------------------------------------- */
.dsn-stock__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dsn-stock__item {
    padding: 3px 0;
    line-height: 1.5;
}

.dsn-stock__location-name {
    font-weight: 600;
}

.dsn-stock__qty {
    font-weight: 700;
}

.dsn-stock__label {
    color: #555;
}

/* --- Combined ------------------------------------------ */
.dsn-stock--combined {
    line-height: 1.5;
}

/* --- "View more" link ---------------------------------- */
.dsn-stock__view-more {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.875em;
}

/* --- Modal overlay ------------------------------------- */
.dsn-stock-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsn-stock-modal[hidden] {
    display: none;
}

.dsn-stock-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

/* --- Modal box ----------------------------------------- */
.dsn-stock-modal__box {
    position: relative;
    background: #fff;
    border-radius: 6px;
    padding: 28px 32px 24px;
    width: min(420px, 90vw);
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.dsn-stock-modal__title {
    margin: 0 0 14px;
    font-size: 1.05em;
    font-weight: 600;
}

.dsn-stock-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 4px 8px;
}

.dsn-stock-modal__close:hover {
    color: #222;
}

/* Inside the modal the same list styles apply */
.dsn-stock-modal__box .dsn-stock__item {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.dsn-stock-modal__box .dsn-stock__item:last-child {
    border-bottom: none;
}
