/* Pin It Button for Blog Images — frontend styles */

.pib-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
    max-width: 100%;
}

.pib-wrap img {
    max-width: 100%;
    height: auto;
    display: block;
}

.pib-button {
    position: absolute;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #e60023;
    color: #fff !important;
    font: 600 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-decoration: none !important;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
    pointer-events: none;
    cursor: pointer;
}

.pib-wrap:hover .pib-button,
.pib-wrap:focus-within .pib-button,
.pib-button:focus {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pib-button:hover,
.pib-button:focus-visible {
    background: #ad081b;
    outline: none;
}

.pib-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.pib-label {
    white-space: nowrap;
}

/* Positions */
.pib-pos-top-left     { top: 12px; left: 12px; }
.pib-pos-top-right    { top: 12px; right: 12px; }
.pib-pos-bottom-left  { bottom: 12px; left: 12px; }
.pib-pos-bottom-right { bottom: 12px; right: 12px; }
.pib-pos-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 4px));
}
.pib-wrap:hover .pib-pos-center,
.pib-wrap:focus-within .pib-pos-center {
    transform: translate(-50%, -50%);
}

/* Touch devices: always show, slightly smaller */
@media (hover: none) {
    .pib-button {
        opacity: 1;
        transform: none;
        pointer-events: auto;
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Prevent button from being clipped by figure overflow */
.pib-wrap,
figure:has(.pib-wrap) {
    overflow: visible;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .pib-button {
        transition: opacity 0.01ms;
    }
}
