html {
  box-sizing: border-box;
  font-size: 16px;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
  margin: 0;
  padding: 0;
  font-weight: normal;
}

ol,
ul {
  list-style: none;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

.logo {
  position: absolute;
  border: 3px solid #333;
  top: 12px;
  left: 12px;
  z-index: 100;
  max-width: 70px;
  height: auto;
  border-radius: 200px;
}

@media screen and (min-width: 1020px) {
  .logo {
    top: 20px;
    left: 20px;
    max-width: 120px;
    border-width: 3px;
  }
}

#map {
  background: linear-gradient(rgba(41, 128, 185, 0.7), rgba(41, 128, 185, 0.7)),
    url(./bg.png);
  background-size: 200px;
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
}

.country {
  fill: #bdc3c7;
  stroke: #2c3e50;
  stroke-width: 0.5px;
  transition: fill 0.6s ease;
}

.country.visited {
  fill: #2c3e50;
  transition: fill 0.6s ease;
}

.country:hover {
  fill: #ecf0f1;
  transition: fill 0.3s ease;
}

.country.visited:hover {
  cursor: pointer;
  fill: #2ecc71;
  transition: fill 0.3s ease;
}

.map-tooltip {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  padding: 5px;
  border-radius: 5px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
  opacity: 0;
  font-size: 13px;
}

/* fullscreen-modal */

.fullscreen-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  border-radius: 12px;
  max-width: 90%;
  max-height: 90%;
  position: relative;
  overflow: auto;
}

.modal-content p {
  padding: 4px 16px 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  max-width: 80vw; /* Match image height from scripts.js */
  margin: 0 auto; /* Center the paragraph */
}

.modal-content img {
  width: 100%;
  height: auto;
  max-height: 70vh;
}

.modal-content .avatars {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 0 16px;
  justify-content: center;
}

.modal-content .avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.modal-content .avatar-image {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid #eee;
}

.modal-content .avatar-name {
  text-transform: capitalize;
  font-size: 11px;
  color: #666;
  margin-bottom: 10px;
}

.modal-content .close-button,
.modal-content .button {
  display: block;
  margin: 6px auto 10px auto;
  padding: 8px 16px;
  background-color: #f1f1f1;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modal-content .close-button {
  color: #c0392b;
}

.trip-image {
  width: 100%;
  height: 300px; /* or whatever height you prefer */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* persons-grid */

.persons-grid {
  position: absolute;
  top: 0px;
  right: 0px;
  z-index: 1;
  display: flex;
  flex-direction: row;
  margin-right: 1rem;
}

.person-card {
  text-align: center;
  width: 120px;
  border-radius: 0 0 8px 8px;
}

.person-card:hover {
  cursor: pointer;
}

.person-card.active {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  opacity: 1;
}

.person-card {
  opacity: 0.8;
}

.person-card a {
  text-align: center;
}

.person-card .avatar {
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.person-card .avatar-image {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
}

.person-card .avatar-name {
  font-size: 14px;
  font-weight: 500;
}

.person-card .person-description {
  font-size: 11px;
  width: auto;
  padding: 0.5rem;
  padding-bottom: 1rem;
}

#map svg {
  touch-action: none;
}
