/* R10 Shorts Plugin v1.0.1 — r10-shorts.css
   Todos los estilos están encapsulados en .r10-widget y .r10-modal-overlay
   para no interferir con ningún otro elemento del tema de WordPress.
*/

/* ── Reset solo dentro del widget ── */
.r10-widget,
.r10-widget * {
  box-sizing: border-box;
}
.r10-widget img {
  max-width: none;
  height: auto;
}

/* ── Wrapper principal ── */
.r10-widget {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  line-height: 1.5;
}

/* ── Header del widget ── */
.r10-widget .r10-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 16px 0;
  padding: 0 0 10px 0;
  border: none;
  border-bottom: 2.5px solid #C8102E;
  background: transparent;
}
.r10-widget .r10-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.r10-widget .r10-logo {
  width: 36px !important;
  height: 36px !important;
  border-radius: 6px;
  background: #C8102E;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
  line-height: 1;
  margin: 0;
  padding: 0;
}
.r10-widget .r10-section-title {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.3px;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  line-height: 1;
  border: none;
  background: transparent;
}

/* ── Botones de navegación ── */
.r10-widget .r10-nav-btns {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.r10-widget .r10-nav-btns button,
.r10-widget .r10-nav-btns button:focus,
.r10-widget .r10-nav-btns button:active {
  width: 34px;
  height: 34px;
  min-width: 0;
  border-radius: 50%;
  border: 1px solid #d0d0d0;
  background: #fff;
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  padding: 0;
  margin: 0;
  line-height: 1;
  box-shadow: none;
  transition: background 0.15s;
}
.r10-widget .r10-nav-btns button:hover:not(:disabled) { background: #f0f0f0; }
.r10-widget .r10-nav-btns button:disabled { opacity: 0.35; cursor: default; }

/* ── Carousel y grid ── */
.r10-widget .r10-carousel { overflow: hidden; margin: 0; padding: 0; }
.r10-widget .r10-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ── Card ── */
.r10-widget .r10-card {
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.09);
  display: block;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.12s;
  margin: 0;
  padding: 0;
}
.r10-widget .r10-card:hover {
  border-color: #C8102E;
  transform: translateY(-2px);
  text-decoration: none;
}

/* ── Thumbnail ── */
.r10-widget .r10-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  background: #1a1a1a;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
.r10-widget .r10-thumb img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.r10-widget .r10-thumb-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: #1e1e1e;
}
.r10-widget .r10-channel-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(200,16,46,0.9);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.4px;
  line-height: 1.4;
  margin: 0;
}
.r10-widget .r10-dur-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1.4;
  margin: 0;
}
.r10-widget .r10-play-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  margin: 0;
  padding: 0;
}

/* ── Info del card ── */
.r10-widget .r10-info { padding: 8px 8px 10px; margin: 0; }
.r10-widget .r10-info-cat {
  font-size: 10px;
  color: #C8102E;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0 0 3px 0;
  padding: 0;
  line-height: 1.3;
}
.r10-widget .r10-info-title {
  font-size: 12px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
  margin: 0;
  padding: 0;
}
.r10-widget .r10-info-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 0 0;
  padding: 0;
}
.r10-widget .r10-info-dur {
  font-size: 10px;
  color: #888;
  margin: 0;
  padding: 0;
}
.r10-widget .r10-bm-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: #999;
  transition: color 0.15s, border-color 0.15s;
  padding: 0;
  margin: 0;
  line-height: 1;
  box-shadow: none;
}
.r10-widget .r10-bm-btn.saved { color: #C8102E; border-color: #C8102E; }

/* ── Skeleton ── */
.r10-widget .r10-skeleton { border-radius: 10px; overflow: hidden; margin: 0; padding: 0; }
.r10-widget .r10-skel-thumb {
  width: 100%;
  aspect-ratio: 9/16;
  background: #e8e8e8;
  border-radius: 8px;
  animation: r10pulse 1.4s ease-in-out infinite;
}
.r10-widget .r10-skel-line {
  height: 10px;
  background: #e8e8e8;
  border-radius: 4px;
  margin: 8px 0 0 0;
  padding: 0;
  animation: r10pulse 1.4s ease-in-out infinite;
}
.r10-widget .r10-skel-short { width: 60%; }
@keyframes r10pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ── Dots ── */
.r10-widget .r10-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0 0;
  padding: 0;
  min-height: 14px;
}
.r10-widget .r10-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  padding: 0;
  margin: 0;
  display: inline-block;
  box-shadow: none;
}
.r10-widget .r10-dot.active { background: #C8102E; }

/* ── Modal (position:fixed — fuera del widget) ── */
.r10-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  margin: 0;
  padding: 0;
}
.r10-modal-overlay.open { display: flex; }
.r10-modal-overlay *,
.r10-modal-overlay *::before,
.r10-modal-overlay *::after { box-sizing: border-box; }

.r10-modal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.r10-modal-player {
  position: relative;
  width: 320px;
  max-width: 88vw;
  aspect-ratio: 9/16;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
}
.r10-modal-media { width: 100%; height: 100%; }
.r10-modal-media iframe {
  width: 100% !important;
  height: 100% !important;
  display: block;
  border: none;
}
.r10-modal-media img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}
.r10-modal-media-ph {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #aaa;
  font-size: 14px;
  text-align: center;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.r10-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  line-height: 1;
}
.r10-modal-side {
  position: absolute;
  right: -46px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.r10-modal-side button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  border: none;
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  line-height: 1;
  transition: background 0.15s;
}
.r10-modal-side button:hover { background: rgba(255,255,255,0.28); }
.r10-modal-actions {
  position: absolute;
  bottom: 14px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.r10-modal-action {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  line-height: 1;
}
.r10-modal-info {
  width: 320px;
  max-width: 88vw;
  margin: 14px 0 0 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.r10-modal-title {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
  padding: 0;
  line-height: 1.3;
}
.r10-modal-meta {
  color: #999;
  font-size: 12px;
  margin: 0 0 10px 0;
  padding: 0;
}
.r10-modal-yt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #C8102E;
  color: #fff !important;
  text-decoration: none !important;
  padding: 9px 20px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.r10-modal-yt:hover { background: #a50d26 !important; color: #fff !important; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .r10-widget .r10-grid { grid-template-columns: repeat(2, 1fr); }
  .r10-modal-side { display: none; }
}
