.uma-gallery {
  --uma-blue: #004884;
  position: relative;
  display: inline-block;
  font-family: "Nunito Sans", Arial, sans-serif;
  text-align: left;
  vertical-align: middle;
  line-height: 1.5;
}
.uma-gallery, .uma-gallery * { box-sizing: border-box; }
.uma-gallery > .uma-gallery__button {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 5px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.uma-gallery__button::-webkit-details-marker { display: none; }
.uma-gallery__button::marker { content: ""; }
.uma-gallery__dots {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 2px;
  place-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--uma-blue);
}
.uma-gallery__dots i { display: block; background: currentColor; border-radius: 1px; }
.uma-gallery__button:hover .uma-gallery__dots,
.uma-gallery__button:focus-visible .uma-gallery__dots { background: #c5d7ec; color: var(--uma-blue); }
.uma-gallery[open] .uma-gallery__dots { background: #3366cc; color: #fff; }
.uma-gallery__button:focus-visible, .uma-gallery__grid a:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
}
.uma-gallery .uma-gallery__panel, .uma-gallery .uma-gallery__tip {
  position: absolute;
  inset-inline-end: 0;
  top: 100%;
  z-index: 1100;
  background: #fff;
  color: #253b50;
  border: 1px solid #d8e2ee;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgb(0 35 70 / 16%);
}
.uma-gallery .uma-gallery__panel { width: min(340px, calc(100vw - 24px)); padding: 18px 12px; }
.uma-gallery .uma-gallery__title { margin: 0 0 16px; padding: 0 6px; font-size: 14px; color: #253b50; }
.uma-gallery__title strong { color: var(--uma-blue); }
.uma-gallery .uma-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.uma-gallery__grid li { margin: 0; padding: 0; list-style: none; }
.uma-gallery .uma-gallery__grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 8px 4px;
  border-radius: 6px;
  color: var(--uma-blue);
  background: #fff;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.4;
}
.uma-gallery .uma-gallery__grid a:hover, .uma-gallery .uma-gallery__grid a:focus-visible { background: #eef4fb; color: var(--uma-blue); text-decoration: underline; }
.uma-gallery__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--uma-blue); color: #fff; font-size: 13px; font-weight: 800; }
.uma-gallery .uma-gallery__tip { display: none; width: min(265px, calc(100vw - 24px)); padding: 12px; font-size: 13px; }
/* details cerrado oculta el texto auxiliar de forma nativa. Con JS lo mostramos
   mediante un elemento externo, conservando la apertura nativa sin JS. */
.uma-gallery-tip {
  position: fixed; z-index: 1101; width: min(265px, calc(100vw - 24px));
  padding: 12px; color: #253b50; background: #fff;
  border: 1px solid #d8e2ee; border-radius: 6px;
  box-shadow: 0 6px 20px rgb(0 35 70 / 16%);
  font: 13px/1.5 "Nunito Sans", Arial, sans-serif;
}
.uma-gallery-tip[hidden] { display: none; }
@media (max-width: 575px) {
  .uma-gallery .uma-gallery__panel { position: fixed; left: 12px; right: 12px; top: var(--uma-panel-top, 64px); width: auto; max-height: calc(100dvh - var(--uma-panel-top, 64px) - 12px); overflow-y: auto; }
}
