.djwb-video-modal {
    width: 100%;
}

.djwb-video-modal__thumbnail {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius-m);
    overflow: hidden;
}

.djwb-video-modal__image {
    width: 100%;
    height: auto;
    display: block;
}

/* Styles for full-height image */
.djwb-video-modal--full-height {
    height: 100%;
}

.djwb-video-modal--full-height .djwb-video-modal__thumbnail {
    height: 100%;
    border-radius: 0;
}

.djwb-video-modal--full-height .djwb-video-modal__image {
    height: 100%;
    object-fit: cover;
}

.djwb-video-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 31, 61, 0.5);
}

.djwb-video-modal__play-button {
    position: absolute;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    cursor: pointer;
    width: 150px;
    height: 150px;
    padding: 0;
    -moz-box-shadow: 0 0 0 0 rgba(var(--white-rgb), 0.4);
    background-color: var(--white);
    box-shadow: 0 0 0 0 rgba(var(--white-rgb), 0.4);
    animation: pulse 2s infinite;
    border-radius: var(--radius-50);
    color: var(--secondary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.djwb-video-modal__play-button svg {
    width: 48px;
    height: 48px;
    fill: var(--secondary);
    margin-top: 2px;
    margin-left: 6px;
}

.djwb-modal {
    position: fixed;
    z-index: 500;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.djwb-modal--is-visible {
    opacity: 1;
    visibility: visible;
}

.djwb-modal__content {
    width: 90%;
    max-width: var(--width-max);
    max-height: 90vh;
    background-color: var(--primary-950);
    position: relative;
}

.djwb-modal__close-btn {
    position: absolute;
    top: calc(-1.5 * var(--space-xs));
    right: calc(-1.5 * var(--space-xs));
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: var(--body-xl);
    height: var(--body-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 600;
}

.djwb-modal__close-btn svg {
    width: 100%;
    height: 100%;
    fill: var(--white);
}

.djwb-modal__content-inner {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.djwb-modal__content-inner iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.djwb-modal__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes djwb-icon-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0% {
    -moz-box-shadow: 0 0 0 0 rgba(var(--white-rgb), 0.4);
    box-shadow: 0 0 0 0 rgba(var(--white-rgb), 0.4);
  }
  70% {
      -moz-box-shadow: 0 0 0 20px rgba(var(--white-rgb), 0);
      box-shadow: 0 0 0 20px rgba(var(--white-rgb), 0);
  }
  100% {
      -moz-box-shadow: 0 0 0 0 rgba(var(--white-rgb), 0);
      box-shadow: 0 0 0 0 rgba(var(--white-rgb), 0);
  }
}

.djwb-icon--is-spinning {
    animation: djwb-icon-spin 1s infinite linear;
}