/* ════════════════════════════════════════════════════════════
 * GBI Slawi — avatar.css
 * Upload & hapus foto profil
 * ════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════
   AVATAR SECTION — Profile Modal
   Gantikan seluruh blok .pm-avatar-* lama di style.css
   (dari baris 13159 s/d akhir file)
   ════════════════════════════════════════════════════════════ */

/* ── Wrapper vertikal terpusat untuk semua elemen avatar ── */
.pm-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    width: 100%;
}

/* ── Lingkaran avatar ── */
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* ── Tombol kamera (overlay pojok kanan bawah) ── */
.pm-avatar-edit-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gold, #c9a84c);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    z-index: 2;
    line-height: 1;
}

.pm-avatar-edit-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
}

/* ── Hint ukuran file ── */
.pm-avatar-hint {
    font-size: 11px;
    color: var(--text3, #888);
    text-align: center;
    margin: 0;
    line-height: 1.3;
}

/* ── Alert sukses / error upload ── */
.pm-avatar-alert-box {
    width: 100%;
    max-width: 200px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
}

.pm-avatar-alert-box.success {
    background: rgba(46, 213, 115, .15);
    border: 1px solid rgba(46, 213, 115, .4);
    color: #2ed573;
}

.pm-avatar-alert-box.error {
    background: rgba(255, 71, 87, .12);
    border: 1px solid rgba(255, 71, 87, .35);
    color: #ff6b81;
}

/* ── Tombol hapus foto ── */
.pm-avatar-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    font-size: 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 71, 87, .45);
    color: var(--danger, #ff4757);
    background: transparent;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}

.pm-avatar-delete-btn:hover {
    background: rgba(255, 71, 87, .1);
    border-color: var(--danger, #ff4757);
}

/* ════════════════════════════════════════════════════════════
   AVATAR & MOBILE BAR — Profile Modal
   Gantikan seluruh blok .pm-avatar-* lama di style.css
   (dari baris 13159 s/d akhir file), lalu tambahkan
   blok @media mobile di bawahnya.
   ════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────────────────
   DESKTOP — avatar section di panel kiri
   ───────────────────────────────────────────────────────────── */

/* Wrapper vertikal terpusat */
.pm-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    width: 100%;
}

/* Gambar avatar mengisi lingkaran */
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Tombol kamera — overlay pojok kanan bawah avatar */
.pm-avatar-edit-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gold, #c9a84c);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    z-index: 2;
    line-height: 1;
}

.pm-avatar-edit-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
}

/* Hint ukuran file */
.pm-avatar-hint {
    font-size: 11px;
    color: var(--text3, #888);
    text-align: center;
    margin: 0;
    line-height: 1.3;
}

/* Alert sukses / error (desktop panel kiri) */
.pm-avatar-alert-box {
    width: 100%;
    max-width: 200px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    line-height: 1.4;

    /* Animasi: opacity + geser ke atas saat masuk/keluar */
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .35s ease, transform .35s ease;
}

/* State: tampil */
.pm-avatar-alert-box.pm-alert-visible {
    opacity: 1;
    transform: translateY(0);
}

/* State: sedang menghilang — fade + naik sedikit */
.pm-avatar-alert-box.pm-alert-hiding {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .5s ease, transform .5s ease;
}

.pm-avatar-alert-box.success {
    background: rgba(46, 213, 115, .15);
    border: 1px solid rgba(46, 213, 115, .4);
    color: #2ed573;
}

.pm-avatar-alert-box.error {
    background: rgba(255, 71, 87, .12);
    border: 1px solid rgba(255, 71, 87, .35);
    color: #ff6b81;
}


/* ─────────────────────────────────────────────────────────────
   MOBILE AVATAR BAR — di dalam panel kanan, tampil ≤640px
   ───────────────────────────────────────────────────────────── */

/* Tersembunyi di desktop */
.pm-mobile-avatar-bar {
    display: none;
}

@media (max-width: 640px) {

    /* Bar horizontal flush ke tepi panel kanan */
    .pm-mobile-avatar-bar {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 16px;
        /* panel-right mobile punya padding 24px 20px,
       negatif ini membuat bar menempel ke tepi atas & samping */
        margin: -24px -20px 20px;
        background: linear-gradient(135deg, var(--bg3, #1a1710) 0%, #110e06 100%);
        border-bottom: 1px solid var(--gold-border, rgba(201, 168, 76, .25));
    }

    /* Wrapper lingkaran avatar di mobile */
    .pm-mobile-avatar-wrap {
        position: relative;
        flex-shrink: 0;
    }

    /* Avatar 64px di mobile bar */
    .pm-mobile-avatar-wrap .profile-avatar {
        width: 64px;
        height: 64px;
        font-size: 26px;
    }

    /* Tombol kamera mobile — sedikit lebih kecil */
    .pm-mobile-avatar-wrap .pm-avatar-edit-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
        bottom: 1px;
        right: 1px;
    }

    /* Info teks di sebelah kanan avatar */
    .pm-mobile-avatar-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex: 1;
        min-width: 0;
    }

    .pm-mobile-name {
        font-size: 14px;
        font-weight: 700;
        color: var(--text, #f0e6c8);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pm-mobile-hint {
        font-size: 10.5px;
        color: var(--text3, #888);
    }

    /* Alert di mobile bar — lebar penuh, tanpa max-width */
    .pm-mobile-avatar-info .pm-avatar-alert-box {
        max-width: none;
        width: 100%;
        padding: 5px 10px;
        font-size: 11px;
        text-align: left;
    }

    /* pm-avatar-section di panel kiri tidak perlu dirender
     (panel kiri sudah display:none di mobile) */
    .pm-avatar-section {
        display: none;
    }

    /* Modal wrap mobile — tinggi maks lebih besar agar bar + konten muat */
    .profile-panel-right {
        max-height: 90vh;
    }
}

/* ════════════════════════════════════════════════════════════
   AVATAR & MOBILE BAR — Profile Modal
   Gantikan seluruh blok .pm-avatar-* lama di style.css
   (dari baris 13159 s/d akhir file), lalu tambahkan
   blok @media mobile di bawahnya.
   ════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────────────────
   DESKTOP — avatar section di panel kiri
   ───────────────────────────────────────────────────────────── */

/* Wrapper vertikal terpusat */
.pm-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    width: 100%;
}

/* Gambar avatar mengisi lingkaran */
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Tombol kamera — overlay pojok kanan bawah avatar */
.pm-avatar-edit-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gold, #c9a84c);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    z-index: 2;
    line-height: 1;
}

.pm-avatar-edit-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
}

