/* ============================================================================
   SiteHQ Shopping Lists — frontend stylesheet
   ============================================================================
   Scoped to the .shq-sl-* class prefix so we don't fight the theme.
   Brand: #5C068C purple, leaf-shape corner on primary CTAs.
   Phase 5 will refine spacing, mobile breakpoints, and the modal styling
   (which is Phase 4's deliverable).
   ============================================================================ */

:root {
    --shq-sl-primary:       #5C068C;
    --shq-sl-primary-hover: #4A0570;
    --shq-sl-primary-soft:  #f3e6fa;
    --shq-sl-warning:       #fedd00;
    --shq-sl-danger:        #c0392b;
    --shq-sl-success:       #2ca87f;
    --shq-sl-border:        #d8d8d8;
    --shq-sl-bg-card:       #ffffff;
    --shq-sl-bg-soft:       #f7f7f7;
    --shq-sl-text:          #1f1f1f;
    --shq-sl-muted:         #666666;
}

/* ============================================================================
   Account page container
   ============================================================================ */
.shq-sl-account {
    font-family: inherit;
    color: var(--shq-sl-text);
}
.shq-sl-account__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 14px;
}
.shq-sl-account__title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: var(--shq-sl-primary);
    display: flex;
    align-items: center;
    gap: 14px;
}
.shq-sl-account__title-text { display: inline-block; }
.shq-sl-account__actions {
    display: flex;
    gap: 8px;
}
.shq-sl-account__intro {
    margin: 0 0 24px;
    color: var(--shq-sl-muted);
    font-size: 14px;
}

.shq-sl-back-link {
    display: inline-block;
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--shq-sl-primary);
    text-decoration: none;
}
.shq-sl-back-link:hover { text-decoration: underline; }

/* ============================================================================
   Buttons (shared)
   ============================================================================ */
.shq-sl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: transparent;
    color: var(--shq-sl-text);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: background 150ms ease-in, color 150ms ease-in, border-color 150ms ease-in;
    line-height: 1.2;
}
.shq-sl-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.shq-sl-btn__icon { font-weight: 400; font-size: 16px; line-height: 1; }

.shq-sl-btn--primary {
    background: var(--shq-sl-primary);
    color: #ffffff;
    border-color: var(--shq-sl-primary);
    border-bottom-right-radius: 24px 24px; /* leaf-shape corner */
}
.shq-sl-btn--primary:hover:not(:disabled) {
    background: var(--shq-sl-primary-hover);
    border-color: var(--shq-sl-primary-hover);
    color: #ffffff;
}

.shq-sl-btn--secondary {
    background: #ffffff;
    color: var(--shq-sl-primary);
    border-color: var(--shq-sl-primary);
}
.shq-sl-btn--secondary:hover:not(:disabled) {
    background: var(--shq-sl-primary-soft);
    color: var(--shq-sl-primary);
}

.shq-sl-btn--ghost {
    color: var(--shq-sl-muted);
    background: transparent;
    border-color: transparent;
}
.shq-sl-btn--ghost:hover:not(:disabled) {
    color: var(--shq-sl-primary);
    background: var(--shq-sl-bg-soft);
}

.shq-sl-btn--danger.shq-sl-btn--ghost:hover:not(:disabled) {
    color: var(--shq-sl-danger);
    background: rgba(192, 57, 43, 0.06);
}

.shq-sl-btn--icon {
    padding: 4px 8px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
    font-weight: 600;
}

/* ============================================================================
   List-of-lists view
   ============================================================================ */
