/* Offline Mode Indicator Styles */
.offline-mode-indicator {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--background-secondary, #f8f9fa);
  border-radius: 8px;
  border: 1px solid var(--border-color, #e9ecef);
  font-size: 14px;
  color: var(--text-primary, #212529);
  transition: all 0.3s ease;
}

/* Orb Mode - Minimal indicator */
.offline-mode-indicator.orb {
  padding: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
}

.connection-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.connection-orb.connection-excellent {
  background: #28a745;
  box-shadow: 0 0 6px rgba(40, 167, 69, 0.4);
}

.connection-orb.connection-good {
  background: #ffc107;
  box-shadow: 0 0 6px rgba(255, 193, 7, 0.4);
}

.connection-orb.connection-poor {
  background: #fd7e14;
  box-shadow: 0 0 6px rgba(255, 133, 27, 0.4);
}

.connection-orb.connection-offline {
  background: #dc3545;
  box-shadow: 0 0 6px rgba(220, 53, 69, 0.4);
}

/* Refresh ring animation for orb */
.refresh-ring {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid transparent;
  border-top: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Hover effect for orb */
.connection-orb:hover {
  transform: scale(1.2);
}

/* Connection Status */
.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.connection-excellent {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.connection-good {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.2);
}

.connection-poor {
  background: rgba(255, 133, 27, 0.1);
  color: #fd7e14;
  border: 1px solid rgba(255, 133, 27, 0.2);
}

.connection-offline {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.connection-icon {
  font-size: 16px;
  filter: grayscale(0.2);
}

.connection-text {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Cache Status */
.cache-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cache-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(108, 117, 125, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(108, 117, 125, 0.2);
}

.cache-icon {
  font-size: 16px;
}

.cache-text {
  font-weight: 500;
  color: var(--text-primary, #495057);
}

.cache-size {
  font-size: 12px;
  color: var(--text-secondary, #6c757d);
  font-weight: 400;
}

/* Offline Availability */
.offline-availability {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(23, 162, 184, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(23, 162, 184, 0.2);
  color: #17a2b8;
}

.offline-icon {
  font-size: 16px;
}

.offline-text {
  font-weight: 500;
}

/* Cache Refresh Progress */
.cache-refresh-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: rgba(0, 123, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(0, 123, 255, 0.2);
}

.refresh-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.refresh-icon {
  font-size: 16px;
  animation: spin 1s linear infinite;
}

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

.refresh-text {
  font-weight: 500;
  color: #007bff;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 123, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #007bff, #0056b3);
  border-radius: 3px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Progress Details */
.progress-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.progress-text {
  color: var(--text-secondary, #6c757d);
}

.progress-percentage {
  font-weight: 600;
  color: #007bff;
}

/* Cache Refresh Complete */
.cache-refresh-complete {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(40, 167, 69, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(40, 167, 69, 0.2);
  color: #28a745;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.complete-icon {
  font-size: 16px;
}

.complete-text {
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .offline-mode-indicator {
    padding: 10px;
    font-size: 13px;
  }
  
  .connection-status,
  .cache-info,
  .offline-availability {
    padding: 5px 8px;
  }
  
  .cache-refresh-progress {
    padding: 8px;
  }
  
  .progress-details {
    font-size: 11px;
  }
}

/* Compact Mode */
.offline-mode-indicator.compact {
  flex-direction: row;
  align-items: center;
  padding: 8px 12px;
  gap: 12px;
}

.offline-mode-indicator.compact .cache-status {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.offline-mode-indicator.compact .cache-refresh-progress {
  flex-direction: row;
  align-items: center;
  padding: 6px 10px;
  gap: 10px;
}

.offline-mode-indicator.compact .progress-bar {
  width: 80px;
  height: 4px;
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
  .offline-mode-indicator {
    background: var(--background-secondary-dark, #2d3748);
    border-color: var(--border-color-dark, #4a5568);
    color: var(--text-primary-dark, #e2e8f0);
  }
  
  .cache-info {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .cache-text {
    color: var(--text-primary-dark, #e2e8f0);
  }
  
  .cache-size {
    color: var(--text-secondary-dark, #a0aec0);
  }
}

/* Animation for state changes */
.offline-mode-indicator * {
  transition: all 0.3s ease;
}

/* Hover effects for interactive elements */
.offline-mode-indicator:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Focus states for accessibility */
.offline-mode-indicator:focus-within {
  outline: 2px solid var(--focus-color, #007bff);
  outline-offset: 2px;
}