{% if video.has_video %}
{% if video.video_styled_background %}
<div class="video-panel video-panel--styled fade-in">
  <div class="video-panel-ambient" aria-hidden="true">
    <div class="video-panel-blob video-panel-blob--1"></div>
    <div class="video-panel-blob video-panel-blob--2"></div>
    <div class="video-panel-blob video-panel-blob--3"></div>
  </div>
  <div class="video-panel-inner">
    {% if video.badge or video.title %}
    <div class="video-panel-header">
      <div class="video-panel-heading">
        {% if video.badge %}<div class="section-badge">{{ video.badge }}</div>{% endif %}
        {% if video.title %}
        <h2 class="video-panel-title" id="video-heading-{{ video.pk }}">
          <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
            <polygon points="5 3 19 12 5 21 5 3"/>
          </svg>
          {{ video.title }}
        </h2>
        {% else %}
        <h2 class="sr-only" id="video-heading-{{ video.pk }}">Video</h2>
        {% endif %}
      </div>
    </div>
    {% else %}
    <h2 class="sr-only" id="video-heading-{{ video.pk }}">Video</h2>
    {% endif %}
    {% if video.description %}
    <div class="rich-content section-desc video-panel-desc">{{ video.rendered_description }}</div>
    {% elif video.content %}
    <div class="rich-content section-desc video-panel-desc">{{ video.rendered_content }}</div>
    {% endif %}
    {% include "partials/_video_player.html" with video=video %}
  </div>
</div>
{% else %}
{% if video.badge or video.title %}
<div class="section-header{% if compact_header %} product-video-header{% endif %}">
  {% if video.badge %}<div class="section-badge">{{ video.badge }}</div>{% endif %}
  {% if video.title %}
  <h2 class="section-title" id="video-heading-{{ video.pk }}">{{ video.title }}</h2>
  {% else %}
  <h2 class="sr-only" id="video-heading-{{ video.pk }}">Video</h2>
  {% endif %}
</div>
{% endif %}
{% if video.description %}
<div class="rich-content section-desc">{{ video.rendered_description }}</div>
{% elif video.content %}
<div class="rich-content section-desc">{{ video.rendered_content }}</div>
{% endif %}
{% include "partials/_video_player.html" with video=video %}
{% endif %}
{% endif %}
