/* "W koszyku" panel after adding to the cart, and the screen reader
   announcement: the poster page, the set page and the gift card page. */

/* Read by screen readers only (the "Dodano do koszyka" announcement). */
.pb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.pb-sticky__cta:disabled {
    opacity: .6;
    cursor: progress;
}

/* ---- After an add: panel instead of the side cart ---------- */

.pb-added {
    position: fixed;
    z-index: 395;
    top: 96px;
    right: 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "thumb text close"
        "thumb set set"
        "thumb actions actions";
    gap: 6px 14px;
    width: min(440px, calc(100vw - 32px));
    padding: 16px 16px 16px 18px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #E5DED2;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(35, 35, 31, .12);
    animation: pb-added-in .2s ease;
}

.pb-added[hidden] {
    display: none;
}

@keyframes pb-added-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .pb-added {
        animation: none;
    }
}

.pb-added__thumb {
    grid-area: thumb;
    width: 48px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
}

.pb-added__text {
    grid-area: text;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pb-added__title {
    font-size: 15px;
    color: var(--color-heading);
}

.pb-added__config {
    font-size: 14px;
    color: #6B6A62;
}

.pb-added__actions {
    grid-area: actions;
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.pb-added__btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--color-primary);
    border-radius: 8px;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.pb-added__btn--primary {
    background: var(--color-primary);
    color: #fff;
}

.pb-added__btn:hover {
    border-color: var(--color-primary-dark);
    color: var(--color-primary-dark);
}

.pb-added__btn--primary:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

.pb-added__close {
    grid-area: close;
    align-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: -6px -6px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6B6A62;
    cursor: pointer;
}

.pb-added__close:hover {
    background: var(--color-surface-warm);
}

/* Fixed to the window: no page margins (WoodMart gives content children
   a bottom margin, which lifted it off the screen edge). */
.pb-added {
    margin: 0;
}

/* WoodMart gives every <button> its grey box; the poster page happened to
   reset it, the gift card page does not. */
.pb-added button.pb-added__close {
    min-height: 0;
    background: transparent !important;
    box-shadow: none;
    color: #6B6A62 !important;
}
.pb-added button.pb-added__close svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
}
.pb-added button.pb-added__close:hover {
    background: var(--color-surface-warm) !important;
}

.pb-added__btn:focus-visible,
.pb-added__close:focus-visible {
    outline: 3px solid var(--color-heading);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    /* A bottom sheet on phones, above the sticky bar. */
    .pb-added {
        top: auto;
        right: 16px;
        left: 16px;
        bottom: 16px;
        width: auto;
        /* The set line and the buttons take the full width under the
           thumbnail: beside it, "Przejdź do kasy" broke over two lines. */
        grid-template-areas:
            "thumb text close"
            "set set set"
            "actions actions actions";
    }

    .pb-added__btn {
        white-space: nowrap;
    }

    body.pb-has-sticky .pb-added {
        bottom: 88px;
    }
}
