/* Post Guard: Product Action Buttons — frontend
 *
 * Selectors target both the legacy wrapper class (.bpt-action-buttons-wrapper)
 * and the plugin-owned class (.pgpab-wrapper) so styling is independent of
 * any theme/plugin renames.
 */

/* ── Unified action row ──────────────────────────────────────────────── */
.single-product .summary .bpt-action-buttons-wrapper,
.single-product .summary .pgpab-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 12px 0 16px;
    gap: 0;
    line-height: 1;
}

/* ── Every direct child of the row ───────────────────────────────────── */
.single-product .summary .bpt-action-buttons-wrapper > *,
.single-product .summary .pgpab-wrapper > * {
    display: inline-flex !important;
    align-items: center !important;
    position: relative;
    padding: 0 0 0 14px;
    margin: 4px 0 !important;
    flex-shrink: 0;
}

.single-product .summary .bpt-action-buttons-wrapper > *:first-child,
.single-product .summary .pgpab-wrapper > *:first-child {
    padding-left: 0;
}

/* Pipe BEFORE every item except the first */
.single-product .summary .bpt-action-buttons-wrapper > *::before,
.single-product .summary .pgpab-wrapper > *::before {
    content: "|";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-weight: 300;
    font-size: 13px;
    pointer-events: none;
    line-height: 1;
}
.single-product .summary .bpt-action-buttons-wrapper > *:first-child::before,
.single-product .summary .pgpab-wrapper > *:first-child::before {
    display: none;
}

/* ── All action links ─────────────────────────────────────────────────── */
.single-product .summary .bpt-action-buttons-wrapper a,
.single-product .summary .bpt-action-buttons-wrapper a.pg-print-btn,
.single-product .summary .pgpab-wrapper a,
.single-product .summary .pgpab-wrapper a.pg-print-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: color 0.2s ease, opacity 0.2s ease;
    line-height: 1.2;
    margin: 0 !important;
}
.single-product .summary .bpt-action-buttons-wrapper a:hover,
.single-product .summary .bpt-action-buttons-wrapper a.pg-print-btn:hover,
.single-product .summary .pgpab-wrapper a:hover,
.single-product .summary .pgpab-wrapper a.pg-print-btn:hover {
    color: #000 !important;
    opacity: 0.75;
    text-decoration: none !important;
}

/* ── Pipe between Print Sheet and Download PDF (same pg-print-wrap div) ─ */
.single-product .summary .bpt-action-buttons-wrapper .pg-print-wrap,
.single-product .summary .pgpab-wrapper .pg-print-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0;
}
.single-product .summary .bpt-action-buttons-wrapper .pg-print-wrap a + a,
.single-product .summary .pgpab-wrapper .pg-print-wrap a + a {
    position: relative;
    padding-left: 14px;
    margin-left: 0 !important;
}
.single-product .summary .bpt-action-buttons-wrapper .pg-print-wrap a + a::before,
.single-product .summary .pgpab-wrapper .pg-print-wrap a + a::before {
    content: "|";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-weight: 300;
    font-size: 13px;
    pointer-events: none;
}

/* ── Icons ────────────────────────────────────────────────────────────── */
.single-product .summary .bpt-action-buttons-wrapper svg,
.single-product .summary .bpt-action-buttons-wrapper i,
.single-product .summary .pgpab-wrapper svg,
.single-product .summary .pgpab-wrapper i {
    width: 15px !important;
    height: 15px !important;
    flex-shrink: 0 !important;
    vertical-align: middle;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* ── Mobile: pill buttons, two per row ───────────────────────────────── */
@media (max-width: 600px) {
    .single-product .summary .bpt-action-buttons-wrapper,
    .single-product .summary .pgpab-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 10px 0 14px;
    }
    .single-product .summary .bpt-action-buttons-wrapper > *,
    .single-product .summary .pgpab-wrapper > * {
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: center;
    }
    .single-product .summary .bpt-action-buttons-wrapper > *::before,
    .single-product .summary .pgpab-wrapper > *::before {
        display: none !important;
    }
    .single-product .summary .bpt-action-buttons-wrapper a,
    .single-product .summary .bpt-action-buttons-wrapper a.pg-print-btn,
    .single-product .summary .pgpab-wrapper a,
    .single-product .summary .pgpab-wrapper a.pg-print-btn {
        font-size: 13px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center;
        width: 100%;
        padding: 8px 10px !important;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: #fff;
        white-space: nowrap;
    }
    .single-product .summary .bpt-action-buttons-wrapper a:hover,
    .single-product .summary .bpt-action-buttons-wrapper a.pg-print-btn:hover,
    .single-product .summary .pgpab-wrapper a:hover,
    .single-product .summary .pgpab-wrapper a.pg-print-btn:hover {
        border-color: #999;
        background: #f5f5f5;
        opacity: 1;
    }
    .single-product .summary .bpt-action-buttons-wrapper .pg-print-wrap,
    .single-product .summary .pgpab-wrapper .pg-print-wrap {
        grid-column: 1 / -1;
        display: flex !important;
        gap: 8px;
    }
    .single-product .summary .bpt-action-buttons-wrapper .pg-print-wrap a,
    .single-product .summary .bpt-action-buttons-wrapper .pg-print-wrap a + a,
    .single-product .summary .pgpab-wrapper .pg-print-wrap a,
    .single-product .summary .pgpab-wrapper .pg-print-wrap a + a {
        flex: 1;
        padding: 8px 10px !important;
        padding-left: 10px !important;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: #fff;
        justify-content: center;
        margin: 0 !important;
    }
    .single-product .summary .bpt-action-buttons-wrapper .pg-print-wrap a + a::before,
    .single-product .summary .pgpab-wrapper .pg-print-wrap a + a::before {
        display: none !important;
    }
}