.shq-sl-list-cards {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}
.shq-sl-list-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--shq-sl-bg-card);
    border: 1px solid var(--shq-sl-border);
    border-radius: 6px;
    transition: border-color 150ms ease-in, box-shadow 150ms ease-in;
}
.shq-sl-list-card:hover {
    border-color: var(--shq-sl-primary);
    box-shadow: 0 2px 6px rgba(92, 6, 140, 0.08);
}
.shq-sl-list-card__link {
    flex: 1 1 auto;
    color: inherit;
    text-decoration: none;
}
.shq-sl-list-card__title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: var(--shq-sl-primary);
}
.shq-sl-list-card__meta {
    color: var(--shq-sl-muted);
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}
.shq-sl-list-card__sep { color: var(--shq-sl-border); }
.shq-sl-list-card__actions {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ============================================================================
   Single-list edit view: items
   ============================================================================ */
.shq-sl-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}
.shq-sl-item {
    display: grid;
    grid-template-columns: 28px 60px 1fr 90px 40px;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: var(--shq-sl-bg-card);
    border: 1px solid var(--shq-sl-border);
    border-radius: 6px;
    transition: border-color 150ms ease-in;
}
.shq-sl-item--oos {
    opacity: 0.65;
    background: var(--shq-sl-bg-soft);
}
.shq-sl-item--missing {
    opacity: 0.5;
    background: var(--shq-sl-bg-soft);
}
.shq-sl-item--placeholder {
    background: var(--shq-sl-primary-soft);
    border-style: dashed;
    border-color: var(--shq-sl-primary);
    visibility: visible !important;
}

.shq-sl-item__handle {
    cursor: grab;
    color: var(--shq-sl-muted);
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    text-align: center;
    user-select: none;
}
.shq-sl-item__handle:active { cursor: grabbing; }
.shq-sl-item__handle:hover { color: var(--shq-sl-primary); }

.shq-sl-item__image {
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--shq-sl-bg-soft);
}
.shq-sl-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.shq-sl-item__image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--shq-sl-primary-soft) 0%, #ffffff 100%);
}

.shq-sl-item__body { min-width: 0; }
.shq-sl-item__name {
    display: block;
    font-weight: 700;
    color: var(--shq-sl-text);
    text-decoration: none;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shq-sl-item__name:hover { color: var(--shq-sl-primary); }
.shq-sl-item__meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--shq-sl-muted);
}
.shq-sl-item__price { color: var(--shq-sl-text); }

.shq-sl-item__qty {
    text-align: right;
}
.shq-sl-item__qty-input {
    width: 70px;
    text-align: center;
    padding: 6px 8px;
    border: 1px solid var(--shq-sl-border);
    border-radius: 4px;
    font-size: 14px;
}
.shq-sl-item__qty-input:focus {
    outline: none;
    border-color: var(--shq-sl-primary);
    box-shadow: 0 0 0 2px var(--shq-sl-primary-soft);
}

/* ============================================================================
   Badges
   ============================================================================ */
.shq-sl-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.shq-sl-badge--in-stock {
    background: rgba(44, 168, 127, 0.1);
    color: var(--shq-sl-success);
}
.shq-sl-badge--oos {
    background: rgba(192, 57, 43, 0.1);
    color: var(--shq-sl-danger);
}
.shq-sl-badge--missing {
    background: rgba(102, 102, 102, 0.15);
    color: var(--shq-sl-muted);
}
.shq-sl-badge--bundle, .shq-sl-badge--variation {
    background: var(--shq-sl-primary-soft);
    color: var(--shq-sl-primary);
}

/* ============================================================================
   Empty / no-access states
   ============================================================================ */
.shq-sl-empty, .shq-sl-no-access, .shq-sl-account-error {
    padding: 28px;
    background: var(--shq-sl-bg-soft);
    border: 1px dashed var(--shq-sl-border);
    border-radius: 6px;
    text-align: center;
    color: var(--shq-sl-muted);
}
.shq-sl-empty p, .shq-sl-no-access p { margin: 0 0 8px; }
.shq-sl-empty p:last-child, .shq-sl-no-access p:last-child { margin-bottom: 0; }

/* ============================================================================
   Toasts
   ============================================================================ */
.shq-sl-toast-host {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}
.shq-sl-toast {
    padding: 12px 22px;
    background: var(--shq-sl-text);
    color: #ffffff;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 200ms ease-out, opacity 200ms ease-out;
    pointer-events: auto;
}
.shq-sl-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}
.shq-sl-toast--success { background: var(--shq-sl-success); }
.shq-sl-toast--error   { background: var(--shq-sl-danger); }
.shq-sl-toast--info    { background: var(--shq-sl-primary); }

/* ============================================================================
   Product page button placeholder (Phase 4 will replace)
   ============================================================================ */
