.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;
}

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

.djwb-video-modal__play-button {
    position: absolute;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
    cursor: pointer;
    width: auto;
    height: 48px;
    padding: 4px 5px 4px 4px;
    background-color: rgba(var(--text-hint-rgb), 0.8);
    border-radius: 20px;
}

.djwb-video-modal__play-button svg {
    width: 40px;
    height: 40px;
    fill: var(--background-inverse);
}

.djwb-modal {
    position: fixed;
    z-index: 15000;
    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); }
}

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