/* Hydra Status Island CSS Module */

.wrapper {
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
  min-width: 300px;
}

.wrapper:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #d1d9e0;
}

.wrapper.hydratedEffect {
  border-color: #17a2b8;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.statusHeader {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e9ecef;
}

.statusIcon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  color: white;
}

.statusIcon.active {
  background: #28a745;
}

.statusIcon.inactive {
  background: #6c757d;
}

.statusIcon.error {
  background: #dc3545;
}

.statusTitle {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
}

.statusGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.statusItem {
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  text-align: center;
}

.statusLabel {
  display: block;
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.statusValue {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
}

.statusValue.active {
  color: #28a745;
}

.statusValue.warning {
  color: #ffc107;
}

.statusValue.error {
  color: #dc3545;
}

.systemsList {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e9ecef;
}

.systemsTitle {
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
}

.systemItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f1f3f4;
}

.systemItem:last-child {
  border-bottom: none;
}

.systemName {
  font-size: 0.85rem;
  color: #495057;
}

.systemStatus {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

.systemStatus.running {
  background: #d4edda;
  color: #155724;
}

.systemStatus.stopped {
  background: #f8d7da;
  color: #721c24;
}

.systemStatus.paused {
  background: #fff3cd;
  color: #856404;
}

.refreshButton {
  background: #17a2b8;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s ease-in-out;
  margin-top: 12px;
  width: 100%;
}

.refreshButton:hover:not(:disabled) {
  background: #138496;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.refreshButton:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Loading state styles */
.wrapper.loading {
  opacity: 0.7;
  background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%, transparent 75%, #f8f9fa 75%, #f8f9fa),
              linear-gradient(45deg, #f8f9fa 25%, transparent 25%, transparent 75%, #f8f9fa 75%, #f8f9fa);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  animation: shimmer 1s linear infinite;
}

.wrapper.loading .refreshButton {
  pointer-events: none;
  opacity: 0.5;
}

@keyframes shimmer {
  0% { background-position: 0 0, 10px 10px; }
  100% { background-position: 20px 20px, 30px 30px; }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  .wrapper {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
  }

  .statusTitle {
    color: #f7fafc;
  }

  .statusItem {
    background: #1a202c;
    border-color: #4a5568;
  }

  .statusValue {
    color: #e2e8f0;
  }

  .systemName {
    color: #e2e8f0;
  }
}

/* Responsive design */
@media (max-width: 480px) {
  .wrapper {
    padding: 15px;
    min-width: 260px;
  }

  .statusGrid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
