/*
 * Quick-add modal — catalog.json components.quickAddModal ("Greitas krepšelis"). Centered
 * overlay dialog, buy-box anatomy without accordions/related/SEO. Cart is P3 — the submit
 * button here is a disabled placeholder.
 */
.pv-quick-add-modal[hidden] {
    display: none;
}

.pv-quick-add-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-drawer);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3);
}

.pv-quick-add-modal__scrim {
    position: absolute;
    inset: 0;
    background: rgba(30, 30, 30, .6);
    animation: pv-fade-in .2s ease-out;
}

.pv-quick-add-modal__panel {
    position: relative;
    display: flex;
    /* Entrance replays on each open ([hidden] toggle; keyframe in base.css). */
    animation: pv-scale-in .2s ease-out;
    gap: var(--space-5);
    width: min(760px, 100%);
    padding: var(--space-5);
    background: var(--balta);
    border-radius: var(--radius-card);
}

.pv-quick-add-modal__close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.pv-quick-add-modal__media {
    flex: 0 0 215px;
}

.pv-quick-add-modal__media img {
    width: 215px;
    height: 397px;
    object-fit: contain;
}

.pv-quick-add-modal__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.pv-quick-add-modal__badge {
    color: var(--ryski-raudona);
    font-style: italic;
    font-weight: 600;
}

.pv-quick-add-modal__name {
    font-size: 20px;
    text-transform: uppercase;
}

.pv-quick-add-modal__price {
    display: flex;
    gap: var(--space-2);
    font-size: 18px;
    font-weight: 600;
}

.pv-quick-add-modal__meta {
    color: var(--sub-pilka);
}

.pv-quick-add-modal__description {
    font-size: 14px;
    line-height: 27px;
}

.pv-quick-add-modal__purchase-type[hidden] {
    display: none;
}

.pv-quick-add-modal__actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-3);
}

.pv-quick-add-modal__submit[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

/*
 * Mobile add-to-cart confirmation (client notes 2026-08-04 #13). A5 cut the mini-cart drawer
 * on ≤768px, so an add had no on-screen feedback at all; the cart stream appends this toast.
 * Dismissal is CSS-only — the stream removes any previous toast before appending the next one.
 */
.pv-cart-toast {
    display: none;
}

@keyframes pv-cart-toast-out {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@media (max-width: 768px) {
    .pv-quick-add-modal {
        align-items: flex-start;
    }

    .pv-quick-add-modal__panel {
        flex-direction: column;
        align-items: center;
        max-height: calc(100dvh - var(--space-3) * 2);
        overflow-y: auto;
    }

    /* 44px hit area around the unchanged 13px glyph: the offsets pull back the extra 6px. */
    .pv-quick-add-modal__close {
        top: calc(var(--space-3) - 6px);
        right: calc(var(--space-3) - 6px);
        width: 44px;
        height: 44px;
    }

    .pv-quick-add-modal__media img {
        width: auto;
        height: min(38vh, 397px);
    }

    .pv-quick-add-modal__actions {
        flex-wrap: wrap;
    }

    .pv-quick-add-modal__submit {
        flex: 1 0 100%;
        white-space: nowrap;
    }

    .pv-cart-toast {
        position: fixed;
        right: var(--space-3);
        bottom: var(--space-3);
        left: var(--space-3);
        z-index: var(--z-drawer);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-3);
        padding: var(--space-2) var(--space-3);
        border-radius: var(--radius-card);
        background: var(--juoda);
        color: var(--balta);
        animation: pv-fade-in .2s ease-out, pv-cart-toast-out .3s ease-in 4s forwards;
    }

    .pv-cart-toast__text {
        font-size: 14px;
    }

    .pv-cart-toast__link {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        color: var(--balta);
        font-size: 14px;
        font-weight: 600;
        text-decoration: underline;
        white-space: nowrap;
    }
}
