/* AutoNews overrides on top of the Dasher theme — Arabic typography + RTL fixes. */

body {
  font-family: "Tajawal", "Public Sans", system-ui, sans-serif;
}

/* Own layout classes rather than the theme's #content / #miniSidebar: Dasher's
   rules hardcode LTR margin-left at a higher specificity, which fights RTL. */
:root {
  --an-sidebar-width: 260px;
}

.an-sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--an-sidebar-width);
  z-index: 1030;
  overflow-y: auto;
  border-inline-end: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
}

.an-content {
  margin-inline-start: var(--an-sidebar-width);
  min-height: 100vh;
}

@media (max-width: 991.98px) {
  .an-sidebar {
    display: none;
  }
  .an-content {
    margin-inline-start: 0;
  }
}

.an-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  color: var(--bs-secondary-color);
  text-decoration: none;
  font-weight: 500;
}

.an-nav-link:hover {
  background: var(--bs-secondary-bg);
  color: var(--bs-emphasis-color);
}

.an-nav-link.active {
  background: var(--bs-primary);
  color: #fff;
}

.an-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bs-secondary-bg);
}

.an-hook-input {
  font-weight: 700;
  font-size: 1.05rem;
}

.an-preview-img {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--bs-border-color);
}

/* Long source URLs / selectors shouldn't blow out the table on mobile. */
.an-truncate {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Post preview modal --- */
.an-preview-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  z-index: 1080;
  overflow-y: auto;
}
.an-preview-modal {
  background: var(--bs-body-bg);
  border-radius: 0.75rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.3);
}
.an-preview-body {
  padding: 1rem;
}
.an-post-card {
  max-width: 400px;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--bs-body-bg);
}
.an-post-img {
  width: 100%;
  display: block;
}
.an-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #16244f;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex: 0 0 auto;
}
