/* Section title behavior is defined in active.css; keep defaults here */
/* Remove local overrides that centered and added chevrons */
/* Collapsed state animation and default expanded state */
.track-messages-section,
.wind-graphics-section,
.wind-probability-section,
.surge-rain-section {
  transition: opacity 0.3s ease-in-out;
  opacity: 1;
}

/* Time tabs - Grid layout to eliminate empty space */
.graphics-tabs.time-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.graphics-tab.time-tab {
  font-size: clamp(0.8rem, 2.5vw, 1.1rem);
  padding: 0.4rem 0.6rem;
  box-sizing: border-box;
  margin-bottom: 0;
  white-space: nowrap;
  text-align: center;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
}

.graphics-tab.time-tab:hover {
  background: var(--color-accent);
}

.graphics-tab.time-tab.active {
  background: #007bff;
  color: white;
}

/* Keeping this as it might be used in tab content */
.graphic-item h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  color: #333;
  font-weight: 600;
}

.graphic-container {
  position: relative;
  /* background: #fff; */
  /* min-height: 550px; */
  border-radius: 4px;
  padding: 5px 0 0 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Tabs for Wind Probability */
.graphics-tabs {
  width: 100%;
}

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0.5rem;
}

.tab-button {
  padding: 0.5rem 1rem;
  background-color: var(--color-background);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.85rem;
  font-weight: 500;
}

.tab-button:hover {
  background: #e8e8e8;
}

.tab-button.active {
  background: #007bff;
  color: white;
}

.tab-content {
  position: relative;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s;
}

/* Action Button */
.action-button-container {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.action-button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s;
}

.action-button:hover {
  background: linear-gradient(135deg, #0056b3, #003d82);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* --- Graphics Tabbed Interface Styles (moved from active.css) --- */

/* Interface container */
.graphics-interface {
  overflow: hidden;
}

/* Tab navigation */
.graphics-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  border-bottom: 2px solid var(--color-primary);
  margin: 0;
  padding: 0;
  gap: 0;  
}

/* Individual tabs */
.graphics-tab {
  border: none;
  color: var(--color-text-light);
  cursor: pointer;
  font-family: var(--font-active);
  font-size: clamp(0.8rem, 2.5vw, 1.1rem);
  font-weight: 800;
  padding: 12px 8px;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  border-bottom: 2px solid var(--color-primary); /* Added */
}

.graphics-tab:hover {
  background-color: var(--color-accent);
  color: var(--color-text);
  font-weight: bold;
}

/* .graphics-tab:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
  z-index: 1;
} */

.graphics-tab.active {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  font-weight: bold;
  border-bottom: 3px solid var(--color-accent); /* Yellow accent border when active */
}

/* Remove the old underline effect for active tab */
.graphics-tab.active::after {
  content: none;
}

/* Content container */
.graphics-content-container {
  position: relative;
  padding-bottom: 2em;
}

.graphics-content-panel {
  height: 100%;
  display: none; /* Hide all panels by default */
}

.graphics-content-panel.active {
  display: block; /* Show only the active panel */
}

/* Add section-specific class for wind probability hour tabs */
.wind-probability-time-tab {
  width: 100%;
  box-sizing: border-box;
  justify-self: stretch;
  min-width: 0;
  max-width: 100%;
}

/* Responsive styles for storm graphic images */
.storm-graphic-img {
  width: 100%;
  max-width: 520px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto; /* Center the image */
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Extra small mobile screens */
@media (max-width: 360px) {
  .graphics-tabs {
    grid-template-columns: 1fr;
  }
  .graphics-tab {
    padding: 10px 8px;
    font-size: 0.8em;
  }
}

@media (max-width: 600px) {
  .graphics-tab.time-tab {
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .graphics-tabs:not(.time-tabs) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 0.25rem;
  }

  .graphics-tab:not(.time-tab) {
    font-size: 0.7rem;
    padding: 0.4rem 0.7rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
    white-space: nowrap;
  }

  .graphics-tabs.category-tabs {
    display: flex;
    flex-wrap: nowrap;
  }

  .graphics-tab.category-tab {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    font-size: 0.7rem;
    padding: 0.4rem 0.7rem;
    box-sizing: border-box;
    margin-bottom: 0;
    white-space: nowrap;
  }

  .tab-buttons {
    justify-content: center;
  }

  .tab-button {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    justify-content: center;
    transition: all 0.3s;
  }

  /* Two-row layout for graphics-tabs except time-tabs and category-tabs */
  .graphics-tabs:not(.time-tabs):not(.category-tabs):not(.radii-hour-controls):not(.radii-controls) {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
  }

  .graphics-tabs:not(.time-tabs):not(.category-tabs):not(.radii-hour-controls):not(.radii-controls) .graphics-tab {
    width: 50%;
    box-sizing: border-box;
  }

  .graphics-tab:not(.time-tab):not(.category-tab) {
    width: 50%;
    font-size: 0.85rem;
    padding: 0.4rem 0.7rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
    white-space: nowrap;
  }

  /* Two-row (stacked) layout for time-tabs: each tab is full width, stacked vertically */
  /* Force time-tabs to 2 rows and 6 columns on mobile, center last row's content */
  .graphics-tabs.time-tabs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 1fr;
    gap: 0;
    place-items: stretch stretch;
  }

  .graphics-tab.time-tab {
    width: 100%;
    box-sizing: border-box;
    justify-self: center;
  }

  .action-button:hover {
    background: linear-gradient(135deg, #0056b3, #003d82);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  .wind-probability-time-tab {
    width: 100%;
    box-sizing: border-box;
    justify-self: stretch;
    min-width: 0;
    max-width: 100%;
  }
}
