/* ForumX V17 — premium mobil alt menü ve birleşik konu istatistikleri. */

/* Kategori toplamları: çıplak metin yerine aynı tasarım dilinde kapsüller. */
.forumx-home-premium-v15 .fx-home-category-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: inherit;
}

.forumx-home-premium-v15 .fx-home-stat-pill,
.forumx-home-premium-v15 .fx-home-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border: 1px solid color-mix(in srgb, rgb(var(--fxh-tone)) 25%, rgba(125, 162, 214, .18));
    color: #b9c9df;
    background:
        linear-gradient(145deg, rgba(var(--fxh-tone), .12), rgba(7, 17, 32, .24)),
        rgba(15, 31, 50, .72);
    box-shadow: inset 0 1px rgba(255,255,255,.045), 0 8px 22px rgba(0,0,0,.12);
    font-variant-numeric: tabular-nums;
}

.forumx-home-premium-v15 .fx-home-stat-pill {
    min-height: 34px;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
}

.forumx-home-premium-v15 .fx-home-stat-pill .forumx-icon,
.forumx-home-premium-v15 .fx-home-count-pill .forumx-icon {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    color: rgb(var(--fxh-tone));
}

.forumx-home-premium-v15 .fx-home-stat-pill b,
.forumx-home-premium-v15 .fx-home-count-pill b {
    color: #f4f8ff;
    font-weight: 850;
    line-height: 1;
}

.forumx-home-premium-v15 .fx-home-stat-pill small,
.forumx-home-premium-v15 .fx-home-count-pill small {
    margin: 0;
    color: #91a4be;
    font-weight: 720;
    line-height: 1;
}

/* Forum satırı içindeki konu/mesaj rakamları. */
.forumx-home-premium-v15 .fx-home-forum-counts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 0 8px;
    border: 0;
}

.forumx-home-premium-v15 .fx-home-forum-counts > span,
.forumx-home-premium-v15 .fx-home-forum-counts > span + span {
    min-height: 43px;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    place-content: center;
    align-items: center;
    column-gap: 5px;
    row-gap: 2px;
    padding: 5px 6px;
    border: 1px solid rgba(112, 151, 207, .13);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(67, 116, 192, .08), rgba(6, 16, 29, .18));
    text-align: left;
}

.forumx-home-premium-v15 .fx-home-forum-counts > span .forumx-icon {
    grid-row: 1 / 3;
    width: 16px;
    height: 16px;
}

.forumx-home-premium-v15 .fx-home-forum-counts b,
.forumx-home-premium-v15 .fx-home-forum-counts small {
    display: block;
    margin: 0;
}

.forumx-home-premium-v15 .fx-home-forum-counts b {
    font-size: .82rem;
}

.forumx-home-premium-v15 .fx-home-forum-counts small {
    font-size: .59rem;
}

/* Masaüstü/tablet konu akışı sayaçları da premium kapsül olur. */
.forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-number {
    width: calc(100% - 12px) !important;
    height: 30px !important;
    min-height: 30px !important;
    display: inline-flex !important;
    align-self: center !important;
    justify-self: center !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    margin: 0 6px !important;
    padding: 0 7px !important;
    border: 1px solid rgba(102, 153, 225, .18) !important;
    border-radius: 999px !important;
    color: #dce8f9 !important;
    background: linear-gradient(145deg, rgba(62, 115, 200, .13), rgba(8, 20, 37, .34)) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.035) !important;
    font-size: .72rem !important;
    font-weight: 820 !important;
}

.forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-number .forumx-icon {
    width: 13px;
    height: 13px;
    color: #6ca7ff;
}

.forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-number b {
    font: inherit;
    font-variant-numeric: tabular-nums;
}

