/* UFY PHONE — Actividad de historias */

.ufy-story-activity {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #f7f3ff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

.ufy-story-activity,
.ufy-story-activity *,
.ufy-story-activity *::before,
.ufy-story-activity *::after {
  box-sizing: border-box;
}

.ufy-story-activity-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(9, 5, 17, 0.42);
}

.ufy-story-activity-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 520px);
  height: min(58dvh, 560px);
  min-height: 300px;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  border: 1px solid rgba(210, 181, 255, 0.38);
  border-top-color: rgba(191, 112, 255, 0.92);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background:
    linear-gradient(
      145deg,
      rgba(78, 48, 105, 0.54),
      rgba(24, 15, 37, 0.76)
    );
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  box-shadow: 0 -12px 36px rgba(5, 2, 12, 0.34);
  animation: ufy-story-activity-open 190ms ease-out;
}

.ufy-story-activity-sheet:focus {
  outline: none;
}

@keyframes ufy-story-activity-open {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.ufy-story-activity-grip {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 0;
  background: transparent;
  touch-action: none;
}

.ufy-story-activity-handle {
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(242, 233, 255, 0.88);
}

.ufy-story-activity-heading {
  flex-shrink: 0;
  margin: 0;
  padding: 4px 20px 6px;
  border-bottom: 0;
  font-size:calc(15px * var(--ufy-font-scale,1));
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.ufy-story-activity-summary {
  display: flex;
  flex-direction: column;
  transform: translateY(-7px);
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 3px;
  width: 80px;
  height: 80px;
  min-height: 80px;
  aspect-ratio: 1;
  margin: 4px 18px 10px;
  padding: 6px;
  border: 1px solid rgba(210, 181, 255, 0.42);
  border-radius: 16px;
  background: rgba(118, 78, 157, 0.12);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.ufy-story-activity-views-icon {
  display: block;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  color: #ae79ff;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ufy-story-activity-total {
  color: #f7f3ff;
  font-size:calc(22px * var(--ufy-font-scale,1));
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
}

.ufy-story-activity-total-label {
  color: #ded1ed;
  font-size:calc(11px * var(--ufy-font-scale,1));
  line-height: 1.2;
}

.ufy-story-activity-list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0 18px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color:
    rgba(210, 181, 255, 0.35)
    transparent;
}

.ufy-story-activity-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding-block: 10px;
  border-bottom: 1px solid rgba(210, 181, 255, 0.16);
}

.ufy-story-activity-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ufy-story-activity-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(225, 205, 255, 0.64);
  border-radius: 50%;
  background: #49325f;
  color: #f7f3ff;
  font-size:calc(16px * var(--ufy-font-scale,1));
  font-weight: 600;
}

.ufy-story-activity-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ufy-story-activity-identity {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ufy-story-activity-name,
.ufy-story-activity-username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ufy-story-activity-name {
  font-size:calc(14px * var(--ufy-font-scale,1));
  font-weight: 600;
}

.ufy-story-activity-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ufy-story-activity-username {
  color: #d3c2e7;
  font-size:calc(12px * var(--ufy-font-scale,1));
}

.ufy-story-activity-liked {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.ufy-story-activity-time {
  color: #d3c2e7;
  font-size:calc(11px * var(--ufy-font-scale,1));
  white-space: nowrap;
}

.ufy-story-activity-empty {
  margin: auto;
  padding: 28px 20px;
  color: #d3c2e7;
  font-size:calc(13px * var(--ufy-font-scale,1));
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 360px) {
  .ufy-story-activity-list {
    padding-inline: 12px;
  }

  .ufy-story-activity-item {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ufy-story-activity-sheet {
    animation: none;
  }
}