/* ox-content YouTube Plugin - iframe styles */

.ox-youtube {
  margin: 1.5rem 0;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--octc-color-bg-alt);
}

.ox-youtube iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Placeholder when iframe hasn't loaded */
.ox-youtube::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--octc-color-bg-alt) 0%, var(--octc-color-border) 100%);
  z-index: -1;
}

/* Play button placeholder */
.ox-youtube-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-size: cover;
  background-position: center;
}

.ox-youtube-placeholder::after {
  content: "";
  width: 68px;
  height: 48px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 48'%3E%3Cpath fill='%23f00' d='M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z'/%3E%3Cpath fill='%23fff' d='M45 24L27 14v20'/%3E%3C/svg%3E")
    center/contain no-repeat;
  transition: transform 0.2s ease;
}

.ox-youtube-placeholder:hover::after {
  transform: scale(1.1);
}

/* Title overlay */
.ox-youtube-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .ox-youtube {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    border-radius: 0;
    width: calc(100% + 1.5rem);
  }
}
