/* Android Bar – Часовник и Време */
#android-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #1a1a1a;
  color: white;
  padding: 10px;
  width: 100%;
  height: 50px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

/* Осигуряваме че menu-toggle в android-bar е достъпен */
#android-bar #menu-toggle {
  z-index: 99999;
}

/* Часовник в лявата част */
#current-time {
  font-size: 16px;
  font-weight: bold;
}

/* Контейнер за времето */
#weather-container {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Weather Status Round Class */
.weather-status {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1a1a1a;
  color: white;
  border-radius: 20%;
  padding: 10px;
  margin-top: 5px;
  position: relative;
  top: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .weather-status {
    padding: 8px;
    margin-top: 3px;
  }
}

/* ============================================
   HINT MESSAGES SYSTEM - Simplified Notifications
   ============================================ */

/* Контейнер за hint съобщения */
.hint-message-container {
  position: fixed;
  top: 70px; /* Под android-bar */
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: calc(100vw - 40px);
  z-index: 9999;
  pointer-events: none;
}

/* Основен стил за hint съобщение - като unlock-message */
.hint-message {
  background-color: #4caf50; /* Зелен по подразбиране като unlock-message */
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(-100px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
  position: relative;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  min-width: 250px;
  max-width: 400px;
}

/* Анимации за показване/скриване */
.hint-message.show {
  transform: translateY(0);
  opacity: 1;
}

.hint-message.hide {
  transform: translateY(-100px);
  opacity: 0;
}

/* Типове съобщения - прости цветове */
.hint-success {
  background-color: #4caf50; /* Зелен */
}

.hint-error {
  background-color: #f44336; /* Червен */
}

.hint-warning {
  background-color: #ff9800; /* Оранжев */
}

.hint-info {
  background-color: #2196f3; /* Син */
}

/* Изображение в съобщение */
.hint-image {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
}

.hint-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Съдържание на съобщение */
.hint-content {
  flex: 1;
  min-width: 0;
}

.hint-text {
  color: white;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

/* Бутон за затваряне */
.hint-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 2px;
  border-radius: 50%;
  font-size: 16px;
  opacity: 0.8;
  transition: all 0.2s ease;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}

.hint-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
  opacity: 1;
}

.hint-close:active {
  transform: scale(0.9);
}

/* Ефект при click */
.hint-message[style*="cursor: pointer"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Прости иконки в съобщенията */
.hint-success::before {
  content: "✓ ";
  font-weight: bold;
  margin-right: 5px;
}

.hint-error::before {
  content: "✕ ";
  font-weight: bold;
  margin-right: 5px;
}

.hint-warning::before {
  content: "⚠ ";
  font-weight: bold;
  margin-right: 5px;
}

.hint-info::before {
  content: "ℹ ";
  font-weight: bold;
  margin-right: 5px;
}

/* Mobile адаптация */
@media (max-width: 768px) {
  .hint-message-container {
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100vw - 20px);
  }
  
  .hint-message {
    padding: 10px 16px;
    font-size: 13px;
    min-width: 200px;
  }
  
  .hint-image {
    width: 20px;
    height: 20px;
  }
}

/* Икона за времето */
#weather-icon {
  font-size: 24px;
  color: #fdbc40;
}

/* Текстова информация за времето */
#weather-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 14px;
}

#weather-condition {
  font-weight: bold;
  font-size: 15px;
}

#weather-temp {
  font-size: 16px;
}

#weather-humidity {
  font-size: 10px;
  opacity: 0.7;
}

#wind_speed {
  font-size: 14px;
  opacity: 0.7;
}

/* Навигационно Меню Toggle */
#menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

#menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#menu-toggle:active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Осигуряваме че navbar-toggler е над всички други елементи */
.navbar-toggler {
  z-index: 99999 !important;
  position: relative !important;
}


/* Навигационно меню */
.nav-menu {
  display: none;
  position: fixed;
  top: 50px;
  right: 0;
  background: white;
  width: 200px;
  box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  z-index: 2000;
}

.nav-menu ul {
  list-style: none;
  padding: 10px;
}

