/* Featured Image داخل المقالة */
.single-post .post-thumbnail img,
.single-post .featured-image img {
  width: 600px;
  height: auto;
  display: block;
  border-radius: 10px;
}

body.user-registration-page #user-registration:not(.user-registration-MyAccount) {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

button.ur-submit-button {
    background-color: var(--global-palette1) !important;
    color: #fff !important;
}

button.ur-submit-button:hover {
    background-color: var(--global-palette2) !important;
}

.user-registration-register a {
    color: var(--global-palette1) !important;
}

.home .wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.home .wp-block-column {
    flex: 1 1 30%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .home .wp-block-column {
        flex: 1 1 100%;
    }
}

/* جعل عناصر قائمة الهيدر Bold */
.main-navigation a {
    font-weight: 700;
}

/* تقليل المسافة في اسفل المقال */
.entry-related-inner-content {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
}

/* زر الشات */
#chat-btn {
  position: fixed;
  bottom: 20px;
  right: 20px; /* يمكنك تغييره إلى left إذا أحببت أن يكون الزر على اليسار */
  background: #28a745;
  color: #fff;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 9999;
  line-height: 1;
}

/* نافذة الشات */
#chat-box {
  position: fixed;
  bottom: 85px;
  right: 20px; /* يمكنك تغييره إلى left إذا أحببت */
  width: 400px;
  height: 500px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  display: none;
  flex-direction: column;
  z-index: 9999;
  direction: rtl;       /* تحويل الكتابة إلى اليمين */
  text-align: right;    /* محاذاة النصوص إلى اليمين */
  font-family: 'Tajawal', Tahoma, Arial, sans-serif; /* خط مناسب للعربية */
}

/* رأس الشات */
#chat-header {
  background: #28a745;
  color: #fff;
  font-weight: 700;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  border-radius: 12px 12px 0 0;
  direction: rtl;
}

/* زر X داخل الهيدر */
#chat-header button {
  background: #fff;
  color: #000;
  padding: 0;
  padding-bottom: 25px;
  width: 24px;
  height: 24px;
}

/* صندوق الرسائل */
#chat-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 16px;
  direction: rtl;
  text-align: right;
}

/* الرسائل */
#chat-messages div {
  margin: 5px 0;
  padding: 6px 10px;
  border-radius: 8px;
  max-width: 80%;
  word-wrap: break-word;
}

/* رسالة المستخدم */
#chat-messages div.user {
  background-color: #28a745;
  color: #fff;
  text-align: right;
  margin-left: auto;  /* تبقى على اليمين */
  margin-right: 0;
}

/* رسالة الدعم */
#chat-messages div.bot {
  background-color: #f1f1f1;
  color: #111;
  text-align: right; /* كلها إلى اليمين */
  margin-right: auto;
  margin-left: 0;
}

/* صندوق الإدخال */
#chat-input {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid #eee;
  direction: rtl; /* ترتيب العناصر من اليمين إلى اليسار */
}

/* مربع النص */
#chat-input input {
  flex: 1;
  border: none;
  padding: 10px;
  font-size: 16px;
  outline: none;
  text-align: right;
}

/* زر الإرسال */
#chat-input button {
  background: #28a745;
  color: #fff;
  border: none;
  padding: 8px 13px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

#chat-label {
  position: fixed;
  bottom: 85px;
  right: 20px; /* يمكن تغييره إلى left إذا أحببت */
  background: #28a745;
  color: #fff;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
}

/* عند المرور بالماوس */
#chat-label:hover {
  background: #000;
}

/* اجعلها تختفي عند فتح الشات */
#chat-box.open + #chat-label,
#chat-label.hidden {
  display: none;
}

@media (max-width: 500px) {
  #chat-box {
    width: 90%;
    height: 500px;
    right: 5%; /* يمكن تغييره إلى left إذا أحببت */
  }
}

#chat-messages a {
  color: #28a745;
  text-decoration: underline;
  font-weight: 700;
}

#chat-messages a:hover {
  color: #1e7e34;
  text-decoration: none;
}

#chat-messages a::after {
  content: " ↗";
  font-size: 0.85em;
}