/* تأكد من هذه الأنماط */
.modweeb-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    z-index: 10000 !important;
}

#modweeb-chat-close {
    z-index: 10001 !important;
    position: relative !important;
    pointer-events: auto !important;
}
	/* تحسين مظهر أيقونة اللانهاية */
.usage-item svg.line {
    width: 14px !important;
    height: 14px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.usage-item.unlimited svg.line {
    stroke: var(--success, #10b981) !important;
}

.usage-item:hover svg.line {
    stroke: currentColor !important;
}
	/* للأزرار بدون نصوص */
.modweeb-head-actions button {
    background: var(--contentBa, #f4f8ff) !important;
    color: var(--notifC, #666) !important;
    border: 1px solid var(--contentL, #e3e7ef) !important;
    border-radius: 50% !important;
    width: 28px !important; /* حجم ثابت للأزرار بدون نصوص */
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
}

.modweeb-head-actions button:hover {
    background: var(--linkC, #2563eb) !important;
    color: var(--white) !important;
    border-color: var(--linkC, #2563eb) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}

.modweeb-head-actions button svg {
    width: 14px !important;
    height: 14px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    opacity: 0.8 !important;
}
	/* أنماط usage-item المفقودة */
.usage-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    background: var(--contentBa, #f4f8ff);
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid var(--contentL, #e3e7ef);
    transition: all 0.3s ease;
}

.usage-item svg {
    width: 12px;
    height: 12px;
    opacity: 0.8;
}

.usage-item.unlimited {
    background: var(--success-light, #d1fae5);
    color: var(--success, #10b981);
    border-color: var(--success, #10b981);
}

.usage-item.limited {
    background: var(--warning-light, #fef3c7);
    color: var(--warning, #f59e0b);
    border-color: var(--warning, #f59e0b);
}

.usage-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
	/* تصميم كروي */
.usage-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    background: var(--contentBa, #f4f8ff);
    border: 1px solid var(--contentL, #e3e7ef);
    position: relative;
}

.usage-circle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--linkC, #2563eb);
    border-top-color: transparent;
    transform: rotate(-45deg);
}
	/* تحسين تصميم الرأس مع الأزرار الجديدة */
.modweeb-head {
    background: var(--contentBa,#f4f8ff);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--contentL,#e3e7ef);
    font-family: var(--fontH);
    cursor: default;
    gap: 10px;
}

.modweeb-head-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 10px;
}

/* إزالة قسم modweeb-actions السفلي */
.modweeb-actions {
    display: none !important;
}
	/* إضافة خلفية لـ textarea */
#modweeb-input {
    flex: 1;
    padding: 7px 11px;
    border-radius: 9px;
    border-color: var(--linkC,#2563eb);
    font-size: 10px;
    color: var(--bodyC,#222);
    outline: 0;
    min-height: 32px;
    max-height: 62px;
    transition: border-color .3s ease;
    background: var(--contentBa, #f4f8ff) !important; /* أضف هذا السطر */
}
	/* إصلاح مشكلة الكيبورد والرأس */
.modweeb-fullscreen .modweeb-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: var(--contentB, #fff) !important;
    border-bottom: 1px solid var(--contentL, #e3e7ef) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    flex-shrink: 0 !important;
}

.modweeb-fullscreen #modweeb-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    max-height: none !important;
    min-height: auto !important;
    padding-bottom: 10px !important;
}

.modweeb-fullscreen .modweeb-input-wrap {
    position: sticky !important;
    bottom: 0 !important;
    background: var(--contentB, #fff) !important;
    border-top: 1px solid var(--contentL, #e3e7ef) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    flex-shrink: 0 !important;
}

/* تقليل تباعد الفقاعات وتحسين التصميم */
#modweeb-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px !important;
    display: flex;
    flex-direction: column;
    gap: 6px !important; /* تقليل التباعد من 9px إلى 6px */
    font-size: 10px;
    min-height: 60px;
}

.modweeb-msg-ai, .modweeb-msg-user {
    max-width: 92%;
    margin: 2px 0 !important; /* تقليل الهامش */
}

.modweeb-msg-user .bubble, .modweeb-msg-ai .bubble {
    padding: 6px 10px !important; /* تقليل الحشو الداخلي */
    line-height: 1.3 !important; /* تقليل تباعد الأسطر */
    margin: 0 !important;
}

/* تحسين تباعد الأيقونات */
.msg-controls {
    display: flex;
    gap: 4px !important; /* تقليل التباعد بين الأيقونات */
    align-items: center;
    margin-top: 4px !important; /* تقليل المسافة من الفقاعة */
}

.msg-controls button {
    width: 26px !important; /* تصغير الأيقونات قليلاً */
    height: 26px !important;
}

.msg-controls button svg {
    width: 12px !important;
    height: 12px !important;
}

/* تحسين الأنيميشن والحركات */
#modweeb-chat-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; /* حركة أكثر سلاسة */
}

.modweeb-msg-ai, .modweeb-msg-user {
    animation: messageSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transform-origin: center bottom;
}

@keyframes messageSlideIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* أنيميشن للشاشة الكاملة */
.modweeb-fullscreen {
    animation: fullscreenFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fullscreenFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* تحسين أنيميشن الأزرار */
.msg-controls button, .modweeb-actions button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* أنيميشن للنسخ */
@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.copy-reply:active {
    animation: copySuccess 0.3s ease;
}
/* إصلاح الرأس في الشاشة الكاملة */
.modweeb-fullscreen .modweeb-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: var(--contentB, #fff) !important;
    border-bottom: 1px solid var(--contentL, #e3e7ef) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.modweeb-fullscreen .modweeb-messages {
    max-height: calc(100vh - 180px) !important;
    height: auto !important;
    margin-top: 0 !important;
}

.modweeb-fullscreen .modweeb-input-wrap {
    position: sticky !important;
    bottom: 0 !important;
    background: var(--contentB, #fff) !important;
    border-top: 1px solid var(--contentL, #e3e7ef) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* تحسين التمرير */
.modweeb-fullscreen #modweeb-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    padding-bottom: 10px !important;
}

/* منع اختفاء العناصر */
.modweeb-fullscreen .modweeb-suggestions {
    position: relative !important;
    z-index: 5 !important;
}

/* تحسين أزرار التحكم في الرسائل */
.msg-controls {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
}

.msg-controls button {
    background: var(--contentB, #fff);
    border: 1px solid var(--contentL, #e3e7ef);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--notifC, #666);
    transition: all 0.3s ease;
    padding: 0;
}

.msg-controls button:hover {
    background: var(--linkC, #2563eb);
    color: var(--white);
    border-color: var(--linkC, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.msg-controls button svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.msg-controls button:active {
    transform: translateY(0);
}

/* أيقونات خاصة */
.msg-controls .like-btn.liked {
    background: var(--success, #10b981);
    border-color: var(--success, #10b981);
    color: white;
}

.msg-controls .dislike-btn.disliked {
    background: var(--danger, #ef4444);
    border-color: var(--danger, #ef4444);
    color: white;
}

/* تحسينات للشاشة الكاملة */
.modweeb-fullscreen .modweeb-messages {
    max-height: calc(100vh - 150px) !important;
    height: auto !important;
}

.modweeb-fullscreen .modweeb-input-wrap {
    padding: 15px 20px;
}

.modweeb-fullscreen .modweeb-suggestions {
    padding: 10px 20px;
}

.modweeb-fullscreen .modweeb-head {
    padding: 12px 20px;
}

/* إخفاء زر الدردشة عند التفعيل */
.modweeb-fullscreen ~ .modweeb-chat-btn {
    display: none !important;
}

.modweeb-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    z-index: 10000 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* زر الشاشة الكاملة */
.modweeb-fullscreen-btn {
    background: var(--contentL, #e3e7ef);
    color: var(--bodyC, #222);
    border: 1px solid var(--linkC, #2563eb);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.modweeb-fullscreen-btn:hover {
    background: var(--linkC, #2563eb);
    color: var(--white);
}

.modweeb-fullscreen-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* الأنماط الأساسية */
.modweeb-chat-btn{position:fixed;z-index:9999;right:20px;bottom:88px;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:none;border-radius:50%;background:var(--linkC,#2563eb);box-shadow:0 2px 12px #0002;visibility:visible;opacity:1;transition:var(--trans-2);cursor:pointer;outline:0}.modweeb-chat-btn[hidden]{display:flex;visibility:hidden;opacity:0}.modweeb-chat-btn:not([disabled])::before{content:'';position:absolute;z-index:-1;inset:0;background:inherit;border-radius:inherit;animation:1s cubic-bezier(0,0,.2,1) infinite modweeb-chat-ping}@keyframes modweeb-chat-ping{75%,to{transform:scale(1.6);opacity:0}}.modweeb-svg-btn-n{width:22px;height:22px;fill:none;stroke:#fff!important;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5}.modweeb-svg-h{width:14px;height:14px}#modweeb-chat-container{position:fixed;bottom:142px;right:32px;width:310px;max-width:97vw;min-width:210px;min-height:230px;max-height:480px;background:var(--contentB,#fff);border:1px solid var(--contentL,#e3e7ef);border-radius:18px;box-shadow:0 3px 24px #0001;z-index:9999;display:none;flex-direction:column;overflow:hidden;transition:var(--trans-2);touch-action:none;user-select:none}#modweeb-chat-container .modweeb-head{background:var(--contentBa,#f4f8ff);padding:8px 14px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--contentL,#e3e7ef);font-family:var(--fontH);cursor:default}

#modweeb-chat-container .modweeb-head span{font-weight:600;display:flex;align-items:center;gap:1px;font-size:11px;}



#modweeb-messages{flex:1;overflow-y:auto;padding:10px 12px;display:flex;flex-direction:column;gap:9px;font-size:10px;min-height:60px}

.modweeb-msg-ai,.modweeb-msg-user{max-width:99%}.modweeb-msg-user{align-self:flex-end}.modweeb-msg-user .bubble{background:var(--linkC,#2563eb);color:var(--white);border-radius:13px 13px 13px 7px;padding:8px 10px;box-shadow:0 1px 3px #0001;font-size:10px;line-height:1.4}

.modweeb-msg-ai{align-self:flex-start}.modweeb-msg-ai .bubble{background:var(--contentBa,#f4f8ff);border:1px solid var(--contentL,#e3e7ef);color:var(--bodyC,#222);border-radius:13px 13px 7px 13px;padding:8px 10px;box-shadow:0 1px 3px #0001;font-size:10px;line-height:1.4;word-break:break-word}.modweeb-msg-ai .bubble a{color:var(--linkC,#2563eb);text-decoration:underline}.modweeb-msg-ai .meta{display:flex;gap:6px;margin-top:6px;align-items:center}.modweeb-msg-ai img{max-width:240px;border-radius:8px;display:block;margin-top:6px;box-shadow:0 1px 6px rgba(0,0,0,.06)}.msg-controls{display:flex;gap:6px;align-items:center;margin-inline-start:6px}.msg-controls button{background:0 0;border:none;padding:4px;border-radius:6px;cursor:pointer;color:var(--notifC,#666)}.msg-controls button:hover{background:var(--contentL,#e3e7ef);color:var(--bodyC,#222)}#modweeb-chat-container .modweeb-input-wrap{padding:8px 11px 6px;border-top:1px solid var(--contentL,#e3e7ef);display:flex;align-items:center;gap:7px;background:var(--contentBa,#fafcff)}#modweeb-input{flex:1;padding:7px 11px;border-radius:9px;border-color:var(--linkC,#2563eb);font-size:10px;color:var(--bodyC,#222);outline:0;min-height:32px;max-height:62px;transition:border-color .3s ease}#modweeb-send{border:none;background:var(--linkC,#2563eb);color:var(--white);border-radius:9px;padding:0 11px;height:32px;display:flex;align-items:center;gap:2px;font-size:10px;transition:var(--trans-2);box-shadow:0 1px 4px #0001;cursor:pointer}#modweeb-send svg{width:14px;height:14px}#modweeb-messages::-webkit-scrollbar{height:7px;width:5px}#modweeb-messages::-webkit-scrollbar-thumb{background:var(--linkC,#2563eb);border-radius:8px}.modweeb-suggestions{padding:6px 13px 0 13px;display:flex;flex-wrap:wrap;gap:7px}.modweeb-suggestion-btn{background:var(--contentBa,#f4f8ff);color:var(--linkC,#2563eb);border-radius:13px;border:1px solid var(--contentL,#e3e7ef);font-size:8px;padding:5px 13px;cursor:pointer;transition:var(--trans-2)}.modweeb-suggestion-btn:hover{background:var(--linkC,#2563eb);color:var(--white)}#modweeb-status{font-size:8px;color:var(--notifC,#888);padding:2px 12px;background:var(--notifB,#f7f7f7);border-bottom:1px solid var(--contentL,#e3e7ef);text-align:center;display:none}.modweeb-msg-ai .bubble ol{padding-right:15px;margin:8px 0}.modweeb-msg-ai .bubble li{margin-bottom:5px;line-height:1.5}.modweeb-msg-ai .bubble b{display:block;margin:10px 0 5px 0;color:var(--linkC,#2563eb)}.modweeb-integrations{display:flex;align-items:center;justify-content:space-between;font-size:10px;background:var(--notifB);color:var(--notifC);border-bottom:1px solid var(--contentL);padding:4px 8px}.modweeb-integrations .modweeb-integr-icon{margin-right:5px;vertical-align:middle}.modweeb-integrations .modweeb-privacy{color:var(--linkC);text-decoration:underline;cursor:pointer}.modweeb-actions{display:flex;align-items:center;gap:5px;padding:5px 10px;background:var(--contentBa,#f4f8ff);border-top:1px solid var(--contentL,#e3e7ef)}.modweeb-actions button{background:var(--contentL,#e3e7ef);color:var(--bodyC,#222);border:1px solid var(--linkC,#2563eb);border-radius:50%;width:24px;height:24px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .2s,color .2s}.modweeb-actions button:hover{background:var(--linkC,#2563eb);color:var(--white)}.modweeb-actions button svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}

#modweeb-chat-close{background: var(--contentBa, #f4f8ff) !important;
    color: var(--notifC, #666) !important;
    border: 1px solid var(--contentL, #e3e7ef) !important;
    border-radius: 50% !important;
    width: 25px !important; /* حجم ثابت للأزرار بدون نصوص */
    height: 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;}

#modweeb-chat-close:hover{background:var(--linkC,#2563eb)}

#modweeb-chat-close svg{width: 18px !important;
    height: 18px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    opacity: 0.8 !important;}
#modweeb-chat-close:hover svg{stroke:var(--white)}


#modweeb-chat-container .modweeb-head span svg{border:1px solid var(--linkC,#2563eb);border-radius:50%;padding:3px;background:var(--contentB,#fff);box-shadow:0 1px 3px rgba(0,0,0,.05);width:20px;height:20px;vertical-align:middle}.spinner{width:20px;height:20px;border:3px solid rgba(0,0,0,.08);border-top:3px solid var(--linkC,#2563eb);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.modweeb-usage{font-size:19px;color:var(--notifC,#666);display:flex;gap:8px;align-items:center;margin-inline-start:6px}@media (max-width:480px){#modweeb-chat-container{width:80vw;max-width:90vw;height:70vh;max-height:50vh;bottom:0;right:0;border-radius:12px 12px 0 0}.modweeb-chat-btn{position:fixed!important;z-index:9999!important}.modweeb-chat-btn{position:fixed!important;z-index:9999!important;right:20px!important;bottom:88px!important}#modweeb-widget-container *{box-sizing:border-box!important}}