.nav-menu li {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.nav-menu li:last-child {
  border-bottom: none;
}

.nav-menu a, .nav-menu button {
  text-decoration: none;
  color: #333;
  display: block;
  text-align: left;
  width: 100%;
}

.nav-menu button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

/* КРАЙ НА АНДРОЙД БАРА */


/* Live Stream Popup */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 320px;
  height: auto;
  max-height: 240px;
  background: transparent;
  border: none;
  overflow: hidden;
  box-shadow: none;
}

/* Контейнер за видео/изображение */
#live-camera-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Адаптивен размер на видеото/изображението */
#webrtc-video,
#live-stream-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* Адаптивност за мобилни устройства */
@media (max-width: 768px) {
  .modal {
      max-width: 380px; 
      max-height: auto;
  }
}
/* КРАЙ НА LIVE STREAM */

/* Премахнете padding-а от modal-body, за да не добавя допълнително пространство */
/* Контейнер за видеото (popup) */
.stream-container {
position: relative;
width: auto;   /* Задайте фиксирана ширина – например същата като миниатюрите */
height: auto;  /* Задайте фиксирана височина */
margin: 0 auto; /* Центрира контейнера хоризонтално */
background: #000; /* Черен фон за контраст */
}

.nav-item {
margin-right: 200px;
color:  #333;

}

.nav-link {
cursor: pointer;
}
.navbar  {
background-color: #f8f9fa;
padding: 10px 0;
}

/* Миниатюри камери */
#cameras-container .col-md-4 {
    display: flex;
    justify-content: center;
}

#cameras-container {
    position: relative;
    z-index: 1;
}

/* Main dashboard container */
.container {
    position: relative;
    z-index: 1;
}

.container.mt-4 {
    margin-top: 60px !important; /* Под android-bar */
}

/* Камери - основна мрежа */
.cameras-grid {
  display: grid;
  gap: 10px;
  justify-content: center;
  padding: 10px;
  position: relative;
  z-index: 1;
}

/* Миниатюри на камерите */
.camera-item {
  width: 100%;
  max-width: 320px; /* Ограничаваме максималната ширина */
  aspect-ratio: 16/9; /* Съотношение на кадъра */
  overflow: hidden;
}

.camera-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* За мобилни устройства: 1 колона */
@media (max-width: 768px) {
  .cameras-grid {
      grid-template-columns: 1fr;
  }
}

/* За таблети: 2 колони */
@media (min-width: 768px) and (max-width: 1024px) {
  .cameras-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}

/* За десктопи: 3 колони */
@media (min-width: 1024px) {
  .cameras-grid {
      grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================
   VERSION MANAGER & CHANGELOG MODAL
   ======================== */

.version-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.version-modal-content {
    background: linear-gradient(135deg, #2a2a3e 0%, #1e1e2e 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(101, 163, 13, 0.3);
    animation: slideInUp 0.4s ease;
}

.version-modal-header {
    padding: 5px 30px;
    background: linear-gradient(135deg, #65a30d 0%, #84cc16 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.version-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.version-modal-header h2 i {
    font-size: 1.3rem;
    color: #fbbf24;
}

.version-modal-close {
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding: 5px;
    border-radius: 50%;
    line-height: 1;
}

.version-modal-close:hover {
    opacity: 1;
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.1);
}

.version-modal-body {
    padding: 0;
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #65a30d #2a2a3e;
}

.version-modal-body::-webkit-scrollbar {
    width: 8px;
}

.version-modal-body::-webkit-scrollbar-track {
    background: #2a2a3e;
}

.version-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #65a30d, #84cc16);
    border-radius: 4px;
}

.version-loading {
    padding: 40px;
    text-align: center;
    color: #9ca3af;
}

.version-loading i {
    font-size: 2rem;
    color: #65a30d;
    margin-bottom: 15px;
}

.version-error {
    padding: 40px;
    text-align: center;
    color: #ef4444;
}

.version-error i {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Version Status Section */
.version-status {
    padding: 5px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.version-status.update-available {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 127, 0.1) 100%);
    border-left: 4px solid #ef4444;
}

.version-status.up-to-date {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(101, 163, 13, 0.1) 100%);
    border-left: 4px solid #22c55e;
}

.version-status i {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.version-status.update-available i {
    color: #ef4444;
    animation: pulse 2s infinite;
}

.version-status.up-to-date i {
    color: #22c55e;
}

.version-status-text h3 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 600;
}

.version-status-text p {
    margin: 0 0 5px 0;
    color: #d1d5db;
    font-size: 1rem;
}

.version-status-text small {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Changelog Content */
.changelog-content {
    padding: 0;
}

.version-entry {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

.version-entry:last-child {
    border-bottom: none;
}

.version-entry.latest {
    background: linear-gradient(135deg, rgba(101, 163, 13, 0.1) 0%, rgba(132, 204, 22, 0.1) 100%);
}

.version-entry.new {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 127, 0.1) 100%);
    border-left: 4px solid #ef4444;
}

.version-header {
    padding: 20px 30px 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.version-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #ffffff;
    font-weight: 600;
}

.release-date {
    background: rgba(101, 163, 13, 0.2);
    color: #84cc16;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(101, 163, 13, 0.3);
}

.new-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

.version-sections {
    padding: 0 30px 20px 30px;
}

.version-section {
    margin-bottom: 20px;
}

.version-section:last-child {
    margin-bottom: 0;
}

.version-section h4 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: #84cc16;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-section h4::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #84cc16;
    border-radius: 50%;
}