/* Mobil alt bar: yüzen, cam görünümlü ve aktif sekmesi belirgin tek sistem. */
@media (max-width: 760px) {
    body {
        padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
    }

    .mobile-bottom-nav {
        position: fixed !important;
        left: 12px !important;
        right: 12px !important;
        bottom: max(10px, env(safe-area-inset-bottom)) !important;
        z-index: 120 !important;
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 4px !important;
        width: auto !important;
        min-height: 72px !important;
        padding: 6px !important;
        border: 1px solid rgba(105, 149, 211, .28) !important;
        border-radius: 18px !important;
        background:
            linear-gradient(155deg, rgba(28, 48, 74, .94), rgba(12, 26, 43, .96)) !important;
        box-shadow:
            0 20px 54px rgba(0, 0, 0, .42),
            inset 0 1px rgba(255,255,255,.055),
            0 0 0 1px rgba(28, 91, 184, .05) !important;
        -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
        backdrop-filter: blur(20px) saturate(140%) !important;
    }

    .mobile-bottom-nav > a {
        position: relative !important;
        min-width: 0 !important;
        min-height: 58px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 7px 3px 6px !important;
        border: 1px solid transparent !important;
        border-radius: 13px !important;
        color: #98a9bf !important;
        background: transparent !important;
        font-size: .67rem !important;
        font-weight: 780 !important;
        line-height: 1 !important;
        text-align: center !important;
        text-decoration: none !important;
        transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease !important;
    }

    .mobile-bottom-nav > a:hover,
    .mobile-bottom-nav > a:focus-visible {
        color: #dce9ff !important;
        background: rgba(68, 121, 202, .09) !important;
    }

    .mobile-bottom-nav > a.active {
        border-color: rgba(77, 139, 237, .25) !important;
        color: #75a8ff !important;
        background:
            linear-gradient(155deg, rgba(49, 96, 168, .42), rgba(27, 56, 101, .48)) !important;
        box-shadow: inset 0 1px rgba(255,255,255,.055), 0 8px 22px rgba(22, 82, 179, .18) !important;
        transform: translateY(-1px) !important;
    }

    .mobile-bottom-nav > a.active::after {
        content: "";
        position: absolute;
        left: 22%;
        right: 22%;
        bottom: 3px;
        height: 3px;
        border-radius: 999px;
        background: linear-gradient(90deg, #407ff0, #72a8ff);
        box-shadow: 0 0 12px rgba(71, 133, 245, .75);
    }

    .mobile-bottom-nav > a > .forumx-icon {
        width: 23px !important;
        height: 23px !important;
        flex: 0 0 auto !important;
        filter: drop-shadow(0 5px 10px rgba(0,0,0,.18));
    }

    .mobile-bottom-nav > a.active > .forumx-icon {
        filter: drop-shadow(0 0 9px rgba(75, 139, 255, .54));
    }

    .mobile-bottom-nav > a small {
        display: block !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        color: inherit !important;
        font: inherit !important;
        line-height: 1.1 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .mobile-bottom-nav .fx-bottom-notification-badge {
        top: 3px !important;
        right: max(7px, 17%) !important;
        min-width: 19px !important;
        height: 19px !important;
        padding: 0 5px !important;
        border: 2px solid #162a42 !important;
        border-radius: 999px !important;
        color: #fff !important;
        background: linear-gradient(135deg, #ff5f76, #e52848) !important;
        box-shadow: 0 4px 12px rgba(229, 40, 72, .42) !important;
        font-size: .59rem !important;
        font-weight: 900 !important;
    }

    /* Konu tablosunu mobilde yatay sıkışan hücreler yerine premium konu kartlarına dönüştürür. */
    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-table-shell {
        overflow: visible !important;
        padding: 0 0 7px !important;
        background: transparent !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-table-head {
        display: none !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-group {
        min-width: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        background: transparent !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-group > header {
        min-width: 0 !important;
        width: auto !important;
        min-height: 40px !important;
        margin: 8px 9px !important;
        padding: 0 12px !important;
        border: 1px solid rgba(104, 147, 208, .18) !important;
        border-radius: 12px !important;
        color: #dce8f9 !important;
        background: linear-gradient(145deg, rgba(45, 78, 119, .30), rgba(13, 28, 46, .55)) !important;
        box-shadow: inset 0 1px rgba(255,255,255,.035) !important;
        font-size: .79rem !important;
        font-weight: 800 !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-pinned > header {
        border-color: rgba(77, 197, 124, .22) !important;
        color: #99edb8 !important;
        background: linear-gradient(145deg, rgba(31, 104, 64, .36), rgba(12, 43, 30, .52)) !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-rows {
        display: grid !important;
        gap: 8px !important;
        padding: 0 8px 5px !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-row,
    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-row:nth-child(even) {
        display: grid !important;
        grid-template-columns: 30px 38px minmax(0, 1fr) !important;
        align-items: center !important;
        min-width: 0 !important;
        width: 100% !important;
        min-height: 72px !important;
        height: auto !important;
        padding: 10px !important;
        overflow: hidden !important;
        border: 1px solid rgba(103, 145, 204, .16) !important;
        border-radius: 14px !important;
        background:
            radial-gradient(circle at 100% 0, rgba(48, 112, 216, .095), transparent 43%),
            linear-gradient(145deg, rgba(27, 48, 74, .92), rgba(14, 29, 47, .95)) !important;
        box-shadow: inset 0 1px rgba(255,255,255,.035), 0 10px 24px rgba(0,0,0,.12) !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-row:hover {
        transform: translateY(-1px) !important;
        border-color: rgba(81, 139, 228, .34) !important;
        background:
            radial-gradient(circle at 100% 0, rgba(48, 112, 216, .14), transparent 43%),
            linear-gradient(145deg, rgba(29, 53, 83, .94), rgba(15, 31, 51, .96)) !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-index,
    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-avatar,
    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-main {
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        align-self: center !important;
        border: 0 !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-index {
        width: 25px !important;
        height: 25px !important;
        margin: 0 !important;
        border: 1px solid rgba(85, 208, 131, .35) !important;
        border-radius: 8px !important;
        color: #90e9ae !important;
        background: rgba(34, 121, 69, .20) !important;
        font-size: .65rem !important;
        font-weight: 900 !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-avatar {
        display: grid !important;
        place-items: center !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-avatar .avatar {
        width: 34px !important;
        height: 34px !important;
        border: 1px solid rgba(79, 138, 231, .42) !important;
        border-radius: 10px !important;
        box-shadow: 0 0 0 3px rgba(54, 112, 203, .10) !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-main {
        display: block !important;
        padding: 0 0 0 7px !important;
        overflow: hidden !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-title-line {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 5px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-title {
        flex: 1 1 120px !important;
        min-width: 0 !important;
        max-width: 100% !important;
        color: #eef5ff !important;
        font-size: .78rem !important;
        font-weight: 840 !important;
        line-height: 1.25 !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-prefix,
    .forumx-home-premium-v15 .fx-home-feed-stage .topic-type-badge,
    .forumx-home-premium-v15 .fx-home-feed-stage .topic-state {
        height: 18px !important;
        min-height: 18px !important;
        max-width: 70px !important;
        padding: 1px 5px !important;
        border-radius: 5px !important;
        overflow: hidden !important;
        font-size: .54rem !important;
        text-overflow: ellipsis !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-mobile-meta {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 5px !important;
        margin-top: 7px !important;
    }

    .forumx-home-premium-v15 .fx-feed-meta-chip {
        min-width: 0 !important;
        min-height: 23px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 3px 7px !important;
        overflow: hidden !important;
        border: 1px solid rgba(99, 145, 211, .16) !important;
        border-radius: 999px !important;
        color: #9fb2ca !important;
        background: rgba(22, 43, 68, .76) !important;
        font-size: .58rem !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }

    .forumx-home-premium-v15 .fx-feed-meta-chip .forumx-icon {
        width: 11px !important;
        height: 11px !important;
        flex: 0 0 auto !important;
        color: #68a5ff !important;
    }

    .forumx-home-premium-v15 .fx-feed-meta-chip b,
    .forumx-home-premium-v15 .fx-feed-meta-chip small,
    .forumx-home-premium-v15 .fx-feed-meta-chip span {
        min-width: 0 !important;
        margin: 0 !important;
        color: inherit !important;
        font: inherit !important;
        line-height: 1 !important;
    }

    .forumx-home-premium-v15 .fx-feed-meta-forum {
        max-width: min(150px, 45vw) !important;
        color: #b9cdf0 !important;
    }

    .forumx-home-premium-v15 .fx-feed-meta-forum span {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .forumx-home-premium-v15 .fx-feed-meta-time {
        color: #879ab2 !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-forum,
    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-number {
        display: none !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-more {
        min-width: 0 !important;
        width: calc(100% - 18px) !important;
        min-height: 44px !important;
        margin: 9px !important;
        border: 1px solid rgba(91, 139, 209, .20) !important;
        border-radius: 13px !important;
        color: #aebfd5 !important;
        background: linear-gradient(145deg, rgba(38, 67, 103, .42), rgba(14, 29, 47, .60)) !important;
        box-shadow: inset 0 1px rgba(255,255,255,.035) !important;
    }

    /* Kategori ve forum istatistikleri mobilde de aynı kapsül dilini korur. */
    .forumx-home-premium-v15 .fx-home-category-header {
        align-items: center !important;
    }

    .forumx-home-premium-v15 .fx-home-category-total {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 5px !important;
        padding-top: 0 !important;
    }

    .forumx-home-premium-v15 .fx-home-stat-pill {
        min-height: 27px !important;
        justify-content: flex-start !important;
        gap: 4px !important;
        padding: 4px 7px !important;
        border-radius: 9px !important;
    }

    .forumx-home-premium-v15 .fx-home-stat-pill .forumx-icon {
        width: 12px !important;
        height: 12px !important;
    }

    .forumx-home-premium-v15 .fx-home-stat-pill b {
        font-size: .67rem !important;
    }

    .forumx-home-premium-v15 .fx-home-stat-pill small {
        font-size: .53rem !important;
    }

    .forumx-home-premium-v15 .fx-home-forum-counts {
        min-width: 82px !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 5px !important;
        padding: 0 2px 0 7px !important;
    }

    .forumx-home-premium-v15 .fx-home-forum-counts > span,
    .forumx-home-premium-v15 .fx-home-forum-counts > span + span {
        min-height: 30px !important;
        display: grid !important;
        grid-template-columns: 13px auto !important;
        grid-template-rows: auto auto !important;
        justify-content: start !important;
        column-gap: 5px !important;
        row-gap: 1px !important;
        padding: 4px 6px !important;
        border: 1px solid rgba(104, 148, 211, .14) !important;
        border-radius: 9px !important;
        background: rgba(20, 40, 63, .66) !important;
    }

    .forumx-home-premium-v15 .fx-home-forum-counts > span .forumx-icon {
        grid-row: 1 / 3 !important;
        width: 12px !important;
        height: 12px !important;
        align-self: center !important;
    }

    .forumx-home-premium-v15 .fx-home-forum-counts b {
        font-size: .65rem !important;
        line-height: 1 !important;
    }

    .forumx-home-premium-v15 .fx-home-forum-counts small {
        font-size: .50rem !important;
        line-height: 1 !important;
    }
}

@media (max-width: 390px) {
    .mobile-bottom-nav {
        left: 8px !important;
        right: 8px !important;
        gap: 2px !important;
        min-height: 68px !important;
        padding: 5px !important;
        border-radius: 16px !important;
    }

    .mobile-bottom-nav > a {
        min-height: 56px !important;
        padding-inline: 2px !important;
        font-size: .61rem !important;
    }

    .mobile-bottom-nav > a > .forumx-icon {
        width: 21px !important;
        height: 21px !important;
    }

    .forumx-home-premium-v15 .fx-home-category-total {
        display: flex !important;
    }

    .forumx-home-premium-v15 .fx-home-stat-pill small {
        display: none !important;
    }

    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-row,
    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-row:nth-child(even) {
        grid-template-columns: 28px 35px minmax(0, 1fr) !important;
        padding: 9px 8px !important;
    }

    .forumx-home-premium-v15 .fx-feed-meta-forum {
        max-width: 42vw !important;
    }

    .forumx-home-premium-v15 .fx-feed-meta-time {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-bottom-nav > a,
    .forumx-home-premium-v15 .fx-home-feed-stage .topic-feed-row {
        transition: none !important;
    }
}
