:root {
  --primary-color: #ff6a13;
  --secondary-color: #002b49;
  --text-color: #333;
  --background-color: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Prompt", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  display: flex;
  flex-direction: column;
}

header {
  background-color: var(--secondary-color);
  color: white;
  padding: 0.5rem 0;
  flex-shrink: 0;
}

.maplibregl-popup-close-button {
  padding: 3px;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  height: 40px;
  width: auto;
}

.header-text {
  flex: 1;
}

header h1 {
  font-size: 1.3rem;
  font-weight: 500;
}

header p {
  font-size: 0.9rem;
  font-weight: 300;
}

main {
  flex: 1;
  overflow: hidden;
  padding: 1rem 0;
}

.container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  gap: 2rem;
  height: 100%;
}

#map {
  flex: 1;
  height: 100%;
  /* border-radius: 8px; */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.list-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #f8f8f8;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.list-container.collapsed {
  flex: 1;
  max-height: 50px;
}

.list-container.collapsed #location-list,
.list-container.collapsed .load-more-btn {
  display: none;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background-color: var(--primary-color);
  color: white;
  position: relative;
  z-index: 1;
  min-height: 50px;
}

.list-header h2 {
  color: white;
  border: none;
  margin: 0;
  font-size: 1rem;
}

.toggle-list {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.toggle-list.collapsed {
  transform: rotate(180deg);
}

#location-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem;
  transition: all 0.3s ease;
}

.location-item {
  background-color: white;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  gap: 1rem;
  border: 2px solid transparent;
}

.location-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.location-item.selected {
  border-color: var(--primary-color);
  background-color: #fff9f5;
}

.location-item .image-container {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.location-item .image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.image-count-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.image-count-badge i {
  font-size: 14px;
}

.location-item .content {
  flex: 1;
  min-width: 0;
}

.location-item h3 {
  color: #414141;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
}

.location-item p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 300;
}

.location-item .date {
  color: #666;
  font-size: 0.8rem;
  font-weight: 300;
}

.location-item .tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.location-item .tag {
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 300;
}

.location-item .full-name {
  color: var(--secondary-color);
  font-size: 0.9rem;
  font-weight: 400;
  margin-top: 0.5rem;
}

.load-more-btn {
  display: block;
  width: calc(100% - 2rem);
  padding: 0.75rem;
  margin: 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 400;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.load-more-btn:hover {
  background-color: #e55d0a;
}

.load-more-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  main {
    flex: 1;
    overflow: hidden;
    padding: 0;
  }

  #map {
    /* height: 70vh; */
    flex: 1;
  }

  .list-container {
    /* max-height: 30vh; */
    flex: 2;
  }

  .list-container.collapsed {
    max-height: 50px;
  }

  .list-header {
    cursor: pointer;
  }

  .toggle-list {
    display: block;
  }

  .container {
    flex-direction: column;
    padding: 0;
    gap: 0;
  }

  .header-content {
    flex-direction: row;
    text-align: center;
  }

  .header-text {
    display: flex;
    flex-direction: column;
    text-align: start;
  }

  .logo {
    height: 35px;
  }

  header h1 {
    font-size: 1.25rem;
  }

  header p {
    font-size: 0.8rem;
  }

  .location-item {
    flex-direction: column;
  }

  .location-item .image-container {
    width: 100%;
    height: 200px;
  }
}

/* Modal Gallery Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.modal-image-container {
  max-width: 90%;
  max-height: 80vh;
  margin: 0 auto;
}

.modal-image-container img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.modal-controls {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  color: white;
}

.modal-button {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 10px 20px;
  transition: opacity 0.3s;
}

.modal-button:hover {
  opacity: 0.8;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

#image-counter {
  color: white;
  font-size: 16px;
}

.tab-container {
  display: flex;
  gap: 0.5rem;
}

.tab-button {
  background: none !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.8) !important;
  padding: 0.5rem 1rem !important;
  cursor: pointer !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  transition: all 0.2s !important;
  border-radius: 4px !important;
}

.tab-button:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.tab-button.active {
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: white;
}

.status-summary {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 10px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.status-emoji {
  font-size: 1.2em;
}

.status-text {
  font-size: 0.9em;
}

.status-count {
  background-color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.9em;
  border: 1px solid #dee2e6;
}

@media (max-width: 768px) {
  .status-text {
    display: none;
  }

  .status-emoji {
    font-size: 1.5em;
  }

  .status-summary {
    justify-content: center;
    gap: 20px;
  }
}
