﻿.intro-video-widget {
    position: fixed;
    bottom: 24px;
    left: 20px;
    z-index: 10002;
    width: min(360px, calc(100vw - 40px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.intro-video-widget.is-closed {
    display: none;
    pointer-events: none;
}

.intro-video-widget.is-preloading {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-video-widget.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.intro-video-widget-inner {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

:root[data-theme="light"] .intro-video-widget-inner {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

:root:not([data-theme="light"]) .intro-video-widget-inner {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.intro-video-header {
    padding: 10px 12px 8px;
}

.intro-video-tabs {
    display: flex;
    gap: 6px;
}

.intro-video-tab {
    flex: 1;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

:root[data-theme="light"] .intro-video-tab {
    color: #666;
}

:root:not([data-theme="light"]) .intro-video-tab {
    color: #aaa;
}

:root[data-theme="light"] .intro-video-tab.is-active {
    color: #2e7d32;
    background: rgba(69, 160, 73, 0.14);
    border-color: rgba(69, 160, 73, 0.45);
}

:root:not([data-theme="light"]) .intro-video-tab.is-active {
    color: #c8e6c9;
    background: rgba(69, 160, 73, 0.22);
    border-color: rgba(129, 199, 132, 0.55);
}

.intro-video-tab:hover:not(.is-active) {
    background: rgba(69, 160, 73, 0.1);
}

:root[data-theme="light"] .intro-video-tab:hover:not(.is-active) {
    color: #388e3c;
}

:root:not([data-theme="light"]) .intro-video-tab:hover:not(.is-active) {
    color: #a5d6a7;
}

.intro-video-players {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.intro-video-player {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: #000;
    overflow: hidden;
}

.intro-video-player.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.intro-video-players .intro-video-loading {
    border-radius: 0;
}

.intro-video-player iframe {
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    border: 0;
}

.intro-video-loading {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.72);
    color: #e8e8e8;
    font-size: 14px;
}

.intro-video-loading.is-active {
    display: flex;
}

.intro-video-loading i {
    font-size: 28px;
    color: #66bb6a;
}

.intro-video-footer {
    padding: 8px 12px 10px;
}

.intro-video-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.intro-video-dismiss-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

:root[data-theme="light"] .intro-video-dismiss-label {
    color: #666;
}

:root:not([data-theme="light"]) .intro-video-dismiss-label {
    color: #aaa;
}

.intro-video-dismiss-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: #45a049;
}

.intro-video-dismiss-label:hover {
    color: #45a049;
}

:root[data-theme="light"] .intro-video-dismiss-label:hover {
    color: #388e3c;
}

:root:not([data-theme="light"]) .intro-video-dismiss-label:hover {
    color: #81c784;
}

.intro-video-dismiss {
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    background: #45a049;
    color: #fff;
    transition: background 0.2s ease;
}

.intro-video-dismiss:hover {
    background: #388e3c;
}

@media (max-width: 480px) {
    .intro-video-widget {
        bottom: 16px;
        left: 16px;
        width: calc(100vw - 32px);
    }
}

