/* Selector de idioma (_idioma.html): una píldora con el globo y el código, y la lista que se abre debajo. */
.idioma { position: relative; flex: none; }
.idioma summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
  border-radius: 999px; cursor: pointer; font: 600 14px/1 "Inter", system-ui, sans-serif; color: #51453e;
  background: rgba(255, 255, 255, 0.75); box-shadow: inset 0 0 0 1.5px rgba(27, 20, 17, 0.12);
  transition: box-shadow 0.2s, color 0.2s;
}
.idioma summary::-webkit-details-marker { display: none; }
.idioma summary:hover, .idioma[open] summary { box-shadow: inset 0 0 0 1.5px #1b1411; color: #1b1411; }
.idioma svg { fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.idioma summary:hover svg, .idioma[open] svg { transform: rotate(-25deg); }
.idioma-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 170px; padding: 6px; display: grid;
  border-radius: 16px; background: #fff; box-shadow: 0 14px 34px -14px rgba(64, 28, 4, 0.35), 0 0 0 1px #eee2d5;
  transform-origin: top right; animation: abrir-idioma 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes abrir-idioma { from { opacity: 0; transform: scale(0.92) translateY(-6px); } }
.idioma-menu button {
  border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  font: 500 15px/1.2 "Inter", system-ui, sans-serif; color: #1b1411;
}
.idioma-menu button:hover { background: #fff6ec; }
.idioma-menu button[aria-current] { background: #fff1e0; color: #c24a08; font-weight: 700; }
@media (max-width: 640px) {
  .idioma summary { height: 36px; padding: 0 10px; }
  .idioma summary span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .idioma-menu { animation: none; } .idioma svg { transition: none; } }
