/* svg-viewer.css - Styles for Interactive SVG Viewer */

/* Base styles */
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: white;
}

/* Main container */
#container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* SVG display area */
#svg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
}

#svg-container.dragging {
  cursor: grabbing;
}

#svg-display {
  max-width: 100%;
  max-height: 100%;
  transform-origin: 0 0;
}

/* Dashboard header */
.dashboard-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 2rem;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logo a {
  display: block;
  margin: 0 auto;
}

.logo img {
  width: 100px;
  scale: 2;
  display: block;
  margin: 0 auto;
}

/* Controls panel */
#controls {
  position: absolute;
  top: 40px;
  left: 15px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: white;
}

/* Buttons */
button {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 8px 16px;
  margin: 0 8px 8px 0;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

button:active {
  transform: translateY(0);
}

button:focus {
  outline: 2px solid rgba(102, 126, 234, 0.5);
  outline-offset: 2px;
}

/* File input */
#file-input {
  display: none;
}

.file-input-label {
  display: inline-block;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  border: none;
  padding: 8px 16px;
  margin: 0 8px 8px 0;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.file-input-label:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.file-input-label:active {
  transform: translateY(0);
}

.file-input-label:focus {
  outline: 2px solid rgba(76, 175, 80, 0.5);
  outline-offset: 2px;
}

/* Status display */
#status {
  margin-top: 15px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
  .dashboard-header {
    padding: 0.5rem 1rem;
  }
  
  .logo {
    font-size: 1.4rem;
  }
  
  .logo img {
    width: 80px;
    scale: 1.5;
  }
  
  #controls {
    top: 20px;
    left: 10px;
    right: 10px;
    padding: 8px;
  }
  
  button, .file-input-label {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin: 0 4px 4px 0;
  }
  
  #status {
    font-size: 0.75rem;
    padding: 6px 10px;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  #controls {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin: 0;
  }
  
  .logo img {
    width: 60px;
    scale: 1.2;
  }
  
  button, .file-input-label {
    display: block;
    width: 100%;
    margin: 0 0 8px 0;
    text-align: center;
  }
}

/* Loading animation */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.loading {
  animation: pulse 2s infinite;
}

/* SVG specific styles */
svg {
  max-width: 100%;
  max-height: 100%;
  user-select: none;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  button, .file-input-label {
    transition: none;
  }
  
  button:hover, .file-input-label:hover {
    transform: none;
  }
  
  .loading {
    animation: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  #controls {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid white;
  }
  
  button {
    background: #000;
    border: 1px solid white;
  }
  
  .file-input-label {
    background: #000;
    border: 1px solid white;
  }
}