
/* Adminka */
.style-preview-container {
  display: flex;
  flex-wrap: wrap;
}

.style-option {
  position: relative;
  cursor: pointer;
  padding: 5px;
  transition: all 0.3s ease; 
}


/* Стили для галочки */
.checkmark {
  position: absolute;
  top: 0px;
  right: 5px;
  width: 20px;
  height: 20px;
  background-color: transparent;
  border-radius: 50%;
  display: none;
}

.style-option.selected .checkmark {
  display: block;
  background-color: #28a745; /* Зелёный фон для кружка */
}

.style-option.selected .checkmark::before {
  content: "✔";
  color: white;
  font-size: 14px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}



.prs {
    display: inline-block;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    margin-bottom: 20px;
}

.prs:hover {
    border-color: #959595;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.preview-style.selected .prs {
    border: 1px solid #28a745;
}


.vs_box {
    position: relative;
    border-radius: 6px;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #333;
    font-weight: 700;
    font-size: 15px;
    justify-content: space-around;
    cursor: pointer;
    border: 0;
}


/* adminka and  */



.iframe__box  {
    text-align: center;
}

.iframe__box {
    position: relative;
    width: 100%;
    max-width: 920px; /* Максимальная ширина для десктопов */
    margin: 0 auto;
}

.iframe__box iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: #111;
}

/* Сохраняем пропорции 16:9 (450 / 800 = 0.5625) */
.iframe__box::before {
    content: "";
    display: block;
    padding-bottom: 56.25%; /* 16:9 соотношение */
}

/* Стили для кнопки закрытия */
.iframe__box .mfp-close {
    position: absolute;
    top: -44px;
    right: 0;
    color: white;
    font-size: 35px;
    cursor: pointer;
}

.youtube_video a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 68px;
    border: 0;
    padding: 0;
    padding: 5px;
    overflow: hidden;
    margin-bottom: 0px;
    transition: 0.3s;
}


.youtube_video a:hover i, 
.youtube_video a:focus i {
    color: #ff0000;
    opacity: 0.9;
    outline:none;
}

.youtube_video a:hover img, 
.youtube_video a:focus img,
.vs_box:hover img {
    transform: scale(1.1);
}


.youtube_video img, 
.vs_box img {
    transition: 0.3s;
}

.style_bx {
    text-align: center;
}




/* video_style_1 */
.youtube_style_1 svg {
    position: absolute;
    fill:#F61C0D;
    width: 35px;
    height: 35px;
    transition: 0.4s;
}
.youtube_style_1:hover svg {
    fill:#353535;
}

/* video_style_2 */
.youtube_style_2 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #333;
    font-weight: 700;
    font-size: 12px;
    justify-content: space-around;
    cursor: pointer;
    padding: 0 !important;
}

.youtube_style_2 span {
    margin-right: 2px;
}

.youtube_style_2 svg {
    fill:#F61C0D;
    width: 30px;
    height: 30px;
    transition: 0.4s;
    cursor: pointer;
}
.youtube_style_3:hover svg {
    fill:#353535;
}

/* video_style_3 */
.youtube_style_3 {
    color: #333;
    font-weight: 700;
    font-size: 14px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.youtube_style_3 svg {
    fill:#F61C0D;
    width: 50px;
    height: 40px;
    transition: 0.7s;
    cursor: pointer;
}
.youtube_style_3:hover svg {
    fill:#353535;
}

/* video_style_4 */
.youtube_style_4 {
    justify-content: center;
    align-items: center;
    height: 68px;
    width: 68px;
}
.youtube_style_4 svg {
    fill:#F61C0D;
    width: 50px;
    height: 50px;
    transition: 0.7s;
}
.youtube_style_4:hover svg {
    fill:#353535;
}

/* youtube mini
------------------------------  */
#youtube-mini {
    position: absolute;
    top: 8px;
    right: 25px;
}
#youtube-mini .youtube-mini-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#youtube-mini .youtube-mini-item a span {
    color: #000;
    font-size: 13px;
}

@media (max-width: 767px) {
    #youtube-mini {
        z-index: 9;
        right: 0px;
        background: #ffffff;
        padding: 5px 5px 5px 10px;
        border-radius: 0px 0px 0px 6px;
    }
    .youtube-mini-item {
        
    }
}

#youtube-mini svg {
    width: 40px;
    height: 35px;
    fill: #000000;
    opacity: 0.5;
    transition: 0.3s;
    cursor: pointer;
}
#youtube-mini svg:hover,
#youtube-mini svg:focus {
    opacity: 1;
}

/* video gallery
----------------------------- */

#video-gallery {}
#video-gallery .name-video-gallery {
    font-size: 21px;
    color: #444;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.1;
}

#video-gallery {
    margin: 20px 0;
}

.name-video-gallery {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Общие стили для контейнера галереи */
#video-gallery .box-video-gallery {
        padding: 10px 0;
        gap: 10px; /* Расстояние между видео */
}