.shq-shopping-lists-button-wrap { margin-top: 10px; }
.shq-sl-add-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    background: var(--shq-sl-primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid var(--shq-sl-primary);
    border-bottom-right-radius: 24px 24px;
    cursor: pointer;
    transition: background 150ms ease-in;
}
.shq-sl-add-button:hover:not(:disabled) {
    background: var(--shq-sl-primary-hover);
    border-color: var(--shq-sl-primary-hover);
}
.shq-sl-add-button:disabled { cursor: not-allowed; opacity: 0.5; }

#shq-shopping-lists-modal-root[hidden] { display: none !important; }

/* ============================================================================
   Modal — Phase 4
   ============================================================================ */
.shq-sl-modal {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease-out;
}
.shq-sl-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}
.shq-sl-modal[hidden] {
    display: none !important;
}
body.shq-sl-modal-open {
    overflow: hidden;
}

.shq-sl-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.shq-sl-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 200ms ease-out;
    outline: none;
}
.shq-sl-modal.is-open .shq-sl-modal__dialog {
    transform: translateY(0);
}

.shq-sl-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--shq-sl-border);
    background: linear-gradient(135deg, #ffffff 0%, var(--shq-sl-primary-soft) 100%);
}
.shq-sl-modal__title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--shq-sl-primary);
}
.shq-sl-modal__close {
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: var(--shq-sl-muted);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 150ms ease-in, color 150ms ease-in;
}
.shq-sl-modal__close:hover {
    background: var(--shq-sl-bg-soft);
    color: var(--shq-sl-primary);
}

/* ----- Staged item preview ----- */
.shq-sl-modal__staged {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    background: var(--shq-sl-bg-soft);
    border-bottom: 1px solid var(--shq-sl-border);
}
.shq-sl-modal__staged-image {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--shq-sl-border);
}
.shq-sl-modal__staged-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.shq-sl-modal__staged-body {
    flex: 1 1 auto;
    min-width: 0;
}
.shq-sl-modal__staged-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--shq-sl-text);
}
.shq-sl-modal__staged-meta {
    font-size: 13px;
    color: var(--shq-sl-muted);
    margin-top: 2px;
}

/* ----- Staged item quantity stepper ----- */
.shq-sl-modal__staged-qty {
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.shq-sl-modal__staged-qty-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--shq-sl-muted);
}
.shq-sl-qty-stepper {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--shq-sl-border);
    border-radius: 6px;
    background: var(--shq-sl-bg-card);
    overflow: hidden;
}
.shq-sl-qty-stepper__btn {
    width: 32px;
    padding: 0;
    border: 0;
    background: var(--shq-sl-bg-card);
    color: var(--shq-sl-primary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.shq-sl-qty-stepper__btn:hover { background: var(--shq-sl-primary-soft); }
.shq-sl-qty-stepper__btn:active { background: var(--shq-sl-primary-soft); }
.shq-sl-qty-stepper__btn:focus-visible {
    outline: 2px solid var(--shq-sl-primary);
    outline-offset: -2px;
}
.shq-sl-qty-stepper__input {
    width: 46px;
    padding: 6px 0;
    border: 0;
    border-left: 1px solid var(--shq-sl-border);
    border-right: 1px solid var(--shq-sl-border);
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--shq-sl-text);
    background: var(--shq-sl-bg-card);
    -moz-appearance: textfield;
    appearance: textfield;
}
.shq-sl-qty-stepper__input:focus {
    outline: none;
    background: var(--shq-sl-primary-soft);
}
/* Hide the native number-input spinners — the −/+ buttons replace them. */
.shq-sl-qty-stepper__input::-webkit-outer-spin-button,
.shq-sl-qty-stepper__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ----- Views ----- */
.shq-sl-modal__view {
    padding: 22px;
}
.shq-sl-modal__lead {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--shq-sl-text);
}
.shq-sl-modal__cta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ----- Create-list inline form ----- */
.shq-sl-modal__create {
    padding: 14px 22px;
    border-bottom: 1px solid var(--shq-sl-border);
}
.shq-sl-modal__create-toggle {
    background: transparent;
    border: 1px dashed var(--shq-sl-primary);
    color: var(--shq-sl-primary);
    padding: 10px 16px;
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background 150ms ease-in;
}
.shq-sl-modal__create-toggle:hover {
    background: var(--shq-sl-primary-soft);
}
.shq-sl-modal__create-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--shq-sl-border);
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}
.shq-sl-modal__create-input:focus {
    outline: none;
    border-color: var(--shq-sl-primary);
    box-shadow: 0 0 0 2px var(--shq-sl-primary-soft);
}
.shq-sl-modal__create-row {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ----- List rows inside the modal ----- */
.shq-sl-modal__lists {
    max-height: 360px;
    overflow-y: auto;
}
.shq-sl-modal__lists-loading,
.shq-sl-modal__empty {
    padding: 28px 22px;
    text-align: center;
    color: var(--shq-sl-muted);
}
.shq-sl-modal__list-rows {
    list-style: none;
    padding: 0;
    margin: 0;
}
.shq-sl-modal__list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--shq-sl-border);
    cursor: pointer;
    transition: background 150ms ease-in;
}
.shq-sl-modal__list-row:last-child {
    border-bottom: 0;
}
.shq-sl-modal__list-row:hover,
.shq-sl-modal__list-row:focus {
    background: var(--shq-sl-primary-soft);
    outline: none;
}
.shq-sl-modal__list-row-title {
    font-weight: 700;
    color: var(--shq-sl-text);
}
.shq-sl-modal__list-row-meta {
    font-size: 12px;
    color: var(--shq-sl-muted);
    margin-top: 2px;
}
.shq-sl-modal__list-row-action {
    color: var(--shq-sl-primary);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}