.version-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.version-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    color: #d1d5db;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.version-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 8px;
    border-radius: 8px;
}

.item-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.version-item.major .item-icon { color: #fbbf24; }
.version-item.fix .item-icon { color: #22c55e; }
.version-item.ui .item-icon { color: #a855f7; }
.version-item.mobile .item-icon { color: #3b82f6; }
.version-item.security .item-icon { color: #ef4444; }
.version-item.general .item-icon { color: #84cc16; }

.item-text {
    flex-grow: 1;
}

/* Modal Footer */
.version-modal-footer {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.version-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.version-btn-primary {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.version-btn-primary:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.version-btn-secondary {
    background: rgba(101, 163, 13, 0.2);
    color: #84cc16;
    border: 1px solid rgba(101, 163, 13, 0.3);
}

.version-btn-secondary:hover {
    background: rgba(101, 163, 13, 0.3);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(101, 163, 13, 0.2);
}

.version-btn:active {
    transform: translateY(0);
}

/* Animation for new version indicator */
#new-version-indicator {
    animation: fadeIn 0.5s ease;
}

#new-version-indicator.pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .version-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
        border-radius: 15px;
    }
    
    .version-modal-header {
        padding: 20px;
    }
    
    .version-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .version-status {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .version-header {
        padding: 15px 20px 10px 20px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .version-sections {
        padding: 0 20px 15px 20px;
    }
    
    .version-modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .version-btn {
        width: 100%;
    }
}

/* ============================================
   MULTI-USER CAMERA SYSTEM - Enhanced Styles
   ============================================ */

/* Camera thumbnail с loading states */
.camera-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0;
  transition: all 0.3s ease;
  background: #f5f5f5;
}

.camera-thumbnail:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Camera item wrapper */
.camera-item {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f5f5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.camera-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Loading indicator */
.camera-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #666;
  font-size: 24px;
  z-index: 2;
}

/* Status indicator */
.camera-status {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  z-index: 3;
}

.camera-status i {
  font-size: 12px;
  color: #ccc;
  transition: color 0.3s ease;
}

/* Active stream indicator */
.camera-status i.active {
  color: #4caf50;
  animation: pulse 2s infinite;
}

/* Error state */
.camera-status i.error {
  color: #f44336;
}

/* No cameras message */
.no-cameras-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #666;
  text-align: center;
}

.no-cameras-message p {
  margin-top: 16px;
  font-size: 16px;
}

/* Pulse animation за активни streams */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* Live stream modal optimizations */
#liveCameraModal {
  backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.8);
}

#liveCameraModal .modal-content {
  background: transparent;
  border: none;
  padding: 0;
}

/* Video player optimizations */
#webrtc-video {
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Mobile optimizations за camera system */
@media (max-width: 768px) {
  .camera-item {
    margin-bottom: 12px;
  }
  
  .camera-loading {
    font-size: 20px;
  }
  
  .camera-status {
    top: 6px;
    right: 6px;
  }
  
  #liveCameraModal {
    padding: 10px;
  }
  
  #webrtc-video {
    border-radius: 4px;
  }
}

/* Dark mode поддръжка за camera system */
@media (prefers-color-scheme: dark) {
  .camera-item {
    background: #2d2d2d;
  }
  
  .camera-thumbnail {
    background: #2d2d2d;
  }
  
  .camera-loading {
    color: #ccc;
  }
  
  .no-cameras-message {
    color: #ccc;
  }
}

