
/* ============================================
   PROFILE MODAL
   ============================================ */
.pm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.pm-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
/* Delete account overlay — higher z-index */
.pm-overlay#deleteAccountOverlay {
    z-index: 10010;
}

.pm-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 340px;
    max-height: 90vh;
    background: #101218;
    border: 1px solid rgba(212, 168, 67, 0.25);
    border-radius: 16px;
    z-index: 99999;
    padding: 28px 24px 20px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    overflow-y: auto;
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.28);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    /* الاتجاه يُضبط ديناميكياً عبر JS بناءً على لغة الواجهة (ar=rtl, en=ltr) */
    direction: rtl;
}
/* Delete account modal — higher z-index */
.pm-modal#deleteAccountModal {
    z-index: 10011;
}
/* وضع الإنجليزية: LTR */
.pm-modal[dir="ltr"] {
    direction: ltr;
    text-align: left;
}
.pm-modal[dir="ltr"] .pm-close {
    left: auto;
    right: 12px;
}
.pm-modal[dir="ltr"] .pm-menu-item {
    text-align: left;
}
.pm-modal[dir="ltr"] .pm-menu-label {
    text-align: left;
}
.pm-modal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.pm-close {
    position: absolute;
    top: 10px;
    left: 12px;
    background: none;
    border: none;
    color: #888;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.15s;
}
.pm-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* Avatar + Name */
.pm-header {
    text-align: center;
    margin-bottom: 20px;
}
.pm-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid #d4a843;
    margin-bottom: 10px;
    object-fit: cover;
}
.pm-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}
.pm-email {
    font-size: 12px;
    color: #888;
}

/* Subscription Card */
.pm-sub-card {
    background: rgba(212, 168, 67, 0.06);
    border: 1px solid rgba(212, 168, 67, 0.15);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.pm-sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.pm-sub-row + .pm-sub-row {
    margin-top: 8px;
}
.pm-sub-label {
    color: #aaa;
}
.pm-badge {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}
.pm-badge-free {
    background: rgba(100, 100, 100, 0.2);
    color: #aaa;
}
.pm-badge-pro {
    background: rgba(212, 168, 67, 0.18);
    color: #d4a843;
    border: 1px solid rgba(212, 168, 67, 0.3);
}
.pm-badge-yearly {
    background: rgba(99, 102, 241, 0.18);
    color: #a78bfa;
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.pm-expire {
    color: #ccc;
    font-size: 12px;
}

/* Menu */
.pm-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}
.pm-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s;
    color: #ddd;
    font-size: 13px;
    text-align: right;
}
.pm-menu-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.08);
}
.pm-menu-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
}
/* v3.9.7: أيقونات SVG على نمط موقع Anima Studio (خطية، ذهبية) */
.pm-menu-icon svg,
.pm-sub-label svg {
    width: 16px;
    height: 16px;
    vertical-align: -3px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
}
.pm-menu-icon svg {
    width: 18px;
    height: 18px;
    color: var(--gold, #d4a843);
    vertical-align: middle;
}
.pm-sub-label svg {
    color: var(--gold, #d4a843);
    margin-inline-end: 6px;
}
.pm-logout .pm-menu-icon svg {
    color: #ff8b8b;
}
.pm-menu-label {
    flex: 1;
}
.pm-menu-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a78bfa;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 8px;
    font-weight: 600;
}
.pm-menu-arrow {
    width: 14px;
    height: 14px;
    color: #666;
}
.pm-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 8px 0;
}
.pm-logout {
    color: #ef4444 !important;
}
.pm-logout:hover {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.15) !important;
}
