/* Digital Studio - shared language/region picker. Self-contained, dark-glass. */
.dsl { position: relative; display: inline-flex; font-family: inherit; }

.dsl-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 10px 0 11px;
  background: rgba(10, 12, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #f4f2ee; cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color 0.2s, background 0.2s;
}
.dsl-btn:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(20, 24, 34, 0.86); }
.dsl-btn:active { transform: scale(0.97); }
.dsl-globe { display: inline-flex; }
.dsl-globe svg { width: 18px; height: 18px; opacity: 0.9; }
.dsl-cur { display: inline-flex; align-items: center; gap: 5px; line-height: 1; }
.dsl-cur .dsl-flag { font-size: 15px; }
.dsl-cur .dsl-code { font: 600 12px/1 'General Sans', system-ui, sans-serif; letter-spacing: 0.02em; }
.dsl-caret { width: 13px; height: 13px; opacity: 0.6; transition: transform 0.2s; }
.dsl.open .dsl-caret { transform: rotate(180deg); }
.dsl-btn:focus-visible { outline: 2px solid var(--signal, #2fe38b); outline-offset: 3px; }

.dsl-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 200;
  width: 288px; max-width: min(288px, calc(100vw - 24px));
  background: rgba(9, 11, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  padding: 10px; overflow: hidden;
  animation: dslIn 0.16s cubic-bezier(0.2, 1, 0.3, 1);
}
@keyframes dslIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.dsl-search-wrap { position: relative; margin-bottom: 8px; }
.dsl-search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; opacity: 0.5; color: #f4f2ee; pointer-events: none; }
.dsl-search {
  width: 100%; box-sizing: border-box; height: 40px;
  padding: 0 12px 0 34px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px; color: #f4f2ee;
  font: 400 14px/1 'General Sans', system-ui, sans-serif;
}
.dsl-search::placeholder { color: rgba(244, 242, 238, 0.45); }
.dsl-search:focus { outline: none; border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.09); }

/* overscroll-behavior stops the scroll chaining to the page when the list hits
   its end; pages that use Lenis also need data-lenis-prevent (set in the JS). */
.dsl-list { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 1px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.25) transparent; }
.dsl-list::-webkit-scrollbar { width: 8px; }
.dsl-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 8px; }

.dsl-row {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 9px 10px; text-align: left;
  background: none; border: 0; border-radius: 9px; cursor: pointer;
  color: #f4f2ee; font: 400 14px/1.2 'General Sans', system-ui, sans-serif;
  transition: background 0.12s;
}
.dsl-row:hover { background: rgba(255, 255, 255, 0.08); }
.dsl-row[aria-selected="true"] { background: rgba(47, 227, 139, 0.12); }
.dsl-row:focus-visible { outline: 2px solid var(--signal, #2fe38b); outline-offset: -2px; }
.dsl-flag { font-size: 20px; line-height: 1; flex: none; width: 24px; text-align: center; }
.dsl-name { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsl-meta { flex: none; font-size: 11px; letter-spacing: 0.03em; color: rgba(244, 242, 238, 0.5); font-variant-numeric: tabular-nums; }
.dsl-none { padding: 16px; text-align: center; color: rgba(244, 242, 238, 0.5); font-size: 13px; }

@media (max-width: 560px) {
  .dsl-panel { position: fixed; top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; max-width: none; }
  .dsl-list { max-height: 46vh; }
}

/* Fixed header helpers for pages that mount the picker + a back control */
.lang-mount { position: fixed; top: 22px; right: 26px; z-index: 40; }
.brief-back {
  position: fixed; top: 76px; left: 26px; z-index: 40;
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px 0 10px;
  background: rgba(10, 12, 20, 0.6); border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px; color: #f4f2ee; cursor: pointer;
  font: 500 13px/1 'General Sans', system-ui, sans-serif;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
}
.brief-back svg { width: 16px; height: 16px; }
.brief-back:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(20, 24, 34, 0.8); }
.brief-back:active { transform: scale(0.96); }
.brief-back:focus-visible { outline: 2px solid var(--signal, #2fe38b); outline-offset: 3px; }
.fine-print { opacity: 0.62; font-size: 12px; }
/* Inline mount inside an existing header (services page) */
.hd-lang { display: inline-flex; align-items: center; }
@media (max-width: 560px) {
  .lang-mount { top: 14px; right: 14px; }
  .brief-back { top: 62px; left: 14px; }
}
