/**
 * Lore Site Companion Widget Styles
 * 
 * Floating navigation widget for quick access to visited Lore sites
 */

.lore-companion-widget {
  position: fixed;
  bottom: 20px;
  left: 20px; /* Changed from right to left to match radio widget */
  z-index: 9998; /* Lower than social share (9999) to avoid blocking it */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: none !important; /* Hidden - functionality preserved but UI removed */
  visibility: hidden !important;
}

/* Toggle Button Removed - widget is now accessed via companion overlay menu */

.companion-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.companion-icon {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Panel */
.lore-companion-panel {
  position: absolute;
  bottom: 80px;
  left: 0; /* Changed from right: 0 to left: 0 to match radio widget */
  width: 320px;
  max-height: 500px;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(22, 33, 62, 0.98) 100%);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lore-companion-widget.open .lore-companion-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Header */
.companion-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(102, 126, 234, 0.1);
}

.companion-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: white;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.companion-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.companion-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Content */
.companion-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  max-height: 350px;
}

.companion-content::-webkit-scrollbar {
  width: 6px;
}

.companion-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.companion-content::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.5);
  border-radius: 3px;
}

.companion-content::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.7);
}

/* Visited Sites List */
.visited-sites-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-message {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  padding: 30px 20px;
  margin: 0;
}

.visited-site-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  text-decoration: none;
  color: white;
  transition: all 0.2s;
  cursor: pointer;
}

.visited-site-item:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.4);
  transform: translateX(-4px);
}

.site-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.site-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.site-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.site-arrow {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.2s;
  flex-shrink: 0;
}

.visited-site-item:hover .site-arrow {
  color: white;
  transform: translateX(4px);
}

/* Footer */
.companion-footer {
  padding: 15px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.companion-link {
  display: block;
  text-align: center;
  padding: 10px;
  background: rgba(102, 126, 234, 0.2);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.companion-link:hover {
  background: rgba(102, 126, 234, 0.3);
  border-color: rgba(102, 126, 234, 0.5);
}

/* Mobile */
@media (max-width: 768px) {
  .lore-companion-widget {
    bottom: 15px;
    right: 15px;
  }
  
  .lore-companion-panel {
    width: calc(100vw - 30px);
    max-width: 320px;
    bottom: 75px;
  }
  
  /* Toggle Button Removed - widget is now accessed via companion overlay menu */
}

