/* Secure Steps: language switcher and Arabic (RTL) adjustments. Loaded by ss-i18n.php. */

/* Language switcher (header) */
.ss-lang { position: relative; margin-inline-start: .6rem; }
.ss-lang__toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 2.4rem; padding: .35rem .8rem;
  border-radius: 999px; border: 1px solid rgba(37,99,235,.25); background: rgba(37,99,235,.06);
  color: #1f4fd6; font-weight: 600; font-size: .95rem; line-height: 1;
  cursor: pointer; list-style: none; white-space: nowrap; user-select: none;
}
.ss-lang__toggle::-webkit-details-marker { display: none; }
.ss-lang__toggle::after {
  content: ""; width: .38rem; height: .38rem; margin-inline-start: .1rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.ss-lang[open] .ss-lang__toggle::after { transform: translateY(2px) rotate(-135deg); }
.ss-lang__toggle:hover, .ss-lang[open] .ss-lang__toggle { background: rgba(37,99,235,.12); }
.ss-lang__toggle:focus-visible, .ss-lang__item:focus-visible { outline: 2px solid #1f4fd6; outline-offset: 2px; }
.ss-lang__menu {
  position: absolute; top: calc(100% + .4rem); inset-inline-end: 0; z-index: 1000;
  display: grid; gap: .15rem; min-width: 10rem; padding: .35rem;
  border: 1px solid rgba(215,225,238,.95); border-radius: 14px; background: #fff;
  box-shadow: 0 18px 40px rgba(11,18,32,.14);
}
.ss-lang__item {
  display: block; padding: .55rem .75rem; border-radius: 10px;
  color: #0b1220; font-weight: 600; text-decoration: none; text-align: start;
}
.ss-lang__item:hover, .ss-lang__item:focus-visible { background: rgba(37,99,235,.08); color: #1f4fd6; }
.ss-lang__item[lang="ar"], .ss-lang__toggle:lang(ar) { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }

/* Arabic: font and text */
html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}
html[dir="rtl"] body { line-height: 1.8; }

/* Arabic script must not be letter-spaced, uppercased or set in the code font */
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4,
html[dir="rtl"] .wp-block-post-title, html[dir="rtl"] .wp-block-site-title,
html[dir="rtl"] .ss-section-label, html[dir="rtl"] .ss-footer-kicker, html[dir="rtl"] .ss-footer-mono,
html[dir="rtl"] .ss-card-link, html[dir="rtl"] #ss-hero-art-title, html[dir="rtl"] #ss-hero-kicker,
html[dir="rtl"] #ss-hero-chips li, html[dir="rtl"] .ss-sev, html[dir="rtl"] .ss-finding-top span,
html[dir="rtl"] .ss-research-strip span, html[dir="rtl"] .ss-research-strip strong,
html[dir="rtl"] .ss-footer-panel h4, html[dir="rtl"] dl dt, html[dir="rtl"] .wp-block-post-date,
html[dir="rtl"] .wp-block-post-date time, html[dir="rtl"] .ss-see-all a,
html[dir="rtl"] .wp-block-post-excerpt__more-link, html[dir="rtl"] .ss-home-next-step__title,
html[dir="rtl"] .ss-research-strip strong {
  letter-spacing: 0 !important;
  text-transform: none !important;
}
html[dir="rtl"] .ss-section-label, html[dir="rtl"] .ss-footer-kicker, html[dir="rtl"] .ss-footer-mono,
html[dir="rtl"] .ss-card-link, html[dir="rtl"] #ss-hero-kicker, html[dir="rtl"] #ss-hero-chips li,
html[dir="rtl"] .ss-sev, html[dir="rtl"] .ss-finding-top span, html[dir="rtl"] .ss-research-strip span,
html[dir="rtl"] .ss-research-strip strong, html[dir="rtl"] .ss-footer-panel h4, html[dir="rtl"] dl dt,
html[dir="rtl"] .wp-block-post-date, html[dir="rtl"] .wp-block-post-date time, html[dir="rtl"] .ss-see-all a,
html[dir="rtl"] .wp-block-post-excerpt__more-link {
  font-family: "IBM Plex Sans Arabic", system-ui, Tahoma, sans-serif !important;
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] #ss-hero-art-title, html[dir="rtl"] .ss-home-next-step__title { line-height: 1.3 !important; }
html[dir="rtl"] #ss-hero-art-title { font-size: clamp(2.3rem, 5vw, 4.6rem) !important; }

/* Hero: text on the right, artwork on the left */
html[dir="rtl"] #ss-hero-art-canvas,
html[dir="rtl"] #ss-hero-art-wash { transform: scaleX(-1); }
html[dir="rtl"] #ss-hero-art-actions a:hover { transform: translateY(-1px); }

/* Lists and quotes */
html[dir="rtl"] .wp-block-quote { border-left: 0; border-right: 4px solid #19C3C8; padding-left: 0; padding-right: 1.25em; }
html[dir="rtl"] ul, html[dir="rtl"] ol { padding-left: 0; padding-right: 1.4em; }
html[dir="rtl"] .ss-checklist, html[dir="rtl"] .ss-principles, html[dir="rtl"] .ss-steps,
html[dir="rtl"] .ss-home-next-step__list, html[dir="rtl"] #ss-hero-chips,
html[dir="rtl"] .ss-footer-focus-list { padding-right: 0; }

/* English posts listed on Arabic pages keep their own direction */
html[dir="rtl"] .wp-block-post-template .wp-block-post-title,
html[dir="rtl"] .wp-block-post-template .wp-block-post-excerpt__excerpt { unicode-bidi: plaintext; text-align: start; }

/* Mobile menu: right-aligned items, close button on the left */
@media (max-width: 781px) {
  html[dir="rtl"] .ss-nav-wrap .wp-block-navigation__responsive-container-close { margin: .9rem auto 0 .9rem; }
  html[dir="rtl"] body .ss-nav-wrap .is-menu-open .wp-block-navigation-item__content { text-align: right; }
}

/* Language suggestion bar (English pages, Arabic/French browsers) */
.ss-lang-hint{box-sizing:border-box;position:fixed;z-index:99990;top:12px;left:50%;display:flex;align-items:center;gap:.75rem;width:max-content;max-width:calc(100% - 24px);padding:.55rem .55rem .55rem 1rem;border:1px solid rgba(127,230,234,.35);border-radius:14px;background:#0b1220;color:#e6f3ff;box-shadow:0 18px 40px rgba(11,18,32,.3);font-size:.95rem;line-height:1.4;opacity:0;transform:translate(-50%,-10px);transition:opacity .25s ease,transform .25s ease}
.ss-lang-hint.is-in{opacity:1;transform:translate(-50%,0)}
.ss-lang-hint[dir="rtl"]{padding:.55rem 1rem .55rem .55rem;font-family:"IBM Plex Sans Arabic",Tahoma,"Segoe UI",system-ui,sans-serif}
html body .ss-lang-hint p{margin:0;color:#e6f3ff;font-size:.95rem}
.ss-lang-hint__go{flex:none;padding:.45rem .85rem;border-radius:10px;background:#19c3c8;color:#0b1220!important;font-weight:700;text-decoration:none!important;white-space:nowrap}
.ss-lang-hint__go:hover,.ss-lang-hint__go:focus-visible{background:#fff}
.ss-lang-hint__close{flex:none;width:2.1rem;height:2.1rem;padding:0;border:0;border-radius:8px;background:transparent;color:#e6f3ff;font-size:1.35rem;line-height:1;cursor:pointer}
.ss-lang-hint__close:hover,.ss-lang-hint__close:focus-visible{background:rgba(255,255,255,.1)}
@media (max-width:600px){.ss-lang-hint{width:calc(100% - 24px);flex-wrap:wrap;row-gap:.5rem}.ss-lang-hint p{flex:1 1 100%}.ss-lang-hint__go{flex:1 1 auto;text-align:center}}


/* Translated posts (2026-12-02): code stays left-to-right in Arabic, mirrored borders, localized case-file label */
html[dir="rtl"] body .entry-content pre,html[dir="rtl"] body .entry-content pre code{direction:ltr;text-align:left;unicode-bidi:isolate}
html[dir="rtl"] body .entry-content :not(pre)>code{direction:ltr;unicode-bidi:isolate}
html[dir="rtl"] body .entry-content th,html[dir="rtl"] body .entry-content td{text-align:right}
html[dir="rtl"] body.single .entry-content blockquote{border-left:0;border-right:3px solid var(--ss-teal)}
html[dir="rtl"] body.single .entry-content>p:first-child:has(>strong:first-child):has(>br){font-family:"IBM Plex Sans Arabic",Tahoma,"Segoe UI",system-ui,sans-serif;font-size:.95rem;border-left:1px solid var(--ss-line);border-right:3px solid var(--ss-teal)}
html[lang="ar"] body.single .entry-content>p:first-child:has(>strong:first-child):has(>br)::before{content:'// بطاقة التحدي' / ''}
html[lang^="fr"] body.single .entry-content>p:first-child:has(>strong:first-child):has(>br)::before{content:'// fiche du challenge' / ''}
