/* =========================================================
   PLUS UI — hesap yaşam döngüsü, profil editörü,
   takip istekleri ve grup mesajları.
   ========================================================= */

/* ---------- Hesap dondurma / silme ---------- */
.al-overlay {
    position: fixed;
    inset: 0;
    z-index: 120000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 10, 18, 0.62);
    backdrop-filter: blur(6px);
    animation: alFade .18s ease;
}

@keyframes alFade { from { opacity: 0; } to { opacity: 1; } }

.al-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    color: #1c1e21;
    border-radius: 20px;
    padding: 26px 24px 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    font-family: inherit;
}

.al-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
    background: rgba(67, 97, 238, .12);
    color: #4361ee;
}

.al-icon.is-danger {
    background: rgba(237, 73, 86, .12);
    color: #ed4956;
}

.al-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
}

.al-text {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.55;
    color: #5b6270;
}

.al-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #5b6270;
    margin: 12px 0 6px;
}

.al-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #d8dbe2;
    border-radius: 12px;
    font: inherit;
    font-size: 15px;
    outline: none;
    background: #fff;
    color: #1c1e21;
}

.al-input:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, .15);
}

.al-error {
    min-height: 18px;
    margin-top: 8px;
    font-size: 12.5px;
    color: #ed4956;
    font-weight: 600;
}

