/**
 * Bosphorse Dergi Okuyucu — Viewer Stilleri
 */

/* ============================
   ÜST BAR
   ============================ */

.bh-okuyucu-sayfa {
    margin: 0;
    padding: 0;
}

.bh-okuyucu-ust-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    background: #1a1a2e;
    color: #fff;
    min-height: 48px;
    position: relative;
    z-index: 100;
}

.bh-okuyucu-ust-sol {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.bh-okuyucu-geri {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.bh-okuyucu-geri:hover {
    opacity: 1;
    color: #fff;
    text-decoration: none;
}

.bh-okuyucu-geri .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.bh-okuyucu-baslik {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Poppins', sans-serif;
    color: #fff;
}

.bh-okuyucu-ust-sag {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.bh-okuyucu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.bh-okuyucu-btn:hover {
    background: rgba(255,255,255,0.2);
}

.bh-okuyucu-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ============================
   OKUYUCU KONTEYNERİ
   ============================ */

.bh-okuyucu-konteyner {
    display: flex;
    flex-direction: column;
    background: #2a2a3e;
    position: relative;
}

.bh-okuyucu-alan {
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 48px - 52px);
    overflow: hidden;
    position: relative;
    background: #3a3a4e;
    gap: 2px;
}

.bh-okuyucu-alan.bh-cift-sayfa {
    /* İki canvas yan yana */
}

.bh-okuyucu-alan.bh-tek-sayfa .bh-okuyucu-canvas-sag {
    display: none !important;
}

/* ============================
   CANVAS
   ============================ */

.bh-okuyucu-canvas {
    display: none;
    max-height: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    background: #fff;
}

/* ============================
   YÜKLEME ANİMASYONU
   ============================ */

.bh-okuyucu-yukleniyor {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #ccc;
    font-family: 'Poppins', sans-serif;
}

.bh-okuyucu-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bhSpin 0.8s linear infinite;
}

@keyframes bhSpin {
    to { transform: rotate(360deg); }
}

/* ============================
   KONTROL ÇUBUĞU
   ============================ */

.bh-okuyucu-kontroller {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #1a1a2e;
    min-height: 52px;
    flex-wrap: wrap;
}

.bh-okuyucu-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.bh-okuyucu-nav-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.bh-okuyucu-nav-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.bh-okuyucu-sayfa-bilgi {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ccc;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.bh-okuyucu-sayfa-input {
    width: 48px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    padding: 4px;
    font-family: 'Poppins', sans-serif;
    -moz-appearance: textfield;
}

.bh-okuyucu-sayfa-input::-webkit-outer-spin-button,
.bh-okuyucu-sayfa-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bh-okuyucu-sayfa-toplam {
    color: #888;
}

.bh-okuyucu-ayrac {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.15);
    margin: 0 4px;
}

.bh-okuyucu-zoom-bilgi {
    color: #ccc;
    font-size: 13px;
    min-width: 40px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

/* ============================
   KÜÇÜK RESİM PANELİ
   ============================ */

.bh-okuyucu-kucukresimler {
    background: #1e1e32;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 10px 0;
    overflow: hidden;
}

.bh-okuyucu-kucukresim-icerik {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.bh-okuyucu-kucukresim-icerik::-webkit-scrollbar {
    height: 6px;
}

.bh-okuyucu-kucukresim-icerik::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.bh-kucukresim {
    flex-shrink: 0;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 4px;
}

.bh-kucukresim:hover {
    border-color: rgba(255,255,255,0.4);
}

.bh-kucukresim.aktif {
    border-color: #4a9eff;
}

.bh-kucukresim canvas {
    display: block;
    border-radius: 2px;
    background: #fff;
}

.bh-kucukresim span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #888;
    font-family: 'Poppins', sans-serif;
}

.bh-kucukresim.aktif span {
    color: #4a9eff;
}

/* ============================
   PAYLAŞ MODAL
   ============================ */

.bh-okuyucu-paylas-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bh-okuyucu-paylas-icerik {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    max-width: 460px;
    width: 90%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.bh-okuyucu-paylas-baslik {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.bh-okuyucu-paylas-baslik h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: #1a1a2e;
}

.bh-okuyucu-paylas-kapat {
    border: none;
    background: none;
    cursor: pointer;
    color: #888;
    font-size: 20px;
    padding: 0;
}

.bh-okuyucu-paylas-kapat:hover {
    color: #333;
}

.bh-okuyucu-paylas-sayfa-bilgi {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
}

.bh-okuyucu-paylas-sayfa-bilgi strong {
    color: #1a1a2e;
}

.bh-okuyucu-paylas-link-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.bh-okuyucu-paylas-link {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    background: #f8f8f8;
    font-family: 'Poppins', sans-serif;
}

.bh-okuyucu-paylas-kopyala {
    padding: 10px 20px;
    border: none;
    background: #1a1a2e;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: background 0.2s;
    white-space: nowrap;
}

.bh-okuyucu-paylas-kopyala:hover {
    background: #2a2a4e;
}

.bh-okuyucu-paylas-butonlar {
    display: flex;
    gap: 10px;
}

.bh-okuyucu-paylas-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: opacity 0.2s;
}

.bh-okuyucu-paylas-btn:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
}

.bh-paylas-whatsapp { background: #25D366; }
.bh-paylas-x { background: #000; }
.bh-paylas-facebook { background: #1877F2; }

/* ============================
   FULLSCREEN MODUNDA
   ============================ */

.bh-okuyucu-konteyner:fullscreen {
    background: #2a2a3e;
}

.bh-okuyucu-konteyner:fullscreen .bh-okuyucu-alan {
    height: calc(100vh - 52px);
}

/* ============================
   KÜÇÜK RESİM PANELİ AÇIKKEN
   ============================ */

.bh-okuyucu-kucukresimler + .bh-okuyucu-alan,
.bh-okuyucu-alan {
    /* Küçük resimler açıkken yükseklik küçülecek */
}

/* Küçük resim paneli açıkken okuyucu alanı küçült */
.bh-okuyucu-konteyner:has(.bh-okuyucu-kucukresimler[style*="block"]) .bh-okuyucu-alan {
    height: calc(100vh - 48px - 52px - 160px);
}

.bh-okuyucu-konteyner:fullscreen:has(.bh-okuyucu-kucukresimler[style*="block"]) .bh-okuyucu-alan {
    height: calc(100vh - 52px - 160px);
}

/* ============================
   RESPONSİVE
   ============================ */

@media (max-width: 767px) {
    .bh-okuyucu-baslik {
        font-size: 13px;
    }

    .bh-okuyucu-geri-yazi {
        display: none;
    }

    .bh-okuyucu-kontroller {
        gap: 4px;
        padding: 8px 10px;
    }

    .bh-okuyucu-nav-btn {
        width: 30px;
        height: 30px;
    }

    .bh-okuyucu-nav-btn .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }

    .bh-okuyucu-ayrac {
        margin: 0 2px;
    }

    .bh-okuyucu-kucukresim-btn {
        display: none;
    }

    .bh-okuyucu-alan {
        height: calc(100vh - 48px - 48px);
    }

    .bh-okuyucu-paylas-icerik {
        padding: 20px;
    }

    .bh-okuyucu-paylas-butonlar {
        flex-direction: column;
    }
}
