/* =============================================================
   Post Share & Save Plugin — pss-style.css
   ============================================================= */

/* ---------- Desktop: Fixed floating column bottom-right ---------- */
.pss-bar {
    position: fixed;
    bottom: 28px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 9999;
}

/* ---------- Buttons — no bg, no border, pure icon ---------- */
.pss-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: auto;
    height: auto;
    border-radius: 0;
    cursor: pointer;
    padding: 0;
    background: transparent;
    color: #ffffff;
    border: none;
    box-shadow: none;
    transition: color 0.2s ease, transform 0.2s ease;
    font-family: inherit;
}

.pss-btn:hover  { color: #ff6b00; transform: scale(1.15); }
.pss-btn:active { transform: scale(0.92); }
.pss-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Saved state */
#pss-save-btn.pss-saved { color: #ff6b00; }
#pss-save-btn.pss-saved .pss-bookmark-outline { display: none !important; }
#pss-save-btn.pss-saved .pss-bookmark-filled  { display: block !important; }

/* ---------- Icon ---------- */
.pss-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.5));
}

/* ---------- Label ---------- */
.pss-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* =============================================================
   Share Modal
   ============================================================= */
.pss-share-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    padding: 0 0 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.pss-share-modal:not([hidden]) { opacity: 1; pointer-events: auto; }

.pss-share-inner {
    background: #ffffff;
    border-radius: 20px 20px 16px 16px;
    width: min(440px, 96vw);
    padding: 24px 20px 28px;
    position: relative;
    transform: translateY(40px);
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 -4px 40px rgba(0,0,0,0.15);
}
.pss-share-modal:not([hidden]) .pss-share-inner { transform: translateY(0); }

.pss-share-close {
    position: absolute;
    top: 14px; right: 16px;
    background: #f1f1f1;
    border: none; border-radius: 50%;
    width: 30px; height: 30px;
    font-size: 18px; line-height: 1;
    cursor: pointer; color: #555;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.pss-share-close:hover { background: #e0e0e0; }

.pss-share-title {
    font-size: 15px; font-weight: 700;
    color: #1a1a1a; text-align: center;
    margin: 0 0 18px;
}

.pss-share-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}

.pss-share-option {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 7px; padding: 14px 8px 12px;
    border-radius: 14px; font-size: 11px; font-weight: 600;
    text-decoration: none; cursor: pointer; border: none;
    font-family: inherit;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.pss-share-option svg { width: 26px; height: 26px; }
.pss-share-option:hover { transform: translateY(-2px); filter: brightness(0.93); }

.pss-twitter  { background: #000000; color: #ffffff; }
.pss-facebook { background: #1877f2; color: #ffffff; }
.pss-whatsapp { background: #25d366; color: #ffffff; }
.pss-linkedin { background: #0a66c2; color: #ffffff; }
.pss-copy     { background: #f3f4f6; color: #333333; border: 1px solid #e0e0e0; }

/* =============================================================
   Toast
   ============================================================= */
.pss-toast {
    position: fixed;
    bottom: 100px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a1a; color: #fff;
    padding: 10px 22px; border-radius: 100px;
    font-size: 13px; font-weight: 500;
    z-index: 10001; white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.pss-toast.pss-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =============================================================
   Dark mode — modal only
   ============================================================= */
@media (prefers-color-scheme: dark) {
    .pss-share-inner  { background: #1e1e1e; }
    .pss-share-title  { color: #f0f0f0; }
    .pss-copy         { background: #2a2a2a; color: #eee; border-color: #444; }
    .pss-share-close  { background: #333; color: #ccc; }
    .pss-share-close:hover { background: #444; }
}

/* =============================================================
   Mobile — injected by JS as a horizontal row ABOVE the
   featured image, part of normal page flow (NOT fixed/sticky).
   Looks like the NOS app top bar style.
   ============================================================= */
@media (max-width: 480px) {

    /* The wrapper div JS creates to hold the bar in the page flow */
    .pss-mobile-bar-wrapper {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;  /* right-align like NOS screenshot */
        align-items: center;
        gap: 20px;
        padding: 8px 16px;
        width: 100%;
        box-sizing: border-box;
        /* Part of page flow — no position fixed, scrolls normally */
        position: relative;
        z-index: 10;
    }

    /* Bar itself when placed in mobile wrapper */
    .pss-bar-mobile {
        position: static !important;
        flex-direction: row !important;
        gap: 20px !important;
        bottom: unset !important;
        right: unset !important;
        z-index: auto !important;
    }

    /* Smaller icons on mobile */
    .pss-bar-mobile .pss-icon {
        width: 20px !important;
        height: 20px !important;
        filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4)) !important;
    }

    /* Very small label */
    .pss-bar-mobile .pss-label {
        font-size: 6px !important;
        letter-spacing: 0.05em !important;
    }
}

/* =============================================================
   .pss-bar-in-image — absolute overlay on featured image
   (horizontal row, top-right corner, scrolls with image)
   ============================================================= */
.pss-bar-in-image {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    bottom: unset !important;
    left: unset !important;
    width: auto !important;
    flex-direction: row !important;
    gap: 14px !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 20 !important;
}

.pss-bar-in-image .pss-icon {
    width: 20px !important;
    height: 20px !important;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.7)) !important;
}

.pss-bar-in-image .pss-label {
    font-size: 6px !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8) !important;
}
.pss-label { display: none !important; }