/* High performance mode за много cameras */
.cameras-grid.performance-mode .camera-thumbnail {
  will-change: transform;
  transform: translateZ(0); /* Hardware acceleration */
}

.cameras-grid.performance-mode .camera-item:hover {
  transform: translateZ(0) scale(1.02);
}


/* Sticky Footer Menu */
.sticky-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }
  
  /* Контейнер за бутоните */
  .footer-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
  }
  
  /* Стилове за бутоните – без рамки и с подходящ размер на иконата */
  .footer-btn {
    background: none;
    border: none;
    outline: none;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s ease;
  }
  
  /* Базов цвят на иконите */
  .footer-btn i {
    color: #888;
  }

  .footer-btn:disabled i {
    color: #ccc;
  }
  
  /* Примерни стилове за активен бутон за отключване */
  .footer-btn.active i {
    color: #d9534f;  /* Червен цвят, ако вратата е "открита"/"отключена" */
  }
  
  /* Допълнителни стилове за останалите бутони (ако желаете) */
  #btn-info i {
    color: #007bff;
  }
  
  #btn-settings i {
    color: #5cb85c;
  }
  

/* Sticky Footer */
.sticky-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.footer-buttons {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
}

.footer-btn {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  transition: color 0.3s ease;
  width: 60px; /* Fixed width to prevent shifting */
  height: 50px; /* Fixed height */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.footer-btn:active {
  transform: scale(0.9);
}

.footer-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
  border-radius: 50%;
}

.footer-btn.disabled,
.footer-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}


.footer-btn i {
  /* Ensure icon animation doesn't affect flow */
  display: inline-block; 
}


/* Основен контейнер за настройките (скрит по подразбиране) */
.settings-container {
  position: fixed;
  top: 50%;
  left: -300px; /* Скрито в началото */
  transform: translateY(-50%);
  width: 250px;
  background: white;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 10px;
  transition: left 0.4s ease-in-out; /* Плавно показване */
  z-index: 1000;
}

/* Когато е активен, излиза плавно */
.settings-container.active {
  left: 0px;
}

/* Контейнер за опциите */
.settings-panel {
  display: flex;
  flex-direction: column;
}

/* Стил за всяка опция */
.setting-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s ease-in-out;
}

/* Иконите към настройките */
.setting-option .icon {
  font-size: 20px;
  color: #666;
  transition: color 0.3s ease-in-out;
}

/* Когато настройката е включена */
.setting-option input:checked + .icon {
  color: green;
}

/* Когато настройката е включена, фонът също се сменя */
.setting-option input:checked {
  background: rgba(0, 255, 0, 0.2);
  border-radius: 5px;
}

/* Popup модал за настройки */
.settings-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

/* Съдържание на модала */
.settings-content {
  background: white;
  width: 300px;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-in-out;
}

/* Бутон за затваряне */
.close {
  float: right;
  font-size: 24px;
  cursor: pointer;
}

/* Анимация */
@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(-10px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* Настройки меню - скрито по подразбиране */
.settings-menu {
  position: fixed;
  bottom: 60px; /* Над footer-а */
  right: 20px; /* Над иконата Settings */
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1000;
}

/* Стил за бутоните в настройките */
.settings-option {
  width: 50px;
  height: 50px;
  background-color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.2s;
}

/* Hover ефект */
.settings-option:hover {
  background-color: #ddd;
}

/* Активиран бутон (когато настройката е включена) */
.settings-option.active {
  background-color: green;
  color: white;
  transform: scale(1.1);
}


/* Стил за бутона за известия */
#notifications-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 24px;
  cursor: pointer;
  transition: color 0.3s ease;
}

#notifications-btn.active {
  color: #4caf50; /* Зелен цвят, когато известията са разрешени */
}

.mt-4, .my-4 {
  margin-top: 4rem !important;
}

/* LOGIN FROM */

