/* WZATCO Demo Video Gallery — full-width layout */

body.wzatco-demo-videos-gallery-page .site-content > .em-container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
}

.wzdg {
    --wzdg-primary: #e11d2e;
    --wzdg-primary-dark: #b51220;
    --wzdg-primary-soft: #fff5f5;
    --wzdg-text: #101828;
    --wzdg-muted: #667085;
    --wzdg-border: #e4e7ec;
    --wzdg-border-strong: #d0d5dd;
    --wzdg-bg: #f4f6f9;
    --wzdg-card: #ffffff;
    --wzdg-radius: 14px;
    --wzdg-radius-sm: 10px;
    --wzdg-pad-x: 15px;
    --wzdg-dropdown-pad: 0px;
    box-sizing: border-box;
    margin: 0 0 40px;
    max-width: none;
    padding: 24px var(--wzdg-pad-x) calc(32px + var(--wzdg-dropdown-pad));
    text-align: left;
    transition: padding-bottom 0.25s ease;
    width: 100%;
}

.wzdg.wzdg--dropdown-open {
    position: relative;
    z-index: 50;
}

.wzdg__inner {
    background: var(--wzdg-card);
    border: 1px solid var(--wzdg-border);
    border-radius: var(--wzdg-radius);
    box-shadow: 0 2px 12px rgba(16, 24, 40, 0.04);
    padding: 28px 20px 32px;
    width: 100%;
}

.wzdg__header {
    margin-bottom: 24px;
    text-align: center;
}

.wzdg__title {
    color: var(--wzdg-text);
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    text-align: center;
}

.wzdg__subtitle {
    color: var(--wzdg-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 640px;
    text-align: center;
}

.wzdg__empty {
    background: var(--wzdg-bg);
    border: 1px dashed var(--wzdg-border);
    border-radius: var(--wzdg-radius-sm);
    color: var(--wzdg-muted);
    padding: 28px 20px;
    text-align: center;
}

.wzdg__controls {
    margin-bottom: 20px;
    width: 100%;
}

.wzdg__label {
    color: var(--wzdg-text);
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 10px;
    text-align: left;
}

/* Custom select */
.wzdg__select-native {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.wzdg-custom-select {
    position: relative;
    width: 100%;
}

.wzdg-custom-select__trigger {
    align-items: center;
    background: #fff;
    border: 1.5px solid var(--wzdg-border-strong);
    border-radius: var(--wzdg-radius-sm);
    color: var(--wzdg-text);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    gap: 12px;
    justify-content: space-between;
    line-height: 1.4;
    min-height: 52px;
    padding: 0 18px;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.wzdg-custom-select__trigger:hover {
    border-color: #98a2b3;
}

.wzdg-custom-select.is-open .wzdg-custom-select__trigger,
.wzdg-custom-select__trigger:focus {
    border-color: var(--wzdg-primary);
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.1);
    outline: none;
}

.wzdg-custom-select__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wzdg-custom-select__label.is-placeholder {
    color: #98a2b3;
    font-weight: 400;
}

.wzdg-custom-select__chevron {
    color: var(--wzdg-muted);
    flex-shrink: 0;
    height: 20px;
    transition: transform 0.2s ease;
    width: 20px;
}

.wzdg-custom-select.is-open .wzdg-custom-select__chevron {
    color: var(--wzdg-primary);
    transform: rotate(180deg);
}

.wzdg-custom-select__panel {
    background: #fff;
    border: 1px solid var(--wzdg-border);
    border-radius: var(--wzdg-radius-sm);
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.12);
    left: 0;
    margin-top: 6px;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 200;
}

.wzdg-custom-select__panel[hidden] {
    display: none !important;
}

.wzdg-custom-select.is-open .wzdg-custom-select__panel {
    animation: wzdgDropIn 0.18s ease;
    display: block;
}

body.wzatco-demo-videos-gallery-page.wzdg-dropdown-active {
    overflow-anchor: none;
}

.wzdg-custom-select__options {
    max-height: min(320px, 50vh);
    overflow-y: auto;
    padding: 8px;
    scrollbar-color: #d0d5dd transparent;
    scrollbar-width: thin;
}

.wzdg-custom-select__option {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--wzdg-text);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    justify-content: flex-start;
    line-height: 1.4;
    padding: 13px 16px;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
    width: 100%;
}

.wzdg-custom-select__option:hover,
.wzdg-custom-select__option.is-selected {
    background: var(--wzdg-primary-soft);
    color: var(--wzdg-primary-dark);
}

.wzdg-custom-select__option.is-selected {
    font-weight: 600;
}

.wzdg-custom-select__option-name {
    line-height: 1.4;
    text-align: left;
    width: 100%;
}

/* Player */
.wzdg__player-shell {
    animation: wzdgFadeIn 0.35s ease;
    width: 100%;
}

.wzdg__player-shell.is-hidden {
    display: none !important;
}

.wzdg__player-card {
    background: #111827;
    border-radius: var(--wzdg-radius);
    overflow: hidden;
    padding: 16px;
    width: 100%;
}

.wzdg__player-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 12px;
    text-align: left;
}

.wzdg__video-frame {
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.wzdg__video {
    background: #000;
    display: block;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    width: 100%;
}

body.wzatco-demo-videos-gallery-page .wzdg video::-webkit-media-controls-enclosure {
    overflow: hidden;
}

@keyframes wzdgDropIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wzdgFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop: 50px side padding */
@media (min-width: 768px) {
    .wzdg {
        --wzdg-pad-x: 50px;
        padding-bottom: 48px;
        padding-top: 32px;
    }

    .wzdg__inner {
        padding: 36px 40px 40px;
    }

    .wzdg__player-card {
        padding: 20px 24px 24px;
    }
}

/* Mobile tweaks */
@media (max-width: 767px) {
    .wzdg__inner {
        padding: 22px 16px 26px;
    }
}
