/**
 * Video Popup Styles
 * 使い方動画ポップアップのスタイル
 */

/* ===========================
   ミニポップアップ
   =========================== */

.video-mini-popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 300px;
    height: 168px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.video-mini-popup.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.video-mini-popup:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.video-mini-popup:focus {
    outline: 3px solid #4ecdc4;
    outline-offset: 2px;
}

.video-mini-popup .thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-mini-popup .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-mini-popup:hover .play-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.video-mini-popup .play-overlay i {
    color: white;
    font-size: 3.75rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s ease;
}

.video-mini-popup:hover .play-overlay i {
    transform: scale(1.15);
}

/* ===========================
   モーダル
   =========================== */

.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal-overlay.visible {
    opacity: 1;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: #1e2130;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.video-modal-overlay.visible .video-modal-content {
    transform: scale(1);
}

.video-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 10;
}

.video-modal-close:hover {
    background: #f44336;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.video-modal-close:focus {
    outline: 3px solid #4ecdc4;
    outline-offset: 2px;
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* ===========================
   レスポンシブ対応
   =========================== */

/* タブレット */
@media (max-width: 1023px) {
    .video-mini-popup {
        width: 270px;
        height: 152px;
        bottom: 25px;
        right: 25px;
    }

    .video-mini-popup .play-overlay i {
        font-size: 2.7rem;
    }

    .video-modal-content {
        width: 92%;
        max-width: 700px;
        padding: 1.5rem;
    }
}

/* モバイル */
@media (max-width: 767px) {
    .video-mini-popup {
        width: 210px;
        height: 119px;
        bottom: 20px;
        right: 20px;
    }

    .video-mini-popup .play-overlay i {
        font-size: 2.25rem;
    }

    .video-modal-content {
        width: 95%;
        max-width: none;
        padding: 1rem;
        border-radius: 10px;
    }

    .video-modal-close {
        top: -10px;
        right: -10px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .video-player-wrapper {
        border-radius: 8px;
    }
}

/* 小さいモバイル */
@media (max-width: 480px) {
    .video-mini-popup {
        width: 180px;
        height: 102px;
        bottom: 15px;
        right: 15px;
    }

    .video-mini-popup .play-overlay i {
        font-size: 1.95rem;
    }

    .video-modal-content {
        padding: 0.75rem;
    }
}

/* ===========================
   アクセシビリティ
   =========================== */

/* タッチデバイス用 */
@media (hover: none) {
    .video-mini-popup:hover {
        transform: scale(1.05);
    }

    .video-modal-close:hover {
        transform: rotate(0) scale(1.05);
    }
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
    .video-mini-popup {
        border: 2px solid white;
    }

    .video-modal-close {
        border: 2px solid #333;
    }
}

/* アニメーション削減モード対応 */
@media (prefers-reduced-motion: reduce) {
    .video-mini-popup,
    .video-modal-overlay,
    .video-modal-content,
    .video-modal-close,
    .play-overlay i {
        transition: none;
    }

    .video-mini-popup.visible {
        transform: scale(1) translateY(0);
    }
}