/* Основен стил на страницата */
body.login-page {
  font-family: Arial, sans-serif;
  background: linear-gradient(to bottom, #9fd8f1, #7a81ff);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

/* Wrapper за цялата форма */
.login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 350px;
}

/* Лого */
/* .login-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 10px;
  background: url('/static/images/logo.svg') no-repeat center;
  background-size: contain;
} */

/* Контейнер за вход (формата е над табовете) */
.login-container {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 350px;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Form container - предотвратява разширяване */
/* .form-container {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  box-sizing: border-box;
} */

/* Form elements */
/* .form-container form {
  width: 100%;
  box-sizing: border-box;
} */

/* .form-container .hidden {
  display: none;
} */

/* Входни полета */
.input-group {
  display: flex;
  align-items: center;
  background: #f1f1f1;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  /* position: relative;
  width: 100%;
  box-sizing: border-box; */
}

.input-group i {
  margin-right: 10px;
  color: #7a81ff;
  /* flex-shrink: 0;
  width: 16px;
  text-align: center; */
}

.input-group input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  min-width: 0;
  font-size: 16px;
}

/* Подредба на "Запомни ме" */
.options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0;
  font-size: 14px;
}

.remember-me {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.remember-me input {
  width: 16px;
  height: 16px;
  margin-right: 5px;
}

.recovery-link {
  color: #7a81ff;
  text-decoration: none;
  font-size: 14px;
}

.recovery-link:hover {
  text-decoration: underline;
}

/* Language Selector */
.language-selector {
  text-align: center;
  margin-bottom: 20px;
}

.language-selector select {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  border-radius: 25px;
  padding: 8px 16px 8px 12px;
  font-size: 14px;
  color: #495057;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 35px;
  min-width: 120px;
}

.language-selector select:hover {
  border-color: #7a81ff;
  box-shadow: 0 0 0 2px rgba(122, 129, 255, 0.1);
}

.language-selector select:focus {
  border-color: #7a81ff;
  box-shadow: 0 0 0 3px rgba(122, 129, 255, 0.2);
}

.language-selector select option {
  padding: 8px 12px;
  background: white;
  color: #495057;
}

/* Language selector with flag icons */
.language-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-flag {
  font-size: 16px;
  margin-right: 5px;
}

/* Бутон */
.btn {
  background: #7a81ff;
  color: white;
  padding: 10px;
  border: none;
  width: 100%;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s ease;
}

.btn:hover {
  background: #5a67d8;
}

/* Табове под формата */
.tab-container {
  display: flex;
  width: 100%;
  background: #f1f1f1;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  position: absolute;
  bottom: -40px; /* Леко припокриване на формата */
  left: 0;
  z-index: 1;
}

/* Всеки бутон в табовете */
.tab-button {
  flex: 1;
  padding: 12px;
  border: none;
  background: #ddd;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease, transform 0.2s ease-in-out;
  text-align: center;
  font-weight: bold;
  color: #333;
  border-bottom: 2px solid transparent;
}

/* Активният таб */
.tab-button.active {
  background: #007bff;
  color: white;
  border-bottom: 3px solid #0056b3;
}

/* Скриване на неактивната форма */
.hidden {
  display: none;
}

.error-message {
  background: #ffdddd;
  color: #d8000c;
  border: 1px solid #d8000c;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
  text-align: center;
}




/* .btn {
  background: #7a81ff;
  color: white;
  padding: 10px;
  border: none;
  width: 100%;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
}

.btn:hover {
  background: #5a67d8;
} */

@media (max-width: 500px) {
  .login-container {
      width: 70%;
      padding: 20px;
  }
}


/* Logbook Popup */
.logbook-modal {
  display: none; /* Скрити по подразбиране */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.logbook-content {
  background-color: white;
  padding: 20px;
  width: 80%;
  max-width: 500px;
  text-align: left;
  border-radius: 8px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.logbook-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
  background-color: transparent;
}

.logbook-content .close:hover {
  color: red;
}

/* Live Stream Popup */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 600px;
  height: auto;
  max-height: 100%;
  background: transparent;
  border: none;
  overflow: hidden;
  box-shadow: none;
}

.modal-content {
  padding: 0;
  text-align: center;
  width: 100%;
  height: auto;
}

/* Адаптивност за мобилни устройства */
#live-stream-frame {
  width: 100%;
  height: 90vh;
  max-width: 100%;
  max-height: 90vh;
  object-fit: cover;
  border: none;
}

/* .close {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.close:hover {
  color: red;
} */


.unlock-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
}


.progress-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 5px solid rgba(0, 0, 0, 0.1);
  overflow: hidden;
  pointer-events: none; /* Prevent touch events */
  z-index: 2000;
}

