/* Style for main page (index.html) */

body {
  margin: 0;
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
}
/* Panels */
body.panel-collapsed {
   grid-template-columns: 0px 1fr 0px;
}

#left-panel {
   width: 400px;
  flex-shrink: 0;
  background: #e7e7ea;
  padding: 20px;
  overflow-y: auto;
  border-right: 1px solid #e8e0c8;
   /* transition: width 0.3s; */
}
body.panel-collapsed #left-panel {
  width: 0;
  padding: 0;
  overflow: hidden;
  border-right: none;
}

/* Collapse button left panel  */
#collapse-btn {
  position: absolute;
  top: 9px;
  left: 360px;
  z-index: 100;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  /* transition: left 0.2s; */
}

body.panel-collapsed #collapse-btn {
  left: 16px;
}

#right-panel {
  position: relative;
  width: 0px;
  flex-shrink: 0;
  overflow: hidden;
  background: #e7e7ea;
  overflow-y: auto;
  border-left: 1px solid #e8e0c8;
  transition: width 0.3s, padding 0.3s;   
}

body.panel-open #right-panel {
    width: 200px;
    padding: 20px; 
}

/* Typography */
h2 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}

h3 {
  font-size: 14px;
  font-weight: 600;
  color: #2c2c2c;
  margin: 16px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

p {
  font-size: 13px;
  color: #333;
  margin: 4px 0;
  line-height: 1.5;
}

.segment-header {
  font-size: 13px;
  font-weight: 300;
  /* color: #0066cc; */
  margin: 0 0 8px 0;
  letter-spacing: 0.5px;
}


/* .segment-label {
  font-size: 14px;
  color: #0066cc;
  font-weight: 700;
  text-transform: uppercase;
} */

label {
  font-size: 16px;
  color: #333;
  /* margin-bottom: 4px; */
  /* display: block; */
}

.layer-title {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 6px;

}

/* Toggle buttons */
#mode-toggles-tel,
#mode-toggles-ver {
  display: flex;
  gap: 4px;
  background: #dde8ec;
  padding: 3px;
  border-radius: 8px;
  width: fit-content;
  margin-bottom: 12px;
}

.toggle-btn {
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.toggle-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.toggle-btn:hover:not(.active):not(:disabled) {
  color: #374151;
}

.toggle-btn.active {
  background: var(--active-color, #ffffff);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* Legend */
.legend {
  margin-top: 6px;
  margin-bottom: 12px;
}

.legend-bar {
  height: 8px;
  border-radius: 4px;
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #888;
  margin-top: 3px;
}

.legend-bar_sur {
  display: flex;
  flex-direction: column;
  row-gap: 12px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-row .dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-row span:not(.dot) {
  font-size: 12px;
  color: #333;
  white-space: nowrap;
}

/* Timeline */
#timeline-container {
  width: 100%;
  max-width: 100%;
  z-index: 10;
  background:#e7e7ea;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px 10px 6px;
  overflow-x: auto;
  box-shadow: 0 2px 8px rgba(231, 231, 234, 0.08);
  margin-top: 16px;

  scrollbar-width: none;     
  -ms-overflow-style: none;
}
#timeline-scroll {
  display: inline-flex;
  gap: 0;
  background:#e7e7ea;
}

#timeline-container::-webkit-scrollbar {
  display: none;            
}

.year-block {
  display: inline-flex;
  flex-direction: column;
  margin-right: 3px;
  vertical-align: top;
}

.year-label {
  font-size: 10px;
  font-weight: 600;
  color: #888;
  padding-left: 4px;
  margin-bottom: 0;
}

.tick-row {
  display: flex;
  position: relative;
  height: 14px;
  align-items: flex-end;
}

.tick-row::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #ccc;
}

.tick {
  width: 26px;
  height: 5px;
  border-left: 1.5px solid #ccc;
  box-sizing: border-box;
  flex-shrink: 0;
  cursor: pointer;
}

.tick.active {
  height: 8px;
  border-left: 2px solid #2196F3;
  background: rgba(33, 150, 243, 0.15);
}

.month-row {
  display: flex;
}

.month {
  width: 26px;
  font-size: 9px;
  color: #999;
  cursor: pointer;
  text-align: left;
}

.month.active {
  color: #2196F3;
  font-weight: 600;
}

/* Map */
#map {
  flex: 1;
  min-width: 0;
  position: relative;
  width: 100%;
  height: 100%;
}

/* Accordion */
.accordion {
  border-top: 1px solid #e0e0e0;
  padding: 0;
  margin-top: 8px;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* .accordion-header-2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 12px;
  font-weight: 600;
  color: #585757;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.5px;
  margin-right: 10px;
} */

.accordion-header-2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 0;
  font-size: 12px;
  font-weight: 600;
  color: #585757;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.5px;
  margin-right: 10px;
}

.accordion-arrow {
  transition: transform 0.2s;
  font-size: 12px;
  color: #888;
}

.accordion.collapsed .accordion-arrow {
  transform: rotate(-90deg);
}

.accordion-body {
  overflow: hidden;
  transition: max-height 0.25s ease;
  max-height: 1000px;
}

.accordion.collapsed .accordion-body {
  max-height: 0;
}

/* for more information */
.info-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 300;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 25px;
}

.info-link::after {
   content: "↗";
  transition: transform 0.2s ease;
}

.info-link:hover::after {
  transform: translateX(4px);
}

.info-link:hover {
  text-decoration: underline;
}

.main{
  color: #2563eb;
  text-decoration: none;
  font-weight: 300;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  margin-bottom: 10px;
}
/* tooltip */

.deck-tooltip {
  background: white !important;
  color: #111 !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
  max-width: 250px;
  pointer-events: none;
}

.deck-tooltip {
  margin: 0;
}

#close-btn{
  background: white;
  border: 1px solid #e8e0c8;
}

/* zoom, home button */
.map-controls {
  position: absolute;
  bottom: 540px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.map-controls button {
  width: 34px;
  height: 34px;
  background: #ffffff;
  border: 1px solid #e8e0c8;
  border-radius: 6px;
  color: #1a1a1a;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  transition: background 0.15s ease;
}

.map-controls button:hover {
  background: #f7f7f7;
}

#home-btn {
  font-size: 15px;
}