/* =====================================================
   profile-more.css — Tombol & Popup Menu Titik Tiga
   Halaman Profil (dark & light mode)
   ===================================================== */

/* Tombol titik tiga */
.btn-profile-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color, #cfd9de);
    background: transparent;
    color: var(--text-main);
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
}

.btn-profile-more:hover {
    background: var(--hover-bg, rgba(15,20,25,0.07));
}

/* Dark mode */
[data-theme="dark"] .btn-profile-more,
body.dark-mode .btn-profile-more {
    border-color: var(--border-color, #2f3336);
    color: var(--text-main);
}

[data-theme="dark"] .btn-profile-more:hover,
body.dark-mode .btn-profile-more:hover {
    background: rgba(255,255,255,0.07);
}

/* Wrapper posisi relatif khusus untuk tombol titik tiga + popup-nya */
.profile-more-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Pastikan container tombol tetap flexbox */
.profile-action-btn {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

/* Tombol pesan */
.btn-profile-msg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--text-main);
    color: var(--bg-body);
    text-decoration: none;
    font-size: 16px;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.btn-profile-msg:hover {
    opacity: 0.85;
}

/* Popup menu — posisi relatif terhadap .profile-more-wrapper */
.profile-more-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 260px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    z-index: 999;
    overflow: hidden;
    animation: fadeInPopup 0.15s ease;
}

@keyframes fadeInPopup {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.profile-more-popup ul {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.profile-more-popup ul li button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    text-align: left;
    transition: background 0.12s;
    line-height: 1.3;
}

.profile-more-popup ul li button i {
    font-size: 17px;
    flex-shrink: 0;
    color: var(--text-main);
}

.profile-more-popup ul li button:hover {
    background: var(--hover-bg, rgba(15,20,25,0.06));
}

[data-theme="dark"] .profile-more-popup ul li button:hover,
body.dark-mode .profile-more-popup ul li button:hover {
    background: rgba(255,255,255,0.06);
}

/* Item berbahaya (blokir, laporkan) */
.profile-more-popup ul li button.danger-item,
.profile-more-popup ul li button.danger-item i {
    color: #e0245e;
}

.profile-more-popup ul li button.danger-item:hover {
    background: rgba(224,36,94,0.07);
}

/* Divider */
.profile-more-popup ul li.menu-divider {
    height: 1px;
    background: var(--border-color, #e1e8ed);
    margin: 4px 0;
    padding: 0;
}

[data-theme="dark"] .profile-more-popup ul li.menu-divider,
body.dark-mode .profile-more-popup ul li.menu-divider {
    background: var(--border-color, #2f3336);
}

/* Toast notifikasi kecil */
.profile-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: var(--bg-body);
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.profile-toast.show {
    opacity: 1;
}