/* ========== الأساسيات العامة ========== */

body {
  font-family: 'Almarai', sans-serif;
  background-color: #fdfdfd;
}

#post-list-view,
#single-post-view {
  margin-top: 20px;
}

/* ========== تنسيقات كارت البحث ========== */

.search-card {
  background-color: #f7f7ad; /* لون قابل للتغيير */
  border: 1px solid #ed0707;
  border-radius: 8px;
}

#search-bar-wrapper {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}

#search-input {
  flex-grow: 1;
  background-color: #ffffff; /* أبيض دائمًا */
}

#search-button {
  white-space: nowrap;
}

/* ========== كارت عرض المنتدى بالكامل ========== */

.forum-card-wrapper {
  background-color: #f7f7ad;
  border: 1px solid #ed0707;
  border-radius: 8px;
  padding: 20px;
}

/* ========== كروت المواضيع الفردية ========== */

#posts-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.topic-card {
  background-color: #07eb8c;
  border: 1px solid #ed0707;
  border-radius: 6px;
  padding: 15px;
  transition: background-color 0.2s ease-in-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.topic-card:hover {
  background-color: #f1fdf1;
}

.topic-card h5 {
  margin-bottom: 8px;
  color: #e30918;
}

.topic-card small {
  font-size: 0.85em;
  color: #e30918;
}

/* ========== إنشاء موضوع وتعليقات ========== */

#new-post-form div,
.new-comment-form div {
  margin-bottom: 10px;
}

#new-post-form label,
.new-comment-form label {
  display: block;
  margin-bottom: 5px;
}

#new-post-form input,
#new-post-form textarea,
.new-comment-form input,
.new-comment-form textarea {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}

/* ========== تعليق ========== */

.comment {
  margin-bottom: 15px;
  padding: 15px;
  background-color: #f7f7ad;
  border: 1px solid #ed0707;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  font-size: 1.1 rem;
}

/* ========== الرد على تعليق ========== */

.reply {
  margin-right: 40px;
  margin-top: 15px;
  border-right: 3px solid #add8e6;
  padding-right: 15px;
  background-color: #cded2b;
  border-radius: 6px;
}

.replies-list {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px dashed #e0e0e0;
}

.reply-form {
  margin-top: 15px;
  padding: 15px;
  background-color: #cded2b;
  border: 1px solid #d0e7ff;
  border-radius: 5px;
  text-align: right;
}

/* ========== نموذج التعليق الجديد ========== */

.new-comment-form {
  margin-top: 25px;
  padding: 20px;
  background-color: #8145ed;
  border: 1px solid #a8d5ff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

/* ========== أزرار النماذج ========== */

.new-post-section button,
.new-comment-section button,
.reply-form button {
  width: auto;
  padding: 8px 15px;
  margin-top: 15px;
}

/* ========== أزرار التعليق ========== */

.comment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  justify-content: flex-end;
}

.comment .comment-actions button {
  cursor: pointer;
  background: none;
  color: #007bff;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  font-size: 0.9em;
  transition: color 0.2s ease-in-out;
}

.comment .comment-actions button:hover {
  color: #0056b3;
}

.comment .comment-actions button i {
  margin-left: 5px;
}

/* ========== زر الإبلاغ ========== */

.report-button {
  color: #dc3545 !important;
}

.report-button:hover {
  color: #c82333 !important;
}


.custom-colored-card {
  background-color: #f7f7ad; /* لون أخضر فاتح جدًا */
  border: 1px solid #a3d9a5; /* حدود خضراء ناعمة */
}


/* ========== تنسيق عرض الموضوع (single post) ========== */

#single-post-card {
  background-color: #f7f7ad; /* بيج هادئ */
  border: 1px solid #ed0707;
  border-radius: 10px;
}

#single-post-card .post-title {
  font-size: 1.6rem;
  color: #212529;
  font-weight: bold;
}

#single-post-card #single-post-meta {
  font-size: 0.9rem;
  color: #6c757d;
  text-align: left;
}

#single-post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  white-space: pre-line;
}

#single-post-card hr {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  border-top: 1px solid #ccc;
}


.comment-actions {
  justify-content: flex-start; /* زرائر تبدأ من اليمين */
  flex-wrap: wrap;
  gap: 10px;
}

.comment-meta {
  text-align: left;
  font-size: 0.85rem;
  color: #555;
}
