/* Evitar scroll de fondo al abrir modal */
.kds-no-scroll { overflow: hidden; }

/* Burbujas */
.kds-stories-wrap {
  margin: 10px 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.kds-stories-row {
  gap: 12px;
  padding: 6px 2px;
}
.kds-bubble {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: center;
}
.kds-bubble-ring {
  display: block;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255,98,0,0.0) 60%, rgba(255,98,0,0.2) 61%),
              conic-gradient(#feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75);
  padding: 3px;
  box-sizing: border-box;
}
.kds-bubble-avatar {
  display: block;
  width: 66px; height: 66px;
  background-color: #eee;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  margin: -70px auto 6px;
  border: 3px solid #fff;
  box-sizing: border-box;
}
.kds-bubble-label {
  font-size: 12px;
  max-width: 72px;
  display: inline-block;
  color: #222;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Modal */
.kds-modal[hidden] { display: none; }
.kds-modal { position: fixed; inset: 0; z-index: 999999; }
.kds-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  cursor: pointer;
}
.kds-modal-content {
  position: absolute; inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center; justify-items: center;
  padding: 24px;
}

/* Stage (visor) */
.kds-stage {
  position: relative;
  width: min(90vw, 420px);
  height: min(90vh, 740px);
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

/* Video/iframe/contenido */
.kds-video, .kds-iframe, .kds-empty {
  width: 100%; height: 100%;
  display: block;
}
.kds-video { object-fit: cover; }
.kds-empty {
  color: #fff; display: grid; place-items: center; font-size: 14px;
}

/* Progress bar */
.kds-progress {
  width: min(90vw, 420px);
  height: 3px; background: rgba(255,255,255,0.2);
  border-radius: 999px; overflow: hidden; margin-bottom: 10px;
}
.kds-progress-bar {
  width: 0%; height: 100%; background: #fff;
}

/* Cerrar (X) dentro del video, arriba-derecha */
.kds-close {
  position: absolute;
  top: 8px; right: 8px;
  height: 36px;
  display: block;                 /* antes: grid */
  line-height: 36px;              /* centra vertical usando la altura */
  text-align: center;             /* centra horizontal */
  font-size: 22px;                /* un pelín menor se ve más centrado */
  color: #fff;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  cursor: pointer;
  z-index: 5;
}
.kds-close:hover { background: rgba(0,0,0,0.6); }

/* Botón CTA (Ver más) */
.kds-link-btn {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: 12px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.15);
  color: #fff; text-decoration: none; font-weight: 600; border-radius: 999px;
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255,255,255,0.35);
  z-index: 4;
}
.kds-link-btn:hover { background: rgba(255,255,255,0.25); }

/* Flechas */
.kds-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 999px;
  border: 0; background: rgba(255,255,255,0.15); color: #fff; font-size: 22px; cursor: pointer;
}
.kds-prev { left: calc(50% - min(45vw, 210px) - 30px); }
.kds-next { right: calc(50% - min(45vw, 210px) - 30px); }
@media (max-width: 680px){
  .kds-prev, .kds-next { display:none; }
}


/* Mejor centrado y escala para pantallas chicas */
@media (max-width: 680px) {
  .kds-modal-content {
    padding: 10px;
    align-items: center;
    justify-items: center;
  }

  .kds-stage {
    width: 94vw;
    height: 85vh;              /* antes 90vh */
    max-height: 88vh;
    border-radius: 14px;
  }

  .kds-progress {
    width: 94vw;
  }

  .kds-close {
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 32px;
  }
}



