/* ============================================================
   BOOK DETAIL — RTL overrides (Arabic)
   Base styles live in en/BookDetail.css — only deltas here.
   ============================================================ */
@import url('../en/BookDetail.css');

/* Breadcrumb: separator flips with dir="rtl" automatically,
   but rotate the chevron SVG so it points the right way */
.bd-breadcrumb__sep { transform: scaleX(-1); }

/* Badge: in RTL the "start" edge is the right side */
.bd-badge-new {
  left: auto;
  right: 16px;
}

/* Thumbs: active thumb border in RTL */
.bd-gallery-thumb.swiper-slide-thumb-active { border-color: #8a1538; }

/* Details table: align labels to the right */
.bd-details-table th,
.bd-details-table td { text-align: right; }

/* Tab: remove right-padding offset on first tab (RTL reading start) */
.bd-tab:first-child { padding-left: 24px; padding-right: 0; }

/* Star rating input: right-to-left order */
.bd-star-input { flex-direction: row-reverse; }

/* Form actions: keep submit on the left (RTL end = left) */
.bd-form-actions { justify-content: flex-start; }

/* Bar label: left-align for RTL reading */
.bd-bar-row__label { text-align: left; }

/* Font — Arabic uses Cairo (loaded via _LayoutFrontend for ar) */
.bd-title,
.bd-author,
.bd-short-desc,
.bd-format-label,
.bd-format-btn__name,
.bd-format-btn__price,
.bd-format-btn__points,
.bd-points-price,
.bd-points-badge,
.bd-format-btn__owned-tag,
.bd-share-pop__item,
.bd-add-to-cart-btn,
.bd-read-now-btn,
.bd-in-cart-btn,
.bd-reader-btn,
.bd-owned-note,
.bd-tab,
.bd-review-form__title,
.bd-form-label,
.bd-reviewer-name,
.bd-review-text,
.bd-trust-badge__title,
.bd-trust-badge__sub {
  font-family: 'Cairo', sans-serif;
}

.bd-review-delete-btn { margin-left: unset; margin-right: auto; }

/* Related carousel: in RTL the next slides are off the left edge, so the
   fade-out mask must point left (en/BookDetail.css fades to the right). */
.bd-related-swiper {
  -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent 100%);
}

/* Hardcopy stock messaging — accent-bar callout */
.bd-stock-msg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0;
  color: var(--bd-stock-fg, #b42318);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
}
.bd-stock-msg::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bd-stock-accent, #f04438);
}
.bd-stock-msg--low { --bd-stock-fg: #b42318; --bd-stock-bg: #fef3f2; --bd-stock-accent: #f04438; }
.bd-stock-msg--max { --bd-stock-fg: #b54708; --bd-stock-bg: #fffaeb; --bd-stock-accent: #f79009; }
.bd-stock-msg--out { --bd-stock-fg: #475467; --bd-stock-bg: #f2f4f7; --bd-stock-accent: #98a2b3; }
.bd-add-to-cart-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
