/* ============================================
   نظام الريأكت الجديد - زي واتساب
   ============================================ */

/* -------- حاوية الزر (inline في آخر السطر) -------- */
.chat_react_opt {
    display: inline !important;
    vertical-align: middle !important;
    padding: 0 2px !important;
    line-height: 1 !important;
    flex-shrink: 0;
}

.chat_react_opt:empty {
    display: none !important;
}

/* -------- زر سمايل الصغير -------- */
.chat_react_plus_btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    border-radius: 50% !important;
    background: rgba(142, 160, 170, 0.15) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    opacity: 0.5;
    vertical-align: middle !important;
    line-height: 1 !important;
    margin-inline-start: 3px !important;
    position: relative !important;
}

.chat_react_plus_btn:hover {
    background: rgba(142, 160, 170, 0.35) !important;
    opacity: 1 !important;
    transform: scale(1.25);
}

.chat_react_plus_btn.active {
    opacity: 1 !important;
    background: rgba(142, 160, 170, 0.3) !important;
}

.react_smiley_icon {
    font-size: 13px !important;
    line-height: 1 !important;
    display: inline-block !important;
    margin-top: -1px !important;
}

/* -------- قائمة الريأكت العايمة (Floating Picker) -------- */
@keyframes reactPickerIn {
    0% { transform: translateY(8px) scale(0.85); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.react_picker_floating {
    position: fixed !important;
    z-index: 10000 !important;
    background: #ffffff !important;
    border-radius: 25px !important;
    padding: 4px 6px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 1px 6px rgba(0, 0, 0, 0.08) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 2px !important;
    animation: reactPickerIn 0.2s ease forwards !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
}

/* الوضع الداكن */
.dark_mode .react_picker_floating {
    background: #2a2a3a !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

.react_picker_items {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 2px !important;
}

.react_picker_item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 50% !important;
    background: transparent !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
}

.react_picker_item:hover {
    transform: scale(1.35) translateY(-5px);
    background: #f2f3f5 !important;
}

.dark_mode .react_picker_item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.react_picker_item img {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    object-fit: contain !important;
    display: block !important;
}

/* -------- شارة عدد الريأكشنز (Badge inline في آخر السطر) -------- */
.chat_react_summary {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 1px;
    width: max-content !important;
    height: 17px !important;
    margin-inline-start: 3px !important;
    padding: 1px 5px !important;
    background: #e8ecf1 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    overflow: hidden;
    cursor: pointer;
    vertical-align: middle !important;
    line-height: 1 !important;
    position: relative !important;
    top: -1px !important;
}

.dark_mode .chat_react_summary {
    background: #363646 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.chat_react_summary img {
    width: 11px !important;
    height: 11px !important;
    min-width: 11px !important;
    min-height: 11px !important;
    max-width: 11px !important;
    max-height: 11px !important;
    object-fit: contain !important;
    margin-inline-start: -2px;
    flex-shrink: 0;
    display: block !important;
}

.chat_react_summary img:first-child {
    margin-inline-start: 0;
}

.chat_react_summary span {
    font-size: 9px !important;
    margin-inline-start: 2px;
    color: #555;
    line-height: 1;
    flex-shrink: 0;
}

.dark_mode .chat_react_summary span {
    color: #aaa;
}

/* removed global react overflow rule; keep overflow scoped to react controls */

/* -------- أنيميشن -------- */
@keyframes reactPop {
    0% { transform: translateY(10px) scale(0.5); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* -------- dark mode extras -------- */
.dark_mode #emo_item {
    background: linear-gradient(135deg, #03add8, #0395bb);
    box-shadow: 0 0 12px rgba(3, 173, 216, 0.35);
}

.dark_mode #emo_item i {
    color: #fff;
}

/* -------- زر الاقتباس عند الهوفر (جمب السمايل) -------- */
.chat_quote_opt {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    border-radius: 50% !important;
    background: rgba(142, 160, 170, 0.15) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    opacity: 0.5;
    vertical-align: middle !important;
    line-height: 1 !important;
    margin-inline-start: 3px !important;
    color: #5a6872 !important;
    font-size: 12px !important;
    animation: reactPop 0.2s ease forwards !important;
}
.chat_quote_opt:hover {
    background: rgba(142, 160, 170, 0.35) !important;
    opacity: 1 !important;
    transform: scale(1.25);
}
.dark_mode .chat_quote_opt {
    color: #b8c4ce !important;
}
@keyframes reactPop {
    0% { transform: translateY(10px) scale(0.5); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
