/* =========================================================
   UFY PHONE — APP GALERÍA
   DÍA C — HORA 1
   ========================================================= */

.ufy-phone-app-screen[
  data-ufy-active-app="gallery"
]
.ufy-phone-app-screen-content {
  padding: 0;

  background:
    #030408;
}


/* =========================================================
   CONTENEDOR
   ========================================================= */

.ufy-phone-gallery {
  width: 100%;
  min-height: 100%;

  box-sizing: border-box;

  background:
    #030408;
}


/* =========================================================
   FILTROS — FUERA DEL ÁREA DE FOTOS
   ========================================================= */
.ufy-phone-app-screen[
  data-ufy-active-app="gallery"
]
.ufy-phone-app-screen-header {
  min-height: 108px;

  padding-bottom: 53px;
}


.ufy-phone-gallery-filters {
  position: absolute;

  left: 0;
  bottom: 7px;

  z-index: 3;

  width: 100%;

  padding:
    9px 24px
    8px;

  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  align-items: end;

  box-sizing: border-box;

  background:
    transparent;

  border: 0;
}


.ufy-phone-gallery-filter {
  appearance: none;

  position: relative;

  min-width: 0;

  padding:
    5px 4px;

  border: 0;
  outline: 0;

  background:
    transparent;

  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.55);

  font:
    inherit;

  font-size:calc(15px * var(--ufy-font-scale,1));
  font-weight: 500;

  line-height: 1;

  text-align: center;

  cursor: pointer;

  transform:
    translateY(0);

  transition:
    color 160ms ease,
    transform 160ms ease,
    text-shadow 160ms ease;
}


.ufy-phone-gallery-filter::after {
  content: "";

  position: absolute;

  left: 50%;
  bottom: -5px;

  width: 22px;
  height: 2px;

  border-radius: 999px;

  background:
    transparent;

  transform:
    translateX(-50%);

  transition:
    background 160ms ease,
    box-shadow 160ms ease;
}


.ufy-phone-gallery-filter.is-active {
  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.98);

  transform:
    translateY(-4px);

  text-shadow:
    0 4px 9px
    rgba(157, 77, 255, 0.28);
}


.ufy-phone-gallery-filter.is-active::after {
  background:
    #9d4dff;

  box-shadow:
    0 2px 8px
    rgba(157, 77, 255, 0.42);
}


.ufy-phone-gallery-filter:active {
  transform:
    translateY(-1px);
}


.ufy-phone-gallery-filter.is-active:active {
  transform:
    translateY(-3px);
}


/* =========================================================
   GRUPOS POR FECHA
   ========================================================= */

.ufy-phone-gallery-section {
  width: 100%;

  margin: 0;
  padding: 0;

  box-sizing: border-box;
}


.ufy-phone-gallery-date {
  margin: 0;

  padding:
    15px 10px
    8px;

  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.94);

  font-size:calc(16px * var(--ufy-font-scale,1));
  font-weight: 600;

  line-height: 1.2;
}


/* =========================================================
   CUADRÍCULA — TRES POR FILA
   ========================================================= */

.ufy-phone-gallery-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 2px;

  width: 100%;

  box-sizing: border-box;
}


/* =========================================================
   MINIATURA
   ========================================================= */

.ufy-phone-gallery-item {
  appearance: none;

  position: relative;

  min-width: 0;

  padding: 0;

  border: 0;
  outline: 0;

  aspect-ratio:
    1 / 1;

  overflow: hidden;

  background:
    rgba(var(--ufy-rgb-255,255,255,255),0.05);

  cursor: pointer;
}


.ufy-phone-gallery-item:active {
  opacity: 0.72;
}


/* =========================================================
   IMAGEN
   ========================================================= */

.ufy-phone-gallery-image {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

/* =========================================================
   REEL — IDENTIFICACIÓN EN MINIATURA
   ========================================================= */

.ufy-phone-gallery-reel-badge {
  position: absolute;

  top: 7px;
  right: 7px;

  z-index: 2;

  display: block;

  width: 36px;
  height: 36px;

  object-fit: contain;

  pointer-events: none;

  user-select: none;
  -webkit-user-select: none;

  filter:
    drop-shadow(
      0 2px 5px
      rgba(var(--ufy-rgb-0,0,0,0),0.75)
    );
}


.ufy-phone-gallery-reel-views {
  position: absolute;

  left: 7px;
  bottom: 7px;

  z-index: 2;

  min-height: 20px;

  box-sizing: border-box;

  display: inline-flex;
  align-items: center;

  padding:
    3px 7px 3px 25px;

  border:
    1px solid
    rgba(var(--ufy-rgb-255,255,255,255),0.32);

  border-radius: 999px;

  background:
    rgba(var(--ufy-rgb-0,0,0,0),0.62);

  backdrop-filter:
    blur(2px);

  -webkit-backdrop-filter:
    blur(2px);

  color: var(--ufy-tone-255,#fff);

  font-size:calc(11px * var(--ufy-font-scale,1));
  font-weight: 700;

  line-height: 1;

  pointer-events: none;
}


.ufy-phone-gallery-reel-views::before {
  content: "";

  position: absolute;

  left: 7px;
  top: 50%;

  width: 11px;
  height: 7px;

  box-sizing: border-box;

  border:
    1.5px solid var(--ufy-tone-255,#fff);

  border-radius:
    50% / 60%;

  background:
    radial-gradient(
      circle at center,
      var(--ufy-tone-255,#fff) 0 1.7px,
      transparent 2px
    );

  transform:
    translateY(-50%);
}


.ufy-phone-gallery-reel-likes {
  position: absolute;

  right: 7px;
  bottom: 7px;

  z-index: 2;

  min-height: 20px;

  box-sizing: border-box;

  display: inline-flex;
  align-items: center;

  gap: 4px;

  padding:
    3px 7px;

  border:
    1px solid
    rgba(var(--ufy-rgb-255,255,255,255),0.32);

  border-radius: 999px;

  background:
    rgba(var(--ufy-rgb-0,0,0,0),0.62);

  backdrop-filter:
    blur(2px);

  -webkit-backdrop-filter:
    blur(2px);

  color: var(--ufy-tone-255,#fff);

  font-size:calc(11px * var(--ufy-font-scale,1));
  font-weight: 700;
  line-height: 1;

  pointer-events: none;
}


.ufy-phone-gallery-reel-like-image {
  display: block;

  width: 16px;
  height: 16px;

  object-fit: contain;

  pointer-events: none;

  user-select: none;
  -webkit-user-select: none;
}



/* =========================================================
   ESTADO VACÍO O CARGANDO
   ========================================================= */

.ufy-phone-gallery-empty {
  min-height: 220px;

  padding: 28px 18px;

  display: grid;
  place-items: center;

  box-sizing: border-box;

  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.58);

  font-size:calc(14px * var(--ufy-font-scale,1));
  font-weight: 400;

  text-align: center;
}