* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: Arial, sans-serif;
}

header {
  background-color: #7f5b6f;
  color: white;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
}

.logo img {
  width: 24px;
  margin-right: 8px;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.profile-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: white;
  color: black;
  min-width: 140px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  z-index: 1000;
  border-radius: 6px;
  overflow: hidden;
}

.dropdown-content a {
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  color: #333;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

#map-container {
  display: flex;
  flex-direction: row;
  height: calc(100% - 64px);
  position: relative;
}

#map {
  flex: 1;
  border: none;
}

.sidebar {
  width: 320px;
  background-color: white;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  padding: 16px;
  overflow-y: auto;
}

.sidebar h3 {
  margin-bottom: 12px;
  color: #444;
}

.pet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.pet:hover {
  background-color: #f7f7f7;
}

.pet img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

.pet-info {
  display: flex;
  align-items: center;
}

.pet-name {
  font-weight: bold;
}

.pet-popup {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 16px;
  width: 280px;
  z-index: 100;
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.popup-header img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.popup-details {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.popup-details div {
  margin-bottom: 6px;
}

.popup-actions {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.popup-actions button {
  flex: 1;
  background-color: #7f5b6f;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  #map-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    box-shadow: none;
    border-top: 1px solid #eee;
  }

  #map {
    height: 300px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .profile-img {
    align-self: flex-end;
  }

  .pet-popup {
    width: calc(100% - 40px);
    right: 10px;
    left: 10px;
  }
}

@media (max-width: 480px) {
  .pet {
    flex-direction: column;
    align-items: flex-start;
  }

  .pet span {
    align-self: flex-end;
  }
}

.add-pet-button {
  padding: 12px 24px;
  width: 100%;
  color: #fff;
  background: #7f5b6f;
  border-color: #7f5b6f;
}

  .add-pet-button:hover {
    background: #6a4c5a;
    border-color: #6a4c5a;
  }

  .add-pet-button:focus {
    outline: none;
  }

  .add-pet-button:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
  }