.ecp-widget {
  display: inline-block;
}

.ecp-open-button,
.ecp-copy-button,
.ecp-close-button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.ecp-open-button {
  background: #111827;
  color: #fff;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(17, 24, 39, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ecp-open-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.24);
}

.ecp-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
}

.ecp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.ecp-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 560px);
  margin: 10vh auto;
  background: #fff;
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.28);
}

.ecp-modal-title {
  margin: 0 2rem 0.5rem 0;
  font-size: 1.35rem;
}

.ecp-modal-help {
  margin: 0 0 1rem;
  color: #4b5563;
}

.ecp-close-button {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  line-height: 1;
  font-size: 1.3rem;
}

.ecp-email-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.ecp-email-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.ecp-email-text {
  word-break: break-word;
  color: #111827;
}

.ecp-copy-button {
  flex: 0 0 auto;
  background: #2563eb;
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
}

.ecp-copy-button.is-copied {
  background: #059669;
}

.ecp-empty {
  padding: 1rem 1.25rem;
  background: #fef3c7;
  color: #92400e;
  border-radius: 12px;
  display: inline-block;
}

@media (max-width: 640px) {
  .ecp-modal-dialog {
    margin: 8vh auto;
    padding: 1.25rem;
  }

  .ecp-email-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .ecp-copy-button {
    width: 100%;
  }
}

