/* =========================================================
   UFY PHONE — EL CHAT DEL LOCK SCREEN
   Solo modifica el acceso izquierdo.
   ========================================================= */

.ufy-lock-chat-preview {
  appearance: none;
  -webkit-appearance: none;

  position: relative;

  width: 64px;
  height: 64px;

  margin: 0;
  padding: 0;

  transform:
    translateX(-15px);

  display: block;

  overflow: visible;

  border: 0;
  border-radius: 15px;

  background: transparent;

  color: var(--ufy-tone-255,#ffffff);

  box-shadow: none;

  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  cursor: pointer;

  -webkit-tap-highlight-color:
    transparent;
}


.ufy-lock-chat-preview:disabled {
  opacity: 1;

  cursor: default;
}


.ufy-lock-chat-preview-frame {
  position: absolute;

  inset: 0;

  display: block;

  overflow: hidden;

  border:
    1px solid
    rgba(var(--ufy-rgb-255,255,255,255),0.64);

  border-radius: 15px;

  background:
    linear-gradient(
      145deg,
      rgba(
        38,
        25,
        58,
        0.96
      ),
      rgba(
        10,
        8,
        18,
        0.98
      )
    );

  box-shadow:
    0 9px 22px
    rgba(var(--ufy-rgb-0,0,0,0),0.3),
    0 0 14px
    rgba(
      137,
      81,
      233,
      0.18
    ),
    inset 0 1px 0
    rgba(var(--ufy-rgb-255,255,255,255),0.12);

  box-sizing: border-box;

  transform:
    translateZ(0);

  transition:
    transform 150ms ease,
    border-color 150ms ease,
    filter 150ms ease;
}


.ufy-lock-chat-preview:not(
  :disabled
):active
.ufy-lock-chat-preview-frame {
  transform:
    translateZ(0)
    scale(0.96);

  filter:
    brightness(0.88);
}


.ufy-lock-chat-preview:focus-visible {
  outline: 0;
}


.ufy-lock-chat-preview:focus-visible
.ufy-lock-chat-preview-frame {
  border-color:
    rgba(
      205,
      177,
      255,
      0.98
    );

  box-shadow:
    0 0 0 3px
    rgba(
      145,
      89,
      239,
      0.34
    ),
    0 9px 22px
    rgba(var(--ufy-rgb-0,0,0,0),0.3);
}


/* FOTO O REEL */

.ufy-lock-chat-preview-media {
  position: absolute;

  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 35% 30%,
      rgba(
        134,
        78,
        215,
        0.3
      ),
      transparent 52%
    ),
    linear-gradient(
      145deg,
      #281a3a,
      #0e0b16 74%
    );
}


.ufy-lock-chat-preview-image,
.ufy-lock-chat-preview-video {
  display: block;

  width: 100%;
  height: 100%;

  border: 0;

  object-fit: cover;
  object-position: center;

  background: #0d0a13;
}


/* SOMBRA INFERIOR */

.ufy-lock-chat-preview-shade {
  position: absolute;

  inset:
    42%
    0
    0;

  background:
    linear-gradient(
      to bottom,
      transparent,
      rgba(
        5,
        4,
        9,
        0.16
      ) 28%,
      rgba(
        5,
        4,
        9,
        0.78
      ) 100%
    );

  pointer-events: none;
}


/* USUARIO */

.ufy-lock-chat-preview-identity {
  position: absolute;
  z-index: 3;

  left: 5px;
  right: 4px;
  bottom: 5px;

  display: flex;
  align-items: center;

  min-width: 0;

  gap: 4px;

  pointer-events: none;
}


.ufy-lock-chat-preview-identity[hidden] {
  display: none;
}


.ufy-lock-chat-preview-avatar {
  flex: 0 0 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 18px;
  height: 18px;

  overflow: hidden;

  border:
    1px solid
    rgba(var(--ufy-rgb-255,255,255,255),0.94);

  border-radius: 50%;

  background:
    linear-gradient(
      145deg,
      #8959dc,
      #271638
    );

  box-shadow:
    0 2px 7px
    rgba(var(--ufy-rgb-0,0,0,0),0.42);

  box-sizing: border-box;
}


.ufy-lock-chat-preview-avatar img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}


.ufy-lock-chat-preview-avatar-fallback {
  display: grid;
  place-items: center;

  width: 100%;
  height: 100%;

  color: var(--ufy-tone-255,#ffffff);

  font-size:calc(8px * var(--ufy-font-scale,1));
  font-weight: 750;
  line-height: 1;
}


.ufy-lock-chat-preview-handle {
  min-width: 0;

  overflow: hidden;

  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.98);

  font-size:calc(9.5px * var(--ufy-font-scale,1));
  font-weight: 680;
  line-height: 1.1;

  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;

  text-shadow:
    0 1px 4px
    rgba(var(--ufy-rgb-0,0,0,0),0.92);
}





/* CARGA, VACÍO Y ERROR */

.ufy-lock-chat-preview-status {
  position: absolute;
  z-index: 2;

  inset: 0;

  display: grid;
  place-items: center;

  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.78);

  font-size:calc(10px * var(--ufy-font-scale,1));
  font-weight: 720;
  letter-spacing: 1.2px;

  pointer-events: none;
}


.ufy-lock-chat-preview-status[hidden] {
  display: none;
}


.ufy-lock-chat-preview[
  data-state="loading"
]
.ufy-lock-chat-preview-frame::after {
  content: "";

  position: absolute;
  z-index: 4;

  inset: 0;

  background:
    linear-gradient(
      105deg,
      transparent 30%,
      rgba(var(--ufy-rgb-255,255,255,255),0.1) 48%,
      transparent 66%
    );

  transform:
    translateX(-100%);

  animation:
    ufy-lock-chat-preview-loading
    1.45s
    ease-in-out
    infinite;

  pointer-events: none;
}


@keyframes ufy-lock-chat-preview-loading {
  to {
    transform:
      translateX(100%);
  }
}


/* PANTALLAS MUY ESTRECHAS */

@media (max-width: 360px) {
  .ufy-lock-chat-preview {
    width: 58px;
    height: 58px;

    border-radius: 14px;
  }


  .ufy-lock-chat-preview-frame {
    border-radius: 14px;
  }


  .ufy-lock-chat-preview-avatar {
    flex-basis: 16px;

    width: 16px;
    height: 16px;
  }


  .ufy-lock-chat-preview-handle {
    font-size:calc(8.5px * var(--ufy-font-scale,1));
  }



}


@media (
  prefers-reduced-motion:
  reduce
) {
  .ufy-lock-chat-preview-frame {
    transition: none;
  }


  .ufy-lock-chat-preview[
    data-state="loading"
  ]
  .ufy-lock-chat-preview-frame::after {
    animation: none;
  }
}