/* =========================================
   ВИДЕО МОДУЛЬ - ПОЛНЫЕ СТИЛИ
   ========================================= */

/* --- 4. ЭЛЕМЕНТЫ ПОВЕРХ ВИДЕО --- */

/* Кнопка Play по центру */
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px); /* Эффект матового стекла */
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: none; /* Чтобы клик проходил сквозь кнопку на карточку */
}

/* Бейдж "VIDEO" */
.video-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Кнопка удаления (крестик) */
.video-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    border: none;
    border-radius: 50%;
    
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 20; /* Должна быть выше всего, чтобы нажималась */
    opacity: 0; /* Скрыта по умолчанию */
}

/* Показываем кнопку удаления только при наведении на карточку */
.video-card:hover .video-delete-btn {
    opacity: 1;
}

/* На мобильных кнопка удаления всегда видна (так как нет ховера) */
@media (max-width: 768px) {
    .video-delete-btn {
        opacity: 1;
        background: rgba(0, 0, 0, 0.7);
    }
}

.video-delete-btn:hover {
    background: #dc3545; /* Красный при наведении */
    transform: scale(1.1);
}

/* --- 5. КРАСИВЫЙ ПЕРЕКЛЮЧАТЕЛЬ РЕЖИМОВ (TEKST / ФОТО) --- */
.video-mode-switcher {
    position: relative;
    display: flex;
    width: 100%;
    background: rgba(255, 255, 255, 0.05); /* Темный фон трека */
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    user-select: none;
}

/* Скрываем стандартные радио-кнопки */
.video-mode-switcher input[type="radio"] {
    display: none;
}

/* Лейблы (Текст кнопок) */
.video-mode-switcher label {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    z-index: 2; /* Текст поверх фона */
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

/* Активный фон (плашка, которая ездит) */
.switcher-bg {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px); /* Половина ширины минус отступы */
    height: calc(100% - 8px);
    
    /* Золотой градиент */
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 8px;
    
    /* Анимация движения */
    transition: transform 0.3s cubic-bezier(0.45, 0.05, 0.55, 0.95);
    z-index: 1;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.2);
}

/* --- ЛОГИКА ПЕРЕКЛЮЧЕНИЯ --- */

/* Когда выбран первый (Текст) */
#vmode-text:checked ~ .switcher-bg {
    transform: translateX(0); /* Стоит слева */
}
#vmode-text:checked + label {
    color: #000; /* Текст становится черным (контрастным) */
}

/* Когда выбран второй (Фото) */
#vmode-image:checked ~ .switcher-bg {
    transform: translateX(100%); /* Едет направо (на 100% своей ширины) */
}
#vmode-image:checked + label {
    color: #000;
}

/* --- 6. ОБЛАСТЬ ЗАГРУЗКИ (Drag & Drop) --- */
.upload-drop-zone {
    position: relative; /* Обязательно для позиционирования крестика */
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    
    /* Уменьшаем отступы и высоту */
    padding: 15px; 
    min-height: 100px; 
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}


.upload-drop-zone:hover {
    border-color: #FABF3C;
    background: rgba(250, 191, 60, 0.05);
}

/* Ограничиваем размер превью, чтобы не распирало */
.upload-preview {
    max-height: 140px; /* Фиксируем высоту картинки */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    display: none; /* Скрыто по умолчанию */
}

/* Кнопка очистки (Крестик) */
.clear-file-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    
    width: 28px;
    height: 28px;
    border-radius: 50%;
    
    background: rgba(220, 53, 69, 0.9); /* Красный фон сразу */
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    
    /* ВАЖНО: Поднимаем на самый верх */
    z-index: 100; 
    transition: transform 0.2s;
}

.clear-file-btn:hover {
    background: #ff0019;
    transform: scale(1.1);
}