/* General */
body {
  background-color: #333;
  color: #ccc;
  font-family: sans-serif;
  text-align: center;
}
svg {
  color: #555;
  background-color: #181c20;
  margin: .5em;
  max-width: 100%;
  height: auto;
}

/* Location bar */
#location-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75em;
  margin: 0.5em 0;
}
#location-bar h1 {
  margin: 0.5em 0;
}


/* Responsive SVG container */
.svg-container {
  width: 100%;
  max-width: 950px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  svg {
    margin: 0.25em;
  }
  
  .svg-container {
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  svg {
    margin: 0.1em;
  }
  
  .svg-container {
    padding: 0 5px;
  }
}

/* Dog icon */
#dog_icon {
  display:none;
}

/* Axes */
.y-axis-label {
  font-size: 12px;
  font-weight: bold;
  fill: #ddd;
}
.grid {
  color: #444;
}

/* Options Drawer */
#options-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 350px;
  height: 100vh;
  background-color: rgba(24, 28, 32, 0.95);
  backdrop-filter: blur(12px);
  border-left: 1px solid #444;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
  overflow: hidden;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  #options-drawer {
    width: 80%;
    height: 100%;
    border-left: none;
    border-top: 1pt solid #444;
  }
}

@media (max-width: 480px) {
  #options-drawer {
    width: 95%;
    height: 100%;
  }
  
  #drawer-content {
    padding: 2em;
  }
  
  #drawer-header h3 {
    font-size: 2.5rem;
  }
  
  #changelog-list li {
    padding: 2em;
    padding-top: 2.5em;
  }
  
  .changelog-message {
    line-height: 1.6;
  }
  
  .changelog-date {
    font-size: 1.4rem;
  }
  
  .notice {
    padding: 1.5em;
    font-size: 1.8rem;
  }
  
  .notice-message {
    line-height: 1.7;
  }
  
  .notice-date {
    font-size: 1.4rem;
  }
  
  #drawer-footer p {
    font-size: 1.5rem;
  }
  
  #updated-info-drawer {
    font-size: 1.5rem;
  }
  
  #drawer-locations-section h4 {
    font-size: 1.5rem;
  }
  
  .location-btn {
    font-size: 1.6rem;
    padding: 1em 1.2em;
  }
}

#options-drawer:not(.collapsed) {
  transform: translateX(0);
}

#drawer-content {
  padding: 1.8em;
  height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1pt solid #555;
  margin-bottom: 1em;
}

#drawer-header h3 {
  margin: 0;
  color: #ccc;
}

#drawer-close {
  font-size: 3em;
  cursor: pointer;
  color: #999;
  line-height: 1;
}

#drawer-close:hover {
  color: #ccc;
}

/* Locations Selection inside Drawer */
#drawer-locations-section {
  margin-bottom: 2em;
  text-align: left;
  border-bottom: 1pt solid #444;
  padding-bottom: 1.5em;
}

#drawer-locations-section h4 {
  margin: 0 0 0.75em 0;
  color: #aaa;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#drawer-locations-list {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.location-btn {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.7em 0.9em;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  text-align: left;
}

.location-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #888;
  color: white;
}

.location-btn:focus {
  outline: none;
  border-color: #fc0;
}

.location-btn.active {
  background-color: rgba(115, 191, 105, 0.15);
  border-color: #73bf69;
  color: #73bf69;
  font-weight: bold;
}

.location-btn .checkmark {
  display: none;
  color: #73bf69;
}

.location-btn.active .checkmark {
  display: inline;
}

/* Notifications in Drawer */
#drawer-notifications-section {
  text-align: left;
}

#drawer-notifications-section h4 {
  margin: 0 0 0.75em 0;
  color: #aaa;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#updated-info-drawer {
  font-size: 0.95em;
  color: #888;
  margin-bottom: 1em;
}

#changelog-container-drawer {
  flex: 1;
  margin-bottom: 2em;
}

#changelog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
}

#changelog-list li {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 0.5em;
  padding: 0.8em;
  margin-bottom: 0.5em;
  position: relative;
  padding-top: 1.8em;
  text-align: left;
}

.changelog-date {
  position: absolute;
  top: 0.25rem;
  left: 0.5rem;
  font-size: 0.7rem;
  color: #888;
  font-weight: normal;
}

.changelog-message {
  color: #ccc;
  text-align: left;
  line-height: 1.4;
}

#drawer-footer {
  margin-top: auto;
  padding-top: 1em;
  border-top: 1pt solid #555;
}

#drawer-footer p {
  font-size: 0.75rem;
  color: #888;
  margin: 0;
}

#drawer-footer a {
  color: #fc0;
}

/* Hamburger Menu Button (Top Right) */
#menu-toggle {
  position: fixed;
  top: 1.5em;
  right: 1.5em;
  width: 3.2em;
  height: 3.2em;
  background-color: #181c20;
  border: 1px solid #555;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#menu-toggle:hover {
  border-color: #888;
  background-color: #222;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

#menu-toggle .bar {
  width: 18px;
  height: 2px;
  background-color: #ccc;
  transition: all 0.3s ease;
  display: block;
  transform-origin: center;
}

#menu-toggle[aria-expanded="true"] {
  background-color: #282828;
}

#menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

#menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

#menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Hamburger Menu Notification Badge */
#menu-toggle .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #ff5285;
  color: white;
  border-radius: 50%;
  width: 1.6em;
  height: 1.6em;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  border: 2px solid #181c20;
}

@keyframes badge-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

#menu-toggle.has-notifications .badge {
  animation: badge-pulse 2s infinite ease-in-out;
}

@media (max-width: 480px) {
  #menu-toggle {
    top: 1em;
    right: 1em;
    width: 3.5em;
    height: 3.5em;
  }
}

/* Dashed line */
.dashed {
  stroke-dasharray: 5,5;
}

/* Lines */
#temperature-past-path.line {
  stroke: #d2a923;
}
#pressure-past-path.line {
  stroke: #94c938;
}
#wind-past-path.line {
  stroke: #5db5c4;
}

#precipitation-past-path.line {
  stroke: #383bff;
}
.area {
  fill-opacity: 0.15;
  fill: #9d9d57;
}
#temperature-past-area.area {
  fill: #a29055;
}
#pressure-past-area.area {
  fill: #5fce43;
}
#wind-past-area.area {
  fill: #5db5c4;
}

#precipitation-past-area.area {
  fill: #383bff;
}
.y-axis.temperature {
  stroke: #d2a923;
  fill: #d2a923;
  color: #d2a923;
  stroke-width: 1;
}
.y-axis.wind {
  stroke: #5db5c4;
  fill: #5db5c4;
  color: #5db5c4;
  stroke-width: 1;
}
.y-axis.pressure {
  stroke: #94c938;
  fill: #94c938;
  color: #94c938;
  stroke-width: 1;
}

.y-axis.precipitation {
  stroke: #383bff;
  fill: #383bff;
  color: #383bff;
  stroke-width: 1;
}

h1 {
  font-size: 120%;
}
#notice {
    background-color: #ffeb3b;
    padding: 0.8em;
    top: 0;

    z-index: 100;
    color: black;
  }
  .topright {
    position: absolute;
    top: 0.8em;
    right: 2.0em;
    font-size: 300%;
  }
  .button {
    cursor: pointer;
  }
.notice {
  position: relative;
  padding: 0.75rem;
  margin-bottom: 0.6rem;
  border: 1px solid #666;
  background-color: rgba(255, 235, 59, 0.9);
  color: black;
  border-radius: 0.3rem;
  font-size: 0.85rem;
}

.notice .dismiss-btn {
  position: absolute;
  top: 0.3rem;
  right: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  color: #666;
}

.notice .dismiss-btn:hover {
  color: #000;
}

.notice.read {
  background-color: rgba(153, 153, 153, 0.3);
  color: #aaa;
}

.notice-date {
  position: absolute;
  top: 0.25rem;
  left: 0.5rem;
  font-size: 0.65rem;
  color: #888;
  font-weight: normal;
}

.notice-message {
  display: block;
  padding-top: 0.6rem;
  font-size: 0.85rem;
  text-align: left;
  line-height: 1.4;
}

.now-intersection {
    fill: lightblue;
    /*stroke: black;*/
    /*stroke: lightblue;*/
    /*color: lightblue;*/
    stroke-width: 0;
    opacity: 1;
}
.annotation {
  font-size: 0.7rem;
  fill: lightblue;
  opacity: 0;
}

#pressure .annotation {
  opacity: 1;
}

#pressure .annotation.hard {
  fill: red;
}

.out-of-date-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgb(65, 2, 2, 83%);
  color: #d3d3d3;
  padding: 20px;
  border-radius: 5px;
  text-align: center;
  z-index: 10;
  pointer-events: none;
  border: solid 1px;
}

svg.out-of-date {
  opacity: 0.5;
  filter: grayscale(50%);
}

/* Tooltip Card */
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background-color: rgba(24, 28, 32, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid #444;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  font-family: sans-serif;
  z-index: 1000;
  text-align: left;
  line-height: 1.4;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.tooltip-time {
  font-weight: bold;
  color: #888;
  margin-bottom: 2px;
  font-size: 0.75rem;
}

.tooltip-value {
  color: #fff;
  font-size: 0.9rem;
}

.tooltip-value strong {
  color: #fc0;
}

/* Hover Tracking Elements */
.hover-line {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-dasharray: 4,4;
  stroke-width: 1px;
  pointer-events: none;
}

.hover-circle {
  fill: #fff;
  stroke: #181c20;
  stroke-width: 2px;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

/* Chart Wrapper & Loading Indicator */
.chart-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.chart-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(24, 28, 32, 0.45);
  backdrop-filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 20;
}

/* Show loading overlay when chart is loading */
.chart-wrapper.loading .chart-loading-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Dim and slightly blur the chart SVG when loading */
.chart-wrapper.loading svg {
  opacity: 0.35;
  filter: blur(1.5px) grayscale(20%);
  transition: opacity 0.25s ease, filter 0.25s ease;
}

/* Smooth transition back when done loading */
.chart-wrapper svg {
  transition: opacity 0.25s ease, filter 0.25s ease;
}

/* Premium Spinner */
.spinner {
  width: 2.8em;
  height: 2.8em;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: #fc0;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

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