.progress-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 5px solid #4caf50;
  border-top-color: transparent;
  animation: progress 2s linear forwards;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  width: 100%;
  text-align: center;
  font-size: 1rem;

}

@keyframes progress {
  from {
      transform: rotate(0deg);
  }
  to {
      transform: rotate(360deg);
  }
}

/* Subscribe Page Diagram */
.service-diagram {
  position: relative;
  width: 300px;
  height: 300px;
  margin-bottom: 20px;
}

.center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #fff;
  font-weight: bold;
}

.service-step {
  position: absolute;
  width: 120px;
  text-align: center;
  color: #fff;
}

.step1 {
  top: -50px;
  left: 50%;
  transform: translate(-50%, 0);
}

.step2 {
  top: 60%;
  left: 120%;
  transform: translate(-100%, -50%);
}

.step3 {
  top: 60%;
  left: -50px;
  transform: translate(0, -50%);
}

.service-step i {
  font-size: 24px;
  margin-bottom: 5px;
}

.back-to-login {
  display: block;
  margin-top: 10px;
  color: #007bff;
  text-decoration: underline;
}

.signup-link {
  margin-top: 15px;
  text-align: center;
  color: #007bff;
}

.signup-link a {
  color: #007bff;
  text-decoration: underline;
}

 /* Example CSS for the new version indicator                                                                                                                                                 
      .new-version-indicator {                                                                                                                                                                        
         display: inline-block;                                                                                                                                                                      
         width: 8px;                                                                                                                                                                                 
         height: 8px;                                                                                                                                                                                
         background-color: red;                                                                                                                                                                      
        border-radius: 50%;                                                                                                                                                                         
         margin-left: 5px;                                                                                                                                                                           
         vertical-align: middle;
          font-size: 0.8em;
          color: white; 

          width: 12px;
          height: 12px;

  } */

  .app-version {
    display: inline-block;
    font-size: 0.5em;
    color: #555;
    margin-left: 5px;
    position: relative;
  }

  /* i class */
  .new-version-indicator i {
      font-size: 0.8em; /* Adjust size as needed */
      color: rgb(255, 0, 0); /* Change text color if needed */
  }

  /* Svg icon  */
  .fas fa-tint {
    width: 12px;
    height: 12px;
  }

/* ========================================
   WEBPORTAL IN-PAGE NOTIFICATIONS
   ======================================== */

/* Notification Container */
#webportal-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 350px;
    pointer-events: none; /* Allow clicking through container */
}

/* Individual Notification */
.webportal-notification {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 10px;
    padding: 16px;
    border-left: 4px solid #2196f3;
    pointer-events: auto; /* Re-enable clicks on notifications */
    animation: slideInRight 0.3s ease-out;
    transition: all 0.3s ease;
}

.webportal-notification:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Notification Types */
.notification-success {
    border-left-color: #4caf50;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
}

.notification-error {
    border-left-color: #f44336;
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.notification-warning {
    border-left-color: #ff9800;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.notification-info {
    border-left-color: #2196f3;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
}

/* Notification Content */
.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
    min-width: 0; /* Allow text to shrink */
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.notification-body {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    background-color: rgba(255,255,255,0.2);
}



/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #webportal-notification-container {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .webportal-notification {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .notification-content {
        gap: 8px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-body {
        font-size: 12px;
    }
    
    .notification-image {
        width: 32px;
        height: 32px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .webportal-notification {
        background: #2d2d2d;
        color: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    
    .notification-close:hover {
        background-color: rgba(255,255,255,0.1);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .webportal-notification {
        border: 2px solid;
    }
    
    .notification-success { border-color: #4caf50; }
    .notification-error { border-color: #f44336; }
    .notification-warning { border-color: #ff9800; }
    .notification-info { border-color: #2196f3; }
}

/* Mobile-specific rules for navbar-toggler */
/* @media (max-width: 768px) {
    #menu-toggle,
    .navbar-toggler {
        z-index: 99999 !important;
        position: relative !important;
        min-width: 48px !important;
        min-height: 48px !important;
        padding: 8px !important;
        margin-left: inherit !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
    }
    
} */

@media (max-width: 480px) {
    #menu-toggle,
    .navbar-toggler {
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 20px !important;
    }
}


