/* =========================================================
   Component — Platform toggles (language + theme)

   Two small square controls that travel together wherever the
   shell goes: header, drawer, footer, auth card. The theme button
   shows the mode it will switch you to, not the one you are in —
   a control should be labelled by its action.
   ========================================================= */
.platform-toggles {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.platform-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}
.platform-toggle:hover {
  border-color: var(--color-line-strong);
  background: var(--color-surface-raised);
  color: var(--color-text);
}

.platform-toggle--lang {
  width: auto;
  padding-inline: var(--space-3);
  font-family: var(--font-latin);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
}

.platform-toggle__icon { width: 17px; height: 17px; }

/* Only one of the two icons is ever drawn: sun while dark is on
   (press it and you get light), moon while light is on. */
:root .platform-toggle__icon--moon,
:root[data-theme="light"] .platform-toggle__icon--sun { display: none; }
:root .platform-toggle__icon--sun,
:root[data-theme="light"] .platform-toggle__icon--moon { display: block; }

/* Theme and language are the two controls a visitor reaches for on
   a phone with one hand. 34px was a miss waiting to happen. */
@media (pointer: coarse) {
  .platform-toggle {
    min-inline-size: 44px;
    min-block-size: 44px;
  }
}