.al-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.al-btn {
    flex: 1;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.al-btn:disabled { opacity: .6; cursor: default; }
.al-ghost { background: #f1f2f6; color: #3a3f4b; }
.al-primary { background: linear-gradient(135deg, #4361ee, #7b2ff7); color: #fff; }
.al-danger { background: #ed4956; color: #fff; }

html[data-theme="dark"] .al-card {
    background: #1a1a23;
    color: #f2f3f7;
    border: 1px solid #2a2b35;
}

html[data-theme="dark"] .al-text,
html[data-theme="dark"] .al-label { color: #a9afbe; }
html[data-theme="dark"] .al-input { background: #22222d; color: #f2f3f7; border-color: #343541; }
html[data-theme="dark"] .al-ghost { background: #262631; color: #e7e9ef; }

/* ---------- Profil görsel editörü ---------- */
.pe-edit-btn {
    position: absolute;
    left: 15px;
    bottom: 15px;
    z-index: 12;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 17, 26, .58);
    color: #fff;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background .15s ease, transform .15s ease;
}

.pe-edit-btn:hover { background: rgba(15, 17, 26, .78); transform: translateY(-1px); }

.pe-avatar-badge {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: linear-gradient(135deg, #00baff, #6c6ce8);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 110;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.pe-overlay {
    position: fixed;
    inset: 0;
    z-index: 120001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(8, 10, 18, .62);
    backdrop-filter: blur(5px);
}

.pe-overlay.is-open { display: flex; }

.pe-sheet {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
    font-family: inherit;
    color: #1c1e21;
}

.pe-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.pe-head h3 { margin: 0; font-size: 19px; font-weight: 800; }
.pe-head p { margin: 4px 0 0; font-size: 12.5px; color: #6b7280; }

.pe-close {
    border: none;
    background: #f1f2f6;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #4b5563;
}

.pe-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #e6e8ee;
    border-radius: 16px;
    margin-bottom: 12px;
}

.pe-thumb {
    width: 74px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #eef1f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa3b2;
    font-size: 22px;
}

.pe-avatar-thumb { width: 62px; height: 62px; border-radius: 50%; }
.pe-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pe-info { flex: 1; min-width: 0; }
.pe-info strong { display: block; font-size: 14px; }
.pe-info small { display: block; font-size: 11.5px; color: #7b8290; margin-top: 2px; }
.pe-actions { display: flex; gap: 8px; margin-top: 9px; }

.pe-btn {
    border: none;
    border-radius: 9px;
    padding: 8px 13px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #4361ee, #7b2ff7);
    color: #fff;
}

.pe-btn.pe-ghost { background: #eef0f6; color: #4b5563; }

.pe-tip {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7280;
    background: #f6f7fb;
    border-radius: 12px;
    padding: 10px 12px;
}

.pe-busy {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #4361ee;
}

.pe-busy.is-on { display: flex; }

.pe-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(67, 97, 238, .25);
    border-top-color: #4361ee;
    animation: peSpin .7s linear infinite;
}

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

.profile-cover.pe-drop { outline: 3px dashed #00baff; outline-offset: -6px; }

html[data-theme="dark"] .pe-sheet { background: #1a1a23; color: #f2f3f7; border: 1px solid #2a2b35; }
html[data-theme="dark"] .pe-head p,
html[data-theme="dark"] .pe-info small,
html[data-theme="dark"] .pe-tip { color: #a9afbe; }
html[data-theme="dark"] .pe-close { background: #262631; color: #e7e9ef; }
html[data-theme="dark"] .pe-row { border-color: #2f303b; }
html[data-theme="dark"] .pe-thumb { background: #24252f; color: #7d8394; }
html[data-theme="dark"] .pe-btn.pe-ghost { background: #2a2b36; color: #e7e9ef; }
html[data-theme="dark"] .pe-tip { background: #22222d; }
html[data-theme="dark"] .pe-avatar-badge { border-color: #1a1a23; }

/* ---------- Takip istekleri ---------- */
.np-card {
    margin: 15px 20px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e7e9ef;
    box-shadow: 0 6px 18px rgba(17, 24, 39, .05);
}

.np-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.np-title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 800; }
.np-title i { color: #6c6ce8; }
.np-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #6c6ce8;
    color: #fff;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.np-head small { color: #7b8290; font-size: 11.5px; }
.np-card.is-empty { display: none; }

.np-list { display: flex; flex-direction: column; gap: 8px; }
.np-empty { font-size: 12.5px; color: #8a90a0; padding: 6px 2px; }

.np-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
    background: #f7f8fc;
}

.np-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.np-info { flex: 1; min-width: 0; }
.np-info strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-info small { font-size: 11px; color: #7b8290; }

.np-actions, .np-item-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }

.np-btn {
    border: none;
    border-radius: 9px;
    padding: 8px 12px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.np-btn:disabled { opacity: .55; cursor: default; }
.np-primary { background: linear-gradient(135deg, #4361ee, #7b2ff7); color: #fff; }
.np-ghost { background: #e9ebf3; color: #454b59; }

/* Bildirim satırındaki istek düğmeleri */
.notification-item .np-item-actions { padding-left: 54px; }

html[data-theme="dark"] .np-card { background: #1a1a23; border-color: #2a2b35; }
html[data-theme="dark"] .np-head small,
html[data-theme="dark"] .np-info small,
html[data-theme="dark"] .np-empty { color: #a9afbe; }
html[data-theme="dark"] .np-row { background: #23232e; }
html[data-theme="dark"] .np-ghost { background: #2c2d38; color: #e7e9ef; }

/* ---------- Daraltılmış kenar çubuğu: ⋮ menüsü kırpılmasın ---------- */
.sidebar-submenu.is-open {
    display: block !important;
}

@media (min-width: 769px) {
    .sidebar.collapsed .sidebar-more-container,
    .sidebar.collapsed .more-menu-wrapper {
        overflow: visible;
    }

    .sidebar.collapsed .sidebar-submenu.is-open {
        position: fixed;
        left: 70px;
        bottom: 22px;
        z-index: 100000;
        max-height: calc(100vh - 44px);
        overflow-y: auto;
    }

    .sidebar-submenu {
        max-height: calc(100vh - 90px);
        overflow-y: auto;
    }
}

/* ---------- Mobil alt bar: "..." düğmesi geri gelsin ----------
   mobile-shell.css bu düğmeyi tamamen gizliyordu; bu yüzden küçük
   ekranda Ayarlar / İstek / Şikayet menüsüne ulaşılamıyordu. */
@media (max-width: 768px) {
    .sidebar .sidebar-more-container {
        display: flex !important;
        position: static !important;
        width: 52px !important;
        height: 100% !important;
        padding: 0 !important;
        margin-top: 0 !important;
        border-top: none !important;
        background: transparent !important;
    }

    .sidebar .more-menu-wrapper {
        width: 100% !important;
        height: 100% !important;
    }

    .sidebar-submenu.is-open {
        position: fixed !important;
        left: auto !important;
        right: 10px !important;
        bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
        top: auto !important;
        width: min(232px, 80vw) !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
        z-index: 100000 !important;
    }
}

/* ---------- Grup mesajları: avatar + isim + ⋮ ---------- */
.gc-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 12px;
    max-width: 86%;
}

.gc-row.is-mine { margin-left: auto; flex-direction: row-reverse; }

.gc-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    background: #dfe3ec;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #667085;
    overflow: hidden;
}

.gc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gc-col { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gc-sender { font-size: 11.5px; font-weight: 700; color: #6b7280; padding-left: 4px; }

.gc-bubble {
    position: relative;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14.5px;
    line-height: 1.45;
    word-break: break-word;
    background: #eef0f6;
    color: #1c1e21;
}

.gc-row.is-mine .gc-bubble {
    background: linear-gradient(135deg, #4361ee, #7b5cff);
    color: #fff;
    border-bottom-right-radius: 5px;
}

.gc-row:not(.is-mine) .gc-bubble { border-bottom-left-radius: 5px; }

.gc-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    color: #8a90a0;
    padding: 0 4px;
}

.gc-more {
    border: none;
    background: transparent;
    color: #8a90a0;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 6px;
}

.gc-more:hover { background: rgba(0, 0, 0, .06); }

.gc-menu {
    position: fixed;
    z-index: 90000;
    min-width: 160px;
    background: #fff;
    border: 1px solid #e5e7ee;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
    padding: 6px;
}

.gc-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    border: none;
    background: transparent;
    padding: 9px 10px;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    color: #2f3440;
    cursor: pointer;
    text-align: left;
}

.gc-menu button:hover { background: #f2f4f9; }
.gc-menu button.is-danger { color: #ed4956; }

html[data-theme="dark"] .gc-bubble { background: #262632; color: #f2f3f7; }
html[data-theme="dark"] .gc-row.is-mine .gc-bubble { background: linear-gradient(135deg, #4f6bdd, #7b5cff); color: #fff; }
html[data-theme="dark"] .gc-sender,
html[data-theme="dark"] .gc-meta { color: #a9afbe; }
html[data-theme="dark"] .gc-menu { background: #1c1c26; border-color: #2c2d38; }
html[data-theme="dark"] .gc-menu button { color: #f2f3f7; }
html[data-theme="dark"] .gc-menu button:hover { background: #282834; }
