/* style.css */
/* Main styles for the application */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: #f5f6f7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
}

h1 {
  font-size: 24px;
  margin-top: 0;
}

h2 {
  font-size: 20px;
  margin-top: 0;
}

header {
  background-color: #2D3142;
  color: white;
  padding: 16px;
  text-align: center;
}

header .subtitle {
  font-size: 14px;
  margin-bottom: 0;
}

main {
  padding: 16px;
}

footer {
  background-color: #2D3142;
  color: white;
  padding: 10px 16px;
  font-size: 14px;
  text-align: center;
}

/* Four Column Layout */
.four-column-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 0.8fr 0.8fr;
  gap: 16px;
  height: 100%;
}

/* Side Panels */
.left-panel, .center-right-panel, .right-panel {
  background-color: white;
}

/* Center Column */
.center-column {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Controls */
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.primary-controls {
  justify-content: space-between;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s ease-in-out;
}

.btn-primary {
  background-color: #FF3E8A;
  color: white;
}

.btn-primary:hover {
  background-color: #e02e72;
}

.btn-primary:disabled {
  background-color: #ffb0cf;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: #00A9E0;
  color: white;
}

.btn-secondary:hover {
  background-color: #0088b3;
}

.btn-secondary:disabled {
  background-color: #a8e0f7;
  cursor: not-allowed;
}

.btn-info {
  background-color: #57CC99;
  color: white;
}

.btn-info:hover {
  background-color: #46b080;
}

/* SVG Container */
.visualization-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.svg-container {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* Select dropdown */
.select-wrapper {
  position: relative;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 8px 32px 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: white;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  cursor: pointer;
  min-width: 180px;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #333;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Responsive styles */
@media (max-width: 1279px) {
  .four-column-layout {
    grid-template-columns: 0.7fr 1.3fr 1fr;
  }
  
  .right-panel {
    display: none;
  }
}

@media (max-width: 1023px) {
  .four-column-layout {
    grid-template-columns: 0.8fr 1.2fr;
  }
  
  .center-right-panel {
    display: none;
  }
}

@media (max-width: 767px) {
  .four-column-layout {
    grid-template-columns: 1fr;
  }
  
  .left-panel, .center-right-panel, .right-panel {
    position: fixed;
    left: 0;
    top: 0;
    width: 80%;
    height: 100%;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
  }
  
  .side-panel.mobile-active {
    transform: translateX(0);
  }
  
  .mobile-panel-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
  }
  
  .btn-mobile-toggle {
    padding: 8px 12px;
    background-color: #2D3142;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
  }
  
  header h1 {
    font-size: 20px;
  }
  
  header .subtitle {
    font-size: 12px;
  }
  
  .primary-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .mobile-panel-controls {
    display: none;
  }
}