.shq-sl-modal__list-row-action--in-list {
    color: var(--shq-sl-success);
    letter-spacing: 0.02em;
}
.shq-sl-modal__list-row--in-list {
    background: rgba(44, 168, 127, 0.05);
}

/* ----- Mobile ----- */
@media (max-width: 600px) {
    .shq-sl-modal {
        padding: 0;
        align-items: flex-end;
    }
    .shq-sl-modal__dialog {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 12px 12px 0 0;
        transform: translateY(100%);
    }
    .shq-sl-modal.is-open .shq-sl-modal__dialog {
        transform: translateY(0);
    }
}

/* ============================================================================
   Dirty-qty indicator — row has been edited but not yet saved
   ============================================================================ */
.shq-sl-item--dirty {
    border-left: 3px solid var(--shq-sl-warning);
    padding-left: calc(16px - 3px); /* keep content aligned */
}
.shq-sl-item--dirty .shq-sl-item__qty-input {
    border-color: var(--shq-sl-warning);
    box-shadow: 0 0 0 2px rgba(254, 221, 0, 0.25);
}

/* ============================================================================
   My Account edit-view footer — total + save + add-all-to-cart
   ============================================================================ */
.shq-sl-account-footer {
    margin-top: 28px;
    padding: 20px 24px;
    background: var(--shq-sl-bg-card);
    border: 1px solid var(--shq-sl-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.shq-sl-account-footer__total {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.shq-sl-total__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--shq-sl-muted);
}
.shq-sl-total__amount {
    font-size: 26px;
    font-weight: 700;
    color: var(--shq-sl-primary);
    line-height: 1.1;
}
.shq-sl-total__note {
    font-size: 12px;
    color: var(--shq-sl-muted);
}
.shq-sl-account-footer__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .shq-sl-account-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .shq-sl-account-footer__actions {
        flex-direction: column;
    }
}

/* ============================================================================
   Added-confirmation view (shown after a product is saved to a list)
   ============================================================================ */
.shq-sl-modal__view--added {
    text-align: center;
    padding: 32px 22px;
}
.shq-sl-modal__added-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(44, 168, 127, 0.12);
    color: var(--shq-sl-success);
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 16px;
}
.shq-sl-modal__added-message {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--shq-sl-text);
    margin: 0 0 6px;
}
.shq-sl-modal__added-message strong {
    font-weight: 700;
}
.shq-sl-modal__cta-row--centred {
    justify-content: center;
    margin-top: 20px;
}
.shq-sl-modal__added-back {
    display: block;
    margin: 14px auto 0;
    background: none;
    border: none;
    padding: 0;
    color: var(--shq-sl-primary);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}
