/* /assets/friends.css */
:root{
    --bg0:#0b0c10;
    --bg1:#0f1117;
    --text:#6c757d;
    --muted:#a7b0cc;

    --orange:#ffb400;
    --orange2:#ffb400;
}



.topbar{
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: blur(10px);
    background: rgba(11,12,16,.65);
    border-bottom: 1px solid rgba(255,138,0,.10);
}

.brand-badge{
    display:inline-flex; align-items:center; gap:10px;
    padding:10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,138,0,.25);
    background: linear-gradient(180deg, rgba(255,138,0,.12), rgba(255,138,0,.04));
    box-shadow: 0 10px 28px rgba(0,0,0,.35);
}

.brand-dot{
    width:10px; height:10px; border-radius:999px;
    background: var(--orange);
    box-shadow: 0 0 0 6px rgba(255,138,0,.15);
}

.searchbox .form-control{
    background: rgba(19,22,34,.8);
    border: 1px solid rgba(255,138,0,.18);
    color: var(--text);
    border-radius: 14px;
    padding: 12px 14px;
}
.searchbox .form-control:focus{
    box-shadow: 0 0 0 .25rem rgba(255,138,0,.18);
    border-color: rgba(255,138,0,.45);
}

.page-wrap{ padding: 1px 0 1px; }

.post-card{
    border: 1px solid #402d00;
    background: #0c0c0c;
    border-radius: 18px;

    box-shadow: 0 14px 40px rgba(0,0,0,.40);
    overflow: hidden;
    transition: transform .15s ease, border-color .15s ease;
}
.post-card:hover{
    transform: translateY(-2px);
    border-color: rgba(255,138,0,.28);
}

.post-head{
    display:flex; gap:12px; align-items:flex-start;
    padding: 14px 14px 10px;
}


.avatar{
    width:70px; height:70px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid #ffb400;
    box-shadow: 0 10px 25px rgba(0,0,0,.35);
    flex: 0 0 auto;
    background: #0d0f16;
}

.name{
    font-weight: 400;
    margin: 0;
    line-height: 1.2;
    font-size: 1.02rem;
    color: #ffffff;
}

.meta{
    margin: 2px 0 0;
    color: var(--muted);
    font-size: .88rem;
    display:flex;
    flex-wrap: nowrap;      /* ✅ บังคับให้อยู่บรรทัดเดียว */
    gap:8px;
    align-items:center;
    white-space: nowrap;   /* ✅ กันตัดบรรทัด */
}

.pill{
    display:inline-flex; align-items:center; gap:6px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid #ffb400;
    background: rgba(255,138,0,.08);
    color: var(--orange2);
    font-size: 7pt;
    white-space: nowrap;
}
.pill .dot{
    width:6px; height:6px; border-radius: 999px;
    background: var(--orange);
    box-shadow: 0 0 0 5px rgba(255,138,0,.12);
}

.post-body{ padding: 0 14px 12px; }

