/* Sosyal paylaşım butonları (templates/social_share.php) — BEM, vanilla CSS, yalnız --pf-* paleti.
   Görünüm ürün sayfasındaki favori/karşılaştır yuvarlak butonlarıyla aynı dil: beyaz kart, ince kenarlık,
   ikincil metin rengi; üzerine gelince vurgu rengi (--pf-accent). */
.nk-share {
    position: relative;
    font-family: var(--pf-font, 'Inter', system-ui, sans-serif);
}

.nk-share__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nk-share__item[hidden] { display: none; }

.nk-share__icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.nk-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    color: var(--pf-text-secondary);
    text-decoration: none;
    background: var(--pf-bg-card);
    border: 1px solid var(--pf-border);
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.nk-share__btn:hover,
.nk-share__btn:focus-visible {
    color: var(--pf-accent);
    border-color: var(--pf-accent);
    background: var(--pf-bg-card);
    box-shadow: 0 0 0 3px var(--pf-accent-glow);
}

.nk-share__btn:active { background: var(--pf-bg-hover); }

.nk-share__btn:focus-visible,
.nk-share__toggle:focus-visible { outline: none; }

/* --- Satır içi (ürün sayfası, galerinin altı) --- */
.nk-share--inline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--pf-border-light);
}

.nk-share__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pf-text-secondary);
}

.nk-share__label .bi {
    font-size: 13px;
    color: var(--pf-accent);
}

.nk-share--inline .nk-share__btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.nk-share--inline .nk-share__name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* --- Menü (kategori başlık çubuğu) --- */
.nk-share--menu { flex-shrink: 0; }

.nk-share__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--pf-text-primary);
    background: var(--pf-bg-card);
    border: 1px solid var(--pf-border);
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.nk-share__toggle .nk-share__icon {
    font-size: 13px;
    color: var(--pf-accent);
}

.nk-share__toggle:hover,
.nk-share__toggle:focus-visible,
.nk-share__toggle[aria-expanded="true"] {
    color: var(--pf-accent);
    border-color: var(--pf-accent);
}

.nk-share__toggle:focus-visible { box-shadow: 0 0 0 3px var(--pf-accent-glow); }

.nk-share__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1060;
    width: 248px;
    padding: 12px;
    background: var(--pf-bg-card);
    border: 1px solid var(--pf-border);
    border-radius: 12px;
    box-shadow: var(--pf-shadow-hover);
}

.nk-share__panel[hidden] { display: none; }

.nk-share__panel-title {
    margin: 0 0 10px;
    padding-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--pf-text-primary);
    border-bottom: 1px solid var(--pf-border-light);
}

.nk-share--menu .nk-share__list {
    flex-direction: column;
    gap: 4px;
}

.nk-share--menu .nk-share__btn {
    justify-content: flex-start;
    width: 100%;
    gap: 10px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--pf-text-primary);
    border-color: transparent;
    border-radius: 8px;
}

.nk-share--menu .nk-share__btn .nk-share__icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--pf-text-secondary);
    background: var(--pf-bg-hover);
    border-radius: 50%;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.nk-share--menu .nk-share__btn:hover,
.nk-share--menu .nk-share__btn:focus-visible {
    color: var(--pf-accent);
    border-color: transparent;
    background: var(--pf-bg-hover);
    box-shadow: none;
}

.nk-share--menu .nk-share__btn:hover .nk-share__icon,
.nk-share--menu .nk-share__btn:focus-visible .nk-share__icon {
    color: #fff;
    background: var(--pf-accent);
}

/* --- Kopyalandı bildirimi --- */
.nk-share__toast {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translate(-50%, 4px);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    background: var(--pf-accent);
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nk-share--menu .nk-share__toast {
    left: auto;
    right: 0;
    transform: translateY(4px);
}

.nk-share__toast--show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.nk-share--menu .nk-share__toast--show { transform: translateY(0); }

/* Masaüstü: galeri küçük resimlerinden belirgin ayrılsın */
@media (min-width: 768px) {
    .nk-share--inline {
        margin-top: 28px;
        padding-top: 22px;
    }
}

@media (max-width: 767.98px) {
    .nk-share__toggle { padding: 0 9px; }
    .nk-share__toggle-text { display: none; }
    .nk-share__panel {
        position: fixed;
        top: auto;
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
    }
    .nk-share--inline .nk-share__btn { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .nk-share__btn,
    .nk-share__toggle,
    .nk-share__toast { transition: none; }
}

/* bi-link-45deg glifi diğerlerinden küçük çiziliyor; optik denge */
.nk-share__btn--copy .nk-share__icon { font-size: 19px; }
.nk-share--menu .nk-share__btn--copy .nk-share__icon { font-size: 17px; }

/* Mobil (sahip 2026-11-19): ürün sayfasında buton dizisi gösterilmez; başlıktaki paylaş butonu
   "Paylaş" yazısıyla hap biçimine geçer ve sistem paylaşım menüsünü açar (product-page.js → nkShare.native). */
.pf-share-btn-text { display: none; }

@media (max-width: 767.98px) {
    .nk-share--inline { display: none; }
    /* Kategori başlık çubuğunda yer daralıyor (H1 kesiliyordu): menü mobilde gizli */
    .nk-share--menu { display: none; }

    .product-header-actions #shareProductBtn.share-action-btn {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 0 14px 0 12px !important;
        gap: 6px !important;
        border-radius: 19px !important;
    }

    #shareProductBtn .pf-share-btn-text {
        display: inline;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
    }
}