.shq-sl-modal__added-back:hover {
    color: var(--shq-sl-primary-hover);
}

/* ============================================================================
   Confirm / prompt dialog (Phase 5) — branded replacement for window.confirm
   / window.prompt. Sits above the main modal so it can be opened from any
   context (My Account views or over the modal itself).
   ============================================================================ */
.shq-sl-dialog {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease-out;
}
.shq-sl-dialog.is-open {
    opacity: 1;
    pointer-events: auto;
}
.shq-sl-dialog[hidden] {
    display: none !important;
}
body.shq-sl-dialog-open {
    overflow: hidden;
}

.shq-sl-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.shq-sl-dialog__panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--shq-sl-bg-card);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 22px;
    transform: translateY(20px);
    transition: transform 200ms ease-out;
    outline: none;
}
.shq-sl-dialog.is-open .shq-sl-dialog__panel {
    transform: translateY(0);
}

.shq-sl-dialog__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--shq-sl-primary);
}
.shq-sl-dialog__message {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--shq-sl-text);
}

.shq-sl-dialog__input-wrap {
    margin: 0 0 16px;
}
.shq-sl-dialog__input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--shq-sl-border);
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}
.shq-sl-dialog__input:focus {
    outline: none;
    border-color: var(--shq-sl-primary);
    box-shadow: 0 0 0 2px var(--shq-sl-primary-soft);
}

.shq-sl-dialog__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Destructive variant of the primary button — red leaf-shape CTA used for
   delete / remove confirmations. */
.shq-sl-btn--danger-primary {
    background: var(--shq-sl-danger);
    color: #ffffff;
    border-color: var(--shq-sl-danger);
    border-bottom-right-radius: 24px 24px; /* leaf-shape corner */
}
.shq-sl-btn--danger-primary:hover:not(:disabled) {
    background: #a93226;
    border-color: #a93226;
    color: #ffffff;
}

/* ----- Mobile bottom-sheet ----- */
@media (max-width: 600px) {
    .shq-sl-dialog {
        padding: 0;
        align-items: flex-end;
    }
    .shq-sl-dialog__panel {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        transform: translateY(100%);
    }
    .shq-sl-dialog.is-open .shq-sl-dialog__panel {
        transform: translateY(0);
    }
}

/* ============================================================================
   Mobile (< 600px): tighter, single-column-ish stacks
   ============================================================================ */
@media (max-width: 600px) {
    .shq-sl-list-card {
        flex-wrap: wrap;
    }
    .shq-sl-list-card__actions {
        flex-basis: 100%;
        flex-wrap: wrap;
    }
    .shq-sl-item {
        grid-template-columns: 24px 48px 1fr;
        grid-template-rows: auto auto;
        gap: 8px 10px;
    }
    .shq-sl-item__handle    { grid-column: 1; grid-row: 1 / span 2; }
    .shq-sl-item__image     { grid-column: 2; grid-row: 1 / span 2; width: 48px; height: 48px; }
    .shq-sl-item__body      { grid-column: 3; grid-row: 1; }
    .shq-sl-item__qty       { grid-column: 3; grid-row: 2; text-align: left; }
    .shq-sl-item__qty-input { width: 64px; }
    .shq-sl-item .shq-sl-btn--danger {
        position: absolute;
        top: 8px;
        right: 8px;
    }
    .shq-sl-item { position: relative; }
}

/* ── Modal loading state ──────────────────────────────────────── */
.shq-sl-modal__dialog { position: relative; }

.shq-sl-modal__spinner {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    overflow: hidden;
    z-index: 10;
    border-radius: 3px 3px 0 0;
}
.shq-sl-modal__spinner::after {
    content: '';
    display: block;
    height: 100%;
    width: 40%;
    background: var(--shq-primary, #4a0080);
    border-radius: 3px;
    animation: shqSlSpin 1s ease-in-out infinite;
}
@keyframes shqSlSpin {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

.shq-sl-modal__dialog.is-loading .shq-sl-modal__spinner { display: block; }
.shq-sl-modal__dialog.is-loading { pointer-events: none; }