/* Hint ukuran file */
.pm-avatar-hint {
    font-size: 11px;
    color: var(--text3, #888);
    text-align: center;
    margin: 0;
    line-height: 1.3;
}

/* Alert sukses / error (desktop panel kiri) */
.pm-avatar-alert-box {
    width: 100%;
    max-width: 200px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    line-height: 1.4;

    /* Animasi: opacity + geser ke atas saat masuk/keluar */
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .35s ease, transform .35s ease;
}

/* State: tampil */
.pm-avatar-alert-box.pm-alert-visible {
    opacity: 1;
    transform: translateY(0);
}

/* State: sedang menghilang — fade + naik sedikit */
.pm-avatar-alert-box.pm-alert-hiding {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .5s ease, transform .5s ease;
}

.pm-avatar-alert-box.success {
    background: rgba(46, 213, 115, .15);
    border: 1px solid rgba(46, 213, 115, .4);
    color: #2ed573;
}

.pm-avatar-alert-box.error {
    background: rgba(255, 71, 87, .12);
    border: 1px solid rgba(255, 71, 87, .35);
    color: #ff6b81;
}


/* ─────────────────────────────────────────────────────────────
   MOBILE AVATAR BAR — di dalam panel kanan, tampil ≤640px
   ───────────────────────────────────────────────────────────── */

/* Tersembunyi di desktop */
.pm-mobile-avatar-bar {
    display: none;
}

@media (max-width: 640px) {

    /* Bar horizontal flush ke tepi panel kanan */
    .pm-mobile-avatar-bar {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 16px;
        /* panel-right mobile punya padding 24px 20px,
       negatif ini membuat bar menempel ke tepi atas & samping */
        margin: -24px -20px 20px;
        background: linear-gradient(135deg, var(--bg3, #1a1710) 0%, #110e06 100%);
        border-bottom: 1px solid var(--gold-border, rgba(201, 168, 76, .25));
    }

    /* Wrapper lingkaran avatar di mobile */
    .pm-mobile-avatar-wrap {
        position: relative;
        flex-shrink: 0;
    }

    /* Avatar 64px di mobile bar */
    .pm-mobile-avatar-wrap .profile-avatar {
        width: 64px;
        height: 64px;
        font-size: 26px;
    }

    /* Tombol kamera mobile — sedikit lebih kecil */
    .pm-mobile-avatar-wrap .pm-avatar-edit-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
        bottom: 1px;
        right: 1px;
    }

    /* Info teks di sebelah kanan avatar */
    .pm-mobile-avatar-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex: 1;
        min-width: 0;
    }

    .pm-mobile-name {
        font-size: 14px;
        font-weight: 700;
        color: var(--text, #f0e6c8);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pm-mobile-hint {
        font-size: 10.5px;
        color: var(--text3, #888);
    }

    /* Alert di mobile bar — lebar penuh, tanpa max-width */
    .pm-mobile-avatar-info .pm-avatar-alert-box {
        max-width: none;
        width: 100%;
        padding: 5px 10px;
        font-size: 11px;
        text-align: left;
    }

    /* pm-avatar-section di panel kiri tidak perlu dirender
     (panel kiri sudah display:none di mobile) */
    .pm-avatar-section {
        display: none;
    }

    /* Modal wrap mobile — tinggi maks lebih besar agar bar + konten muat */
    .profile-panel-right {
        max-height: 90vh;
    }
}

/* ════════════════════════════════════════════════════════════
   NEWS REDESIGN — GBI Slawi
   Editorial Magazine Style · Dark + Gold
   Replace the existing news CSS block in style.css
   ════════════════════════════════════════════════════════════ */

/* ── Section wrapper ── */
.section-berita {
    padding: 110px 24px 120px;
    background: var(--bg);
    min-height: 100vh;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

