/* ========================
   Events Container Styles
   ======================== */
/* NOTE: Base styles already in main.css */

#events-container-left,
#events-container-right {
  position: absolute;
  top: 10px;
  z-index: 1;
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  min-height: 60px;
  /* Debug: visible outline */
  /* border: 2px dashed rgba(255, 0, 0, 0.3); */
}

#events-container-left {
  left: 10px;
  min-width: 60px;
}

#events-container-right {
  right: 10px;
  min-width: 60px;
}

/* ========================
   Event Icon Wrapper
   ======================== */
/* NOTE: Base styles already in main.css, only additions here */

.event-icon-wrapper {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
  width: 60px;
  height: 60px;
  display: block;
}

.event-icon-wrapper:hover {
  transform: scale(1.08);
}

.event-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ========================
   Event Timer Badge
   ======================== */

.event-timer-badge {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  
  background: rgba(0, 0, 0, 0.85);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
  
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

/* Badge for upcoming events (not started yet) */
.event-timer-badge.upcoming {
  background: rgba(255, 152, 0, 0.9);  /* Orange for upcoming */
  color: white;
  box-shadow: 0 2px 6px rgba(255, 152, 0, 0.5);
}

/* Badge for active events (already started) */
.event-timer-badge.active {
  background: rgba(76, 175, 80, 0.9);  /* Green for active */
  color: white;
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.5);
}

/* Optional: Add animation for active events */
@keyframes pulse-active {
  0%, 100% {
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.5);
  }
  50% {
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.8);
  }
}

.event-timer-badge.active {
  animation: pulse-active 2s ease-in-out infinite;
}

/* ========================
   Responsive Design
   ======================== */

@media (max-width: 480px) {
  #events-container-left,
  #events-container-right {
    gap: 8px;
    padding: 4px;
  }
  
  .event-icon-wrapper {
    width: 50px;
    height: 50px;
  }
  
  .event-timer-badge {
    font-size: 10px;
    padding: 3px 6px;
    bottom: -20px;
  }
}

/* ========================
   Utility Classes
   ======================== */

/* Для скрытия события через jQuery hide() */
.event-icon-wrapper.d-none {
  display: none;
}

/* Для анимации появления события */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.event-icon-wrapper {
  animation: slideIn 0.3s ease-out;
}

/* ========================
   Dark Theme Support
   ======================== */

@media (prefers-color-scheme: dark) {
  .event-icon-img {
    border-color: rgba(255, 255, 255, 0.5);
  }
  
  .event-timer-badge {
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
}

/* ========================
   Accessibility
   ======================== */

.event-icon-wrapper:focus {
  outline: 2px solid #4CAF50;
  outline-offset: 2px;
  border-radius: 4px;
}

.event-icon-wrapper:focus-visible {
  outline: 2px solid #4CAF50;
  outline-offset: 2px;
}
