/* Container for the main buttons */
.feedback-buttons-container {
    position: absolute; /* الموقع الافتراضي للعنصر */
    top: 50px;
    left: 50px;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    z-index: 1000; /* لضمان ظهورها فوق العناصر الأخرى */
    transition: all 0.5s ease-in-out; /* انتقال سلس لتغييرات الموضع والنمط */
}

/* فئة جديدة لحالة الظهور كنافذة منبثقة في المنتصف */
.feedback-buttons-container.feedback-centered-popup {
    position: fixed; /* لتثبيت العنصر في إطار العرض */
    top: 50%; /* لتوسيطه عموديًا */
    left: 50%; /* لتوسيطه أفقيًا */
    transform: translate(-50%, -50%); /* لضبط التوسيط بدقة بناءً على حجم العنصر */
    z-index: 9999; /* لضمان ظهوره فوق كل شيء */
    background-color: #fff; /* خلفية بيضاء للنافذة المنبثقة */
    padding: 25px; /* مسافة داخلية لمحتوى النافذة */
    border: 1px solid #ddd; /* حدود خفيفة */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); /* ظل خفيف لإعطاء تأثير النافذة */
    border-radius: 8px; /* حواف مستديرة */
    text-align: center; /* توسيط النص في الداخل */
    min-width: 300px; /* لتحديد عرض أدنى للقراءة */
    flex-direction: column; /* لضمان تكدس المحتوى عموديًا في النافذة */
    align-items: center; /* لتوسيط العناصر أفقيًا في النافذة */
}

/* حالة الإخفاء الأولية للنافذة المنبثقة (يتم التحكم بها بواسطة JS، ولكن هذا يضمن عدم ظهورها مبدئيًا إذا كان JS بطيئًا) */
.feedback-buttons-container.feedback-centered-popup.hidden {
    display: none;
    opacity: 0;
    pointer-events: none; /* منع التفاعل عندما تكون مخفية */
}

/* الصف الذي يحتوي على أزرار الإعجاب/عدم الإعجاب والعدادات */
.main-buttons-row {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center; /* توسيط الأزرار داخل النافذة المنبثقة */
}

/* الأنماط العامة للأزرار */
.feedback-button {
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    color: white;
}

/* الألوان الافتراضية لأزرار الإعجاب وعدم الإعجاب */
#likeBtn { background-color: #007bff; }
#likeBtn:hover { background-color: #0056b3; }
#dislikeBtn { background-color: #007bff; } /* اللون الأولي لعدم الإعجاب */
#dislikeBtn:hover { background-color: #c82333; } /* لون التمرير لعدم الإعجاب */

/* فئة للزر عند النقر عليه (أسود) */
.feedback-button.clicked {
    background-color: #333 !important; /* فرض اللون الأسود عند النقر */
    color: white;
}

/* أنماط عرض العداد */
.feedback-count {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    min-width: 20px;
    text-align: center;
}

/* حاوية زر "اترك ملاحظة؟" */
.note-container {
    display: flex;
    width: 100%;
    justify-content: flex-start;
}
.feedback-buttons-container.feedback-centered-popup .note-container {
    justify-content: center; /* توسيط "اترك ملاحظة" في النافذة المنبثقة */
}

/* أنماط زر "اترك ملاحظة؟" */
.note-action-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.note-action-button:hover {
    background-color: #0056b3;
}

/* أنماط جديدة لرسالة التوجيه وزر "ليس الآن" */
.feedback-prompt-message {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #333;
}

.not-now-button {
    background-color: #6c757d; /* لون رمادي */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px; /* مسافة علوية */
    transition: background-color 0.3s ease;
}

.not-now-button:hover {
    background-color: #5a6268;
}

/* تعديلات متجاوبة للشاشات الأصغر */
@media (max-width: 768px) {
    .feedback-buttons-container {
        top: 110px;
        left: 0px;
    }
    .feedback-buttons-container.feedback-centered-popup {
        padding: 15px; /* ضبط المسافة الداخلية للشاشات الأصغر */
        min-width: 280px; /* ضبط العرض الأدنى */
    }
    .feedback-button {
        padding: 6px 5px;
        font-size: 10px;
        color: white;
    }
    .feedback-count {
        margin-right:-10px;
        font-size: 10px;
    }
    .note-action-button {
        padding: 6px 5px;
        border-radius: 5px;
        font-size: 10px;
    }
    .feedback-prompt-message {
        font-size: 1em;
    }
    .not-now-button {
        padding: 6px 10px;
        font-size: 12px;
    }
}