/*!
 * LEGEND CRAFT — language switcher styles and left-to-right overrides.
 *
 * The existing stylesheets were authored for a right-to-left layout and use
 * physical properties in a handful of places. This file mirrors those spots
 * when the document direction flips to English, and styles the switcher
 * button itself.
 */

/* --------------------------------------------------------------- toggle -- */

.lc-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  border: 1px solid rgba(120, 190, 255, .38);
  background: rgba(9, 40, 82, .55);
  color: #d9f2ff;
  border-radius: 12px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.lc-lang-toggle:hover {
  transform: translateY(-2px);
  border-color: #6be8ff;
  background: rgba(13, 58, 116, .72);
  box-shadow: 0 0 18px rgba(107, 232, 255, .32);
}

.lc-lang-toggle:focus-visible {
  outline: 2px solid var(--accent, #6be8ff);
  outline-offset: 3px;
}

.lc-lang-toggle:active {
  transform: translateY(0);
}

.lc-lang-globe {
  font-size: 15px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(107, 232, 255, .55));
}

.lc-lang-label {
  letter-spacing: .08em;
  font-size: 12px;
}

.lc-topbar .lc-lang-toggle {
  background: rgba(255, 255, 255, .72);
  border-color: #a9d3f5;
  color: #123867;
}

.lc-topbar .lc-lang-toggle:hover {
  background: #fff;
  border-color: #2f8fd8;
  box-shadow: 0 8px 20px rgba(16, 74, 140, .16);
}

/* --------------------------------------------------------- ltr overrides -- */

[dir='ltr'] .lc-topbar,
[dir='ltr'] .lc-topbar-menu {
  direction: ltr;
}

[dir='ltr'] .lc-calendar {
  direction: ltr;
}

[dir='ltr'] .lc-timeline-item {
  border-right: 0;
  border-left: 4px solid var(--primary);
}

[dir='ltr'] .lc-ordered {
  padding-right: 0;
  padding-left: 23px;
}

[dir='ltr'] .lc-ordered li {
  padding-right: 0;
  padding-left: 6px;
}

[dir='ltr'] .lc-compare table,
[dir='ltr'] .staff-table th,
[dir='ltr'] .staff-table td {
  text-align: left;
}

[dir='ltr'] .rank ul {
  padding-right: 0;
  padding-left: 20px;
}

[dir='ltr'] .hero-content h1 {
  text-align: left;
}

[dir='ltr'] .v5-panel {
  direction: ltr;
}

[dir='ltr'] .v5-heading {
  direction: ltr;
}

[dir='ltr'] .v5-category {
  justify-self: end;
}

[dir='ltr'] .v5-prop-ar {
  text-align: left;
  direction: ltr;
}

[dir='ltr'] .v5-prop-en {
  text-align: left;
}

[dir='ltr'] .v6-group-title {
  border-right: 0;
  border-left: 4px solid #42dbf8;
}

[dir='ltr'] .v6-category-group[data-group='forbidden'] .v6-group-title {
  border-left-color: #f04b7f;
}

[dir='ltr'] .v5-lightbox button {
  right: auto;
  left: 12px;
}

[dir='ltr'] .v5-discord {
  margin-right: 0;
  margin-left: auto;
}

[dir='ltr'] .v5-links a span,
[dir='ltr'] .v5-mobile-menu a span {
  margin-left: 0;
  margin-right: 5px;
}

[dir='ltr'] .v5-panel h2 > span:first-child {
  margin-left: 0;
  margin-right: 7px;
}

[dir='ltr'] .v5-searchbar {
  direction: ltr;
}

/* The rule numbers read left to right in English too, but the badge sits on
   the reading edge, so it moves from the left of the card to the right. */
[dir='ltr'] .rule-item {
  direction: ltr;
  text-align: left;
}

[dir='ltr'] .rule-item > div {
  text-align: left;
}

/* Icon-only affordances that encode a direction get mirrored. */
[dir='ltr'] .lc-module-arrow,
[dir='ltr'] .lc-go,
[dir='ltr'] .v5-cardarrow {
  transform: scaleX(-1);
}

/* The hero art keeps its own direction so the artwork is never mirrored. */
[dir='ltr'] .lc-cinematic-art,
[dir='ltr'] .lc-frost-dust {
  direction: ltr;
}