.post-text{
    margin: 0;
    color: rgba(233,238,252,.92);
    font-size: 10pt;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.post-foot{
    padding: 5px 14px 5px;
    border-top: 1px solid rgba(255,138,0,.10);
    display:flex;
    gap:10px;
    align-items:center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.btn-orange{
    background: linear-gradient(180deg, rgba(255,138,0,1), rgba(255,114,0,1));
    border: none;
    color: #111;
    font-weight: 400;
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 12px 26px rgba(255,138,0,.18);
}
.btn-orange:hover{ filter: brightness(1.04); }

.btn-ghost{
    background: rgba(255,138,0,.08);
    border: 1px solid var(--orange2);
    color: var(--orange2);
    border-radius: 14px;
    padding: 10px 12px;
    font-weight: 400;
}
.btn-ghost:hover{
    color: #ffb400;
    border-color: rgba(255,138,0,.35); }

.line-chip{
    display:inline-flex; align-items:center; gap:8px;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(29,209,161,.10);
    border: 1px solid rgba(29,209,161,.18);
    color: #bff7ea;
    font-size: 8pt;
}
.line-chip strong{ color:#d7fff6; }

.time {
    color: #535a61;
    margin-top: 5px;
    min-height: 18px;
    height: auto;
    font-size: 7pt;
}

/* Modal theme */
.modal-darkorange{
    background: linear-gradient(180deg, rgba(19,22,34,.98), rgba(13,14,20,.98));
    border:1px solid rgba(255,138,0,.15);
    border-radius: 18px;
}
.modal-darkorange .modal-header{
    border-bottom: 1px solid rgba(255,138,0,.10);
}
.card,
.post-box,
.time-box {
    overflow: visible; /* หรือ auto */
}
.pagination-darkorange{
    gap: 6px;
}

.pagination-darkorange .page-item{
    margin: 0;
}

.pagination-darkorange .page-link{
    min-width: 38px;
    height: 38px;
    padding: 0 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(
            180deg,
            rgba(20,22,30,.95),
            rgba(12,14,20,.95)
    );
    color: #ffcc66; /* เหลืองอ่อน */

    border: 1px solid rgba(255,180,0,.25);
    border-radius: 10px;

    font-weight: 400;
    font-size: 10pt;

    transition: all .15s ease;
}

/* hover */
.pagination-darkorange .page-link:hover{
    color: #111;
    background: linear-gradient(
            180deg,
            #ffb300,
            #ff8f00
    );
    border-color: rgba(255,160,0,.8);
    box-shadow: 0 6px 16px rgba(255,165,0,.35);
}

/* active */
.pagination-darkorange .page-item.active .page-link{
    color: #111;
    background: linear-gradient(
            180deg,
            #ffd54f,
            #ff9800
    );
    border-color: #ffb300;
    box-shadow: 0 8px 22px rgba(255,165,0,.45);
    cursor: default;
}

/* disabled */
.pagination-darkorange .page-item.disabled .page-link{
    background: rgba(18,20,26,.6);
    color: rgba(255,204,102,.35);
    border-color: rgba(255,180,0,.12);
    pointer-events: none;
}

/* ellipsis (…) */
.pagination-darkorange .page-item.disabled span.page-link{
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

/* prev / next */
.pagination-darkorange .page-link[aria-label],
.pagination-darkorange .page-link{
    text-decoration: none;
}

/* มือถือ */
@media (max-width: 575px){
    .pagination-darkorange .page-link{
        min-width: 34px;
        height: 34px;
        font-size: .86rem;
        border-radius: 9px;
    }
}
/* ==============================
   Pagination 8pt Premium
   ============================== */

/* คุมทั้งชุด */
.pager-wrap{
    padding: 6px 8px;
    border-radius: 14px;
    border: 1px solid rgba(255,180,0,.10);
    background: rgba(12,14,20,.35);
    backdrop-filter: blur(10px);
}

/* ตัวเลขหน้า */
.pagination-darkorange{
    gap: 4px;
}

.pagination-darkorange .page-link{
    min-width: 30px;
    height: 30px;
    padding: 0 8px;

    font-size: 8pt;            /* ✅ ตามที่ต้องการ */
    font-weight: 400;
    letter-spacing: .1px;

    background: linear-gradient(
            180deg,
            rgba(18,20,28,.95),
            rgba(12,14,20,.95)
    );
    color: #ffcc66;

    border: 1px solid rgba(255,180,0,.20);
    border-radius: 9px;

    transition: all .15s ease;
}

/* hover */
.pagination-darkorange .page-link:hover{
    background: linear-gradient(180deg, #ffb300, #ff8f00);
    color: #111;
    border-color: rgba(255,160,0,.85);
    box-shadow: 0 4px 12px rgba(255,165,0,.28);
}

/* active */
.pagination-darkorange .page-item.active .page-link{
    background: linear-gradient(180deg, #ffd54f, #ff9800);
    color: #111;
    border-color: #ffb300;
    box-shadow: 0 6px 16px rgba(255,165,0,.38);
}

/* disabled */
.pagination-darkorange .page-item.disabled .page-link{
    background: rgba(16,18,24,.55);
    color: rgba(255,204,102,.35);
    border-color: rgba(255,180,0,.10);
}

/* ellipsis */
.pagination-darkorange .page-ellipsis{
    background: transparent !important;
    border-color: transparent !important;
    color: rgba(255,204,102,.45) !important;
}

/* ===== Jump (เฉพาะหน้าเยอะ) ===== */
.pager-jump-form{
    display:flex;
    align-items:center;
    gap: 8px;

    padding: 5px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255,180,0,.14);
    background: rgba(19,22,34,.55);
}

.pj-label{
    font-size: 8pt;
    font-weight: 400;
    color: rgba(255,204,102,.8);
    white-space: nowrap;
}

.pj-input-wrap{
    display:flex;
    align-items:center;
    gap: 6px;

    padding: 3px 6px;
    border-radius: 10px;
    border: 1px solid rgba(255,180,0,.18);
    background: rgba(12,14,20,.55);
}

.pj-input{
    width: 64px;
    height: 26px;

    font-size: 8pt;          /* ✅ 8pt */
    font-weight: 400;
    text-align: center;

    border: none;
    outline: none;
    border-radius: 8px;
    background: rgba(19,22,34,.85);
    color: #ffcc66;
}

/* ซ่อนปุ่มขึ้น/ลงของ number */
.pj-input::-webkit-outer-spin-button,
.pj-input::-webkit-inner-spin-button{ -webkit-appearance: none; }
.pj-input[type=number]{ -moz-appearance: textfield; }

.pj-of{
    font-size: 8pt;
    color: rgba(255,204,102,.65);
}

.pj-btn{
    height: 26px;
    padding: 0 10px;

    font-size: 8pt;
    font-weight: 400;

    border-radius: 9px;
    border: 1px solid rgba(255,165,0,.35);
    background: rgba(255,165,0,.10);
    color: #ffcc66;
}

.pj-btn:hover{
    background: linear-gradient(180deg, #ffb300, #ff8f00);
    color: #111;
    border-color: rgba(255,160,0,.85);
}

/* ==============================
   Mobile polish (ไม่รก)
   ============================== */
@media (max-width: 575px){
    .pager-wrap{
        padding: 8px;
    }

    .pagination-darkorange{
        justify-content: center;
    }

    .pagination-darkorange .page-link{
        min-width: 28px;
        height: 28px;
        padding: 0 6px;
        border-radius: 8px;
    }

    /* Jump ไปอยู่บรรทัดถัดไป เนียนๆ */
    .pager-jump-form{
        width: 100%;
        justify-content: space-between;
        margin-top: 6px;
    }

    .pj-input{
        width: 56px;
    }
}
#posts:focus{
    outline: none;
}
/* ===== Premium single-row pagination on mobile ===== */

.pager-wrap{
    display:flex;
    align-items:center;
    justify-content:center;
    gap: 8px;
}

/* ให้ pagination เป็นแถวเดียวเสมอ + เลื่อนข้างได้ */
.pager-pagination{
    flex-wrap: nowrap !important;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;

    /* ซ่อน scrollbar ให้พรีเมียม */
    scrollbar-width: none;          /* Firefox */
}
.pager-pagination::-webkit-scrollbar{
    display: none;                  /* Chrome/Safari */
}

/* กันไม่ให้ปุ่มหดจนแปลก */
.pager-pagination .page-item{
    flex: 0 0 auto;
    scroll-snap-align: start;
}

/* มือถือ: ให้ทั้งชุดอยู่บรรทัดเดียว ไม่ wrap */
@media (max-width: 575px){
    .pager-wrap{
        flex-wrap: nowrap !important;
        justify-content: flex-start;
        gap: 8px;
        padding: 8px;
    }

    /* pagination กินพื้นที่หลัก */
    .pager-pagination{
        flex: 1 1 auto;
        max-width: 100%;
    }

    /* ถ้ามี Jump ให้เป็น compact และไม่ดัน pagination ตกบรรทัด */
    .pager-jump{
        flex: 0 0 auto;
    }

    .pager-jump-form{
        padding: 4px 6px;
        gap: 6px;
        border-radius: 12px;
    }

    .pj-label{
        display:none; /* ✅ ซ่อนคำว่า "ไปหน้า" บนมือถือให้ไม่รก */
    }

    .pj-input-wrap{
        padding: 2px 6px;
        gap: 6px;
    }

    .pj-input{
        width: 46px;   /* ✅ เล็กลง */
        height: 26px;
    }

    .pj-of{
        display:none;  /* ✅ ซ่อน / totalPages บนมือถือให้ดูโล่ง */
    }

    .pj-btn{
        height: 26px;
        padding: 0 10px;
    }
}
