/* Overlay */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.dialog-overlay.show {
  display: flex;
}

/* Dialog Container */
.entity-dialog {
  background: rgb(224, 242, 240);
  border-radius: 20px;
  padding: 24px;
  max-width: 320px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.3s ease;
  position: relative;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 4px;
  border-radius: 10%;
  transition: background 0.2s;
}

.close-btn:hover {
  background: transparent;
}

/* Entity Logo */
.dialog-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.dialog-logo img {
  width: 180px;
  height: 180px;
  border-radius: 16px;
  object-fit: cover;
  border: 0.05px solid #e5e5e5;
}

/* Entity Name */
.dialog-name {
  text-align: center;
  font-size: 20px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: rgb(0, 151, 165);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.verified-badge {
  width: 20px;
  height: 20px;
}

/* Entity Bio */
.dialog-bio {
  text-align: center;
  color: rgb(68, 97, 102);
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  line-height: 1.4;
  margin-bottom: 24px;
}

/* Action Items */
.dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgb(224, 242, 240);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  border: 0.8px solid rgba(27, 27, 27, 0.1);
}

.action-item:hover {
  background: rgb(233, 250, 243);
  transform: translateY(-1px);
}

.action-icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.label-icon {
  background: transparent;
  object-fit: cover;
}

.action-text {
  flex: 1;
  font-size: 15px;
  font-family: "Roboto", sans-serif;
  color: rgb(68, 97, 102);
}

.copy-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #666;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: #e0e0e0;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Demo styles */
.demo-entity {
  background: white;
  padding: 16px;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.demo-entity:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.demo-logo {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.action-icon-image {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.copy-feedback {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #4caf50;
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  z-index: 10000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.copy-feedback.show {
  animation: slideInUp 0.3s ease;
}

.copy-feedback.hide {
  animation: slideOutDown 0.3s ease;
}

@keyframes slideInUp {
  from {
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutDown {
  from {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  to {
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
  }
}

.button-share {
  background-color: #0097a5;
  color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 16px;
  width: 100%;
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.button-share:hover {
  background-color: #007a85;
}

.button-share:active {
  background-color: #005e64;
}

#dialogBio {
  white-space: pre-line;
}

.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none; /* escondido por padrão */
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.city-dialog {
  background: rgb(224, 242, 240);
  border-radius: 16px;
  padding: 20px;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: left;
}

.city-dialog h2 {
  font-size: 20.5px;
  margin-bottom: 18px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: rgb(0, 151, 165);
}

.city-dialog label {
  display: block;
  margin: 12px 0px;
  font-size: 18px;
  font-family: "Poppins", sans-serif;
  color: rgb(68, 97, 102);
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 20px;
}

.cancel-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: rgb(0, 151, 165);
  cursor: pointer;
}

.confirm-btn {
  background: rgb(0, 151, 165);
  color: white;
  border: none;
  font-size: 18px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
}

input[type="radio"] {
  accent-color: rgb(0, 151, 165);
  cursor: pointer;
  margin-right: 6px;
  margin-left: 2px;
  transform: scale(1.3);
}

@media (prefers-color-scheme: dark) {
  .entity-dialog,
  .city-dialog,
  .entity-dialog {
    background-color: rgb(20, 25, 25); /* fundo escuro */
    color: rgb(230, 230, 230);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  }

  .dialog-logo img {
    border: none;
  }

  /* Dialogs */
  .action-item {
    background-color: rgb(20, 25, 25); /* fundo escuro */
    color: rgb(230, 230, 230);
    border-color: rgb(60, 60, 65);
  }

  .action-item:hover {
    background: rgb(34, 34, 34);
    transform: translateY(-1px);
  }

  /* Headings */
  .city-dialog h2,
  .dialog-name {
    color: white;
  }

  /* Buttons */
  .confirm-btn {
    background: rgb(0, 120, 135);
    color: white;
  }

  .cancel-btn {
    color: rgb(0, 180, 200);
  }

  .button-share {
    background-color: rgb(0, 120, 135);
    color: #fff;
  }

  .button-share:hover {
    background-color: rgb(0, 100, 115);
  }

  .button-share:active {
    background-color: rgb(0, 80, 95);
  }

  .copy-btn {
    color: #ccc;
  }

  .copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .close-btn {
    color: #ccc;
  }

  .close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  /* Feedback */
  .copy-feedback {
    background: rgb(50, 180, 70);
    color: #fff;
  }

  /* Demo entities */
  .demo-entity {
    background: rgb(40, 40, 45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }

  .demo-entity:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  }

  /* Action text */
  .action-text,
  .dialog-bio,
  .city-dialog label {
    color: white;
  }

  /* Overlay */
  .dialog-overlay {
    background: rgba(0, 0, 0, 0.6);
  }
}