/* Стили для мобильных устройств (горизонтальный скролл) */
@media (max-width: 767px) {
    #video-gallery .box-video-gallery {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
        white-space: nowrap;
        -ms-overflow-style: none; /* Скрываем скроллбар в IE/Edge */
        scrollbar-width: none; /* Скрываем скроллбар в Firefox */

    }

      #video-gallery .box-video-gallery::-webkit-scrollbar {
        display: none; /* Скрываем скроллбар в Chrome/Safari */
    }

    #video-gallery .box-video-gallery a {
        flex: 0 0 41%;
        scroll-snap-align: start; /* Привязка скролла к началу элемента */
        border: 1px solid #ddd;
        padding: 0 !important;
        box-sizing: border-box;
        display: inline-block;
        border-radius: 6px;
        white-space: normal;
        overflow-wrap: break-word;
        height: auto;
        min-height: 60px;
        position: relative; /* Для центрирования иконки */
    }
}

/* Стили для десктопа (3 видео в ряд, перенос на следующую строку) */
@media (min-width: 768px) {
    #video-gallery .box-video-gallery {
        display: flex;
        flex-wrap: wrap; /* Перенос на следующую строку */
/*        justify-content: space-between; */
        justify-content: flex-start;
    }

    #video-gallery .box-video-gallery a {
        flex: 0 0 calc(25% - 10px); /* 3 видео в ряд с учётом gap */
        margin-bottom: 5px; /* Отступ снизу для строк */
        border: 1px solid #ddd;
        padding: 0 !important;
        box-sizing: border-box;
        border-radius: 6px;
        height: auto;
        position: relative; /* Для центрирования иконки */
    }
}

/* Стили для картинки и иконки (общие для всех устройств) */
#video-gallery .box-video-gallery a img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Картинка заполняет контейнер без искажений */
    border-radius: 4px;
}

#video-gallery .box-video-gallery a svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Центрируем иконку */
    width: 50px; /* Размер иконки */
    height: 50px;
    transition: opacity 0.3s ease;
}

#video-gallery .box-video-gallery a:hover svg {
  opacity: 0.8; /* Эффект при наведении */
}

/* Адаптация размера иконки для мобильных */
@media (max-width: 767px) {
    #video-gallery .box-video-gallery a svg {
        width: 40px;
        height: 40px;
    }

    .mob-video {
        margin-top: 20px;
    }

    .mob-video a svg {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%); /* Центрируем иконку */
        width: 70px; /* Размер иконки */
        height: 70px;
        transition: opacity 0.3s ease;
    }
}


/* Стили для попапа
--------------------------------------- */
.mfp-video-popup .mfp-content {
  max-width: 960px; /* Ширина попапа на десктопе */
  width: 100%;
  background: #fff; /* Белый фон для контента попапа */
  border-radius: 6px;
  padding: 20px;
}

/* Отключаем кликабельность фона */
.mfp-bg {
  cursor: default; /* Убираем курсор "клик" на фоне */
}

/* Стили для блока с видео */
.iframe__box {
  position: relative;
  padding-bottom: 56.25%; /* Соотношение сторон 16:9 */
  height: 0;
  overflow: hidden;
  margin: 0 auto;
}

.iframe__box iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111;
}

/* Стили для блока с превью под видео */
.video-thumbnails {
  margin-top: 15px;
  padding: 10px 0;
}

/* Мобильные устройства: горизонтальный скролл */
@media (max-width: 767px) {
    .mfp-video-popup .mfp-content {
        /*    max-width: 90%;*/
        padding: 10px;
    }

    .video-thumbnails {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
/*        gap: 10px;*/
        -ms-overflow-style: none;
        scrollbar-width: none;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .video-thumbnails::-webkit-scrollbar {
        display: none;
    }

    .video-thumbnails a.thumbnail-popup {
        flex: 0 0 31.6%;
        scroll-snap-align: start;
        position: relative;
        display: inline-block;
        border-radius: 6px;
        height: auto;
        min-height: 60px;
        border: 1px solid #ddd;
        margin-bottom: 8px;
    }
}

/* Десктоп: 3 превью в ряд */
@media (min-width: 768px) {
  .video-thumbnails {
    display: flex;
    flex-wrap: wrap;
/*    justify-content: space-between;*/
    justify-content: flex-start;
    gap: 10px;
  }

  .video-thumbnails a.thumbnail-popup {
    flex: 0 0 calc(25% - 10px); /* 3 видео в ряд */
    margin-bottom: 15px;
    border-radius: 6px;
    height: auto;
    min-height: 120px;
    position: relative;
    border: 1px solid #ddd;
  }

}

/* Стили для картинок и иконки в превью */
.video-thumbnails a.thumbnail-popup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.video-thumbnails a.thumbnail-popup svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  transition: opacity 0.3s ease;
}

.video-thumbnails a.thumbnail-popup:hover svg {
  opacity: 0.8;
}

/* Подсветка активного превью */
.video-thumbnails a.thumbnail-popup.active {
  border: 2px solid #FF0000;
  opacity: 0.9;
}

/* Адаптация размера иконки для мобильных */
@media (max-width: 767px) {
    .video-thumbnails a.thumbnail-popup svg {
        width: 30px;
        height: 30px;
    }
}

.video-thumbnails .mfp-close, .iframe__box .mfp-close {display: none;}

.mfp-video-popup .mfp-close {
    color: #000000;
    right: 15px;
    top: 15px;
    font-size: 38px;
}

.mfp-header {
    margin-bottom: 10px;
    margin-top: 5px;
}
.mfp-header span {
    font-size: 21px;
    color: #000000;
}

@media (max-width: 767px) {
    .mfp-video-popup .mfp-close {
        right: 5px;
        top: 6px;
        font-size: 38px;
    }
}
