.videoButton {
    min-width: 520px;
    text-align: left;
    display: inline-flex;       /* Прави бутона флекс контейнер */
    align-items: center;        /* Центрира картинката и текста вертикално (може и 'flex-start' за подравняване отгоре) */
    gap: 12px;                  /* Прави разстояние между картинката и текста */
    white-space: normal;        /* Позволява на текста да се пренася на нов ред */
}

/* Ако е необходимо, подсигурете се, че картинката не се свива */
.videoButton img {
    flex-shrink: 0;
}

.dynamic-info-button {
    position: absolute;
    pointer-events: auto; /* Бутоните обаче ТРЯБВА да могат да се кликат */
    background-color: red;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    display: none; /* Скрити по подразбиране */
}

.info-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10000;
    background-color: #ff0000;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
text-align: left;
    display: inline-flex;       /* Прави бутона флекс контейнер */
    align-items: center;        /* Центрира картинката и текста вертикално (може и 'flex-start' за подравняване отгоре) */
    white-space: normal;        /* Позволява на текста да се пренася на нов ред */
    display: none; /* Скрит по подразбиране, докато няма линк */
}

.fs-italic {
    font-style: italic;
}

.status-memo {
    position: relative;
    left: 5px;
    width: 500px;
    height: 150px;
    box-sizing: border-box;
    resize: none;
    overflow-y: auto;
    overflow-x: auto;
    font-family: monospace;
    font-size: 13px;
}

.mobile-tooltip {
    position: absolute;
    bottom: 110%; /* Позиционира го точно над бутона */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.85); /* Тъмен полупрозрачен фон */
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap; /* Държи текста на един ред, освен ако не е прекалено дълъг */
    z-index: 9999;
    pointer-events: none; /* Пречи на балончето да блокира кликанията върху бутона */
    transition: opacity 0.3s ease; /* Плавно изчезване */
    opacity: 1;
    box-shadow: 0px 2px 5px rgba(0,0,0,0.3);
}
/* Малка стрелкичка сочеща надолу към бутона */
.mobile-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
}

.volume-container {
    position: absolute;
    left: 5px;
    top: 5px;
    width: 35px;
    height: 35px;
    z-index: 10002;
}

.volume-slider {  
    position: absolute;
    bottom: 45px; 
    left: -32px;
    width: 100px;
    transform: rotate(-90deg); 
    display: none; 
    z-index: 10003;
}

.volume-container:hover .volume-slider {
    display: block;         
}

.subs-container {
    position: static;
    // left: 40px;
    top: 35px;
    width: 35px;
    height: 35px;
    z-index: 10002;
}

.subs-slider {  
    position: relative;
    bottom: 55px; 
    left: -10px; // -32px;
    width: 100px;
    transform: rotate(-90deg); 
    display: none; 
    z-index: 10003;
}

.subs-container:hover .subs-slider {
    display: block;         
}

#playerVideo .cpanel1 {
    transition: opacity 0.5s ease-in-out !important;
    opacity: 1 !important;
    z-index: 2147483647;
}

#playerVideo .cpanel1.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

#playerVideo {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

#playerVideo iframe {
    width: 100%;
    height: 100%;
    border: 2;
}

#playerVideo::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 80px; /* Покрива зоната на бутона */
    height: 60px;
    background: transparent;
    z-index: 10;
}

#playerSubtitle {
    position: absolute;
    left: 5%;
    right: 5%;
    bottom: 8%;
    color: white;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    text-shadow:
        2px 2px 3px black,
        -2px -2px 3px black;
    pointer-events: none;
}

#playerClose {
    position: absolute;
    right: 5px;
    top: 5px;
    z-index: 10001;
    font-size: 20px;
}

#videoContainer {
    position: relative;
    width: 700px;
 height: 360px;         // new
}
.videoContainer::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 80px; /* Покрива зоната на бутона */
    height: 60px;
    background: transparent;
    z-index: 10;
}


#ytplayer {
    display: block;
    width: 100%;
    height: 394px;
}

#mySubtitles {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 40px;

    text-align: center;

    color: white;
    font-size: 22px;
    font-weight: bold;

    text-shadow:
        2px 2px 3px black,
       -2px -2px 3px black,
        2px -2px 3px black,
       -2px 2px 3px black;

    pointer-events: none;
}

 .fa-checkbox {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
  }

  /* По подразбиране (докато не се потвърди Font Awesome) крием иконите и оставяме стандартния checkbox видим като резервен вариант */
  .fa-checkbox .icon-on,
  .fa-checkbox .icon-off {
    display: none;
  }

  /* Когато JS потвърди, че Font Awesome работи, добавяме клас .fa-ready на body */
  body.fa-ready .fa-checkbox input[type="checkbox"] {
    display: none;
  }

  body.fa-ready .fa-checkbox .icon-off {
    display: inline-block;
    color: #888;
  }

  body.fa-ready .fa-checkbox input[type="checkbox"]:checked ~ .icon-on {
    display: inline-block;
    color: #28a745;
  }

  body.fa-ready .fa-checkbox input[type="checkbox"]:checked ~ .icon-off {
    display: none;
  }

.fa-radio {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 12px;
}

/* По подразбиране крием иконите, за да се вижда стандартният radio като fallback */
.fa-radio .icon-on,
.fa-radio .icon-off {
  display: none;
}

/* Когато Font Awesome е зареден (body има клас .fa-ready) */
body.fa-ready input[type="radio"].fa-radio-input {
  display: none;
}

body.fa-ready input[type="radio"].fa-radio-input + .fa-radio .icon-off {
  display: inline-block;
  color: #888;
}

/* Когато конкретният радио бутон е избран (:checked) */
body.fa-ready input[type="radio"].fa-radio-input:checked + .fa-radio .icon-on {
  display: inline-block;
}

body.fa-ready input[type="radio"].fa-radio-input:checked + .fa-radio .icon-off {
  display: none;
}

/* Може да оцветите всеки бутон в съответния му цвят (R, G, B) */
#isred:checked + .fa-radio .icon-on { color: #dc3545; }
#isgreen:checked + .fa-radio .icon-on { color: #28a745; }
#isblue:checked + .fa-radio .icon-on { color: #007bff; }
