/* Site consistency layer — loaded last on both al-ltc.com and alsaeed-etc.com.
   Keeps one look for shared controls without rewriting the per-section styles.
   al-ltc.com  = html:not([data-site="alsaeed"])
   alsaeed-etc = html[data-site="alsaeed"]                                    */

:root {
  --sc-navy: #102A5C;
  --sc-gold: #C79226;
  --sc-orange: #E8731A;
  --sc-ring: 0 0 0 3px rgba(232, 115, 26, .35);
  --sc-radius: 12px;
}

/* 1) Headings on dark bands must stay readable (al-ltc "خدمات السعيد" was navy on navy). */
html:not([data-site="alsaeed"]) .sa-next-dark .ltc-store-services h2,
html:not([data-site="alsaeed"]) .sa-next-dark h2#ltc-services-title {
  color: #fff !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}

/* 2) Carousel / slider motion toggles: one compact, consistent control everywhere
      (they were 47px tall in four different colour schemes). */
.sa-show-auto,
.sa-rev-auto,
.sa-impact-auto {
  display: inline-flex !important;
  align-items: center;
  gap: .4em;
  min-height: 34px !important;
  height: auto !important;
  padding: .3rem .85rem !important;
  border-radius: 999px !important;
  font-size: .8rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  background: rgba(16, 42, 92, .06) !important;
  color: var(--sc-navy) !important;
  border: 1px solid rgba(16, 42, 92, .18) !important;
  box-shadow: none !important;
  transition: background .15s ease, border-color .15s ease;
}
.sa-show-auto::before,
.sa-rev-auto::before,
.sa-impact-auto::before {
  content: "▶";
  font-size: .7em;
  line-height: 1;
}
.sa-show-auto[aria-pressed="true"]::before,
.sa-rev-auto[aria-pressed="true"]::before,
.sa-impact-auto[aria-pressed="true"]::before {
  content: "❚❚";
  letter-spacing: -.12em;
}
.sa-show-auto:hover,
.sa-rev-auto:hover,
.sa-impact-auto:hover {
  background: rgba(16, 42, 92, .12) !important;
  border-color: rgba(16, 42, 92, .32) !important;
}
/* On dark bands the toggle turns light. */
.sa-next-dark .sa-show-auto,
.sa-next-dark .sa-rev-auto,
.sa-next-dark .sa-impact-auto {
  background: rgba(255, 255, 255, .08) !important;
  color: #E7EEF8 !important;
  border-color: rgba(255, 255, 255, .25) !important;
}
.sa-next-dark .sa-show-auto:hover,
.sa-next-dark .sa-rev-auto:hover,
.sa-next-dark .sa-impact-auto:hover {
  background: rgba(255, 255, 255, .16) !important;
}
/* The services ribbon is a light strip inside the dark band: keep the navy toggle there. */
.sa-next-dark .sa-motion-ribbon .sa-show-auto {
  background: var(--sc-navy) !important;
  color: #fff !important;
  border-color: var(--sc-navy) !important;
}

/* 3) One visible keyboard focus style for links, buttons and form fields. */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--sc-orange) !important;
  outline-offset: 2px;
  box-shadow: var(--sc-ring);
}

/* 4) Media never overflows its card on small screens. */
img, video, iframe, svg { max-width: 100%; }
@media (max-width: 640px) {
  body { overflow-x: clip; }
  .tbl-w, .tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* 5) Respect reduced-motion for every looping band. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* 6) Catalog / package page header (al-ltc): title was navy on the navy banner,
      and the banner stopped at 760px while the cards span the full page width. */
.ltc-package-refresh .sp-page .sp-header { max-width: none; }
.ltc-package-refresh .sp-page .sp-header h1,
.ltc-package-refresh .sp-page .sp-header h2 { color: #fff !important; }
.ltc-package-refresh .sp-page .sp-header p { color: rgba(255, 255, 255, .86) !important; }

/* 7) Display-currency selector: a slim row aligned with the page content
      instead of a floating box stuck to the screen edge. */
#alsaeedDisplayPreference {
  width: min(1160px, calc(100% - 32px)) !important;
  margin: 18px auto 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  display: flex !important;
  align-items: center;
  gap: 8px 10px !important;
  font-size: 13px !important;
  color: #4A5B70 !important;
}
#alsaeedDisplayPreference span { font-weight: 700; color: var(--sc-navy); }
#alsaeedDisplayPreference select {
  width: auto !important;
  min-width: 140px;
  padding: 6px 10px !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 10px !important;
  background: #fff !important;
  font-size: 13px !important;
}
#alsaeedDisplayPreference small { color: #6B7A8F; font-size: 12px; }
@media (max-width: 640px) {
  #alsaeedDisplayPreference small { flex-basis: 100%; }
}

/* 8) Header cart button and add-to-cart buttons */
.sa-cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 12px; border-radius: 12px;
  border: 1px solid #D7E0EA; background: #fff; color: var(--sc-navy);
  font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.sa-cart-btn:hover { border-color: var(--sc-orange); background: #FFF7F0; }
.sa-cart-n {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--sc-orange); color: #fff; font-size: .72rem; line-height: 20px; text-align: center;
}
.sa-cart-btn.pulse { animation: saCartPulse .6s ease; }
@keyframes saCartPulse { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
/* Icon + count only, so the header nav keeps its room; the label stays for screen readers. */
.sa-cart-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) { .sa-cart-btn { min-height: 36px; padding: 0 9px; } }
.sa-add-cart { margin-top: 8px; }
.sa-add-cart[aria-pressed="true"] { border-color: #16A34A !important; color: #15803D !important; background: #F0FDF4 !important; }
[data-buy] + .sa-add-cart:not(.full) { margin-inline-start: 8px; }

/* 9) Invoice / document preview: readable size instead of a small framed thumbnail */
#ov .mdl:has(#v25Prev) { width: min(1000px, 96vw) !important; max-width: none !important; }
.v25-preview { max-height: 76vh !important; padding: 14px !important; }
.v25-preview img { max-width: 900px !important; border-radius: 6px; }
.v25-pill.cancelled { background: #FDECEC; color: #B42318; }
@media (max-width: 640px) { .v25-preview { max-height: 70vh !important; padding: 6px !important; } }
