.email-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0);
  pointer-events: none;
  backdrop-filter: blur(0px);
  transition: background 250ms ease, backdrop-filter 250ms ease;
}

.email-panel-overlay.is-open {
  background: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

.email-panel {
  width: min(40vw, 580px);
  min-width: 360px;
  height: 100%;
  background: #ffffff;
  color: #111318;
  border-left: 1px solid #dfe3eb;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateX(100%);
  transition: transform 250ms ease;
}

.email-panel-overlay.is-open .email-panel {
  transform: translateX(0);
}

.email-panel-head {
  border-bottom: 1px solid #e6e9f0;
  padding-bottom: 0.85rem;
}

.email-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  color: #717787;
  font-weight: 700;
}

.email-to {
  margin: 0.35rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.email-field {
  display: grid;
  gap: 0.45rem;
}

.email-field input,
.email-field textarea {
  width: 100%;
  border: 1px solid #d5dbe8;
  border-radius: 10px;
  background: #ffffff;
  color: #1a1f2b;
  font: inherit;
  font-size: 0.98rem;
  padding: 0.72rem 0.8rem;
  outline: none;
}

.email-field textarea {
  min-height: 200px;
  resize: vertical;
}

.email-field input:focus,
.email-field textarea:focus {
  border-color: #9ca7c8;
}

.email-field input::placeholder {
  color: #9ca2b2;
}

.email-actions {
  margin-top: auto;
  display: flex;
  gap: 0.65rem;
}

.email-send,
.email-cancel {
  border: 1px solid #d1d7e4;
  border-radius: 10px;
  background: #ffffff;
  color: #111318;
  font: inherit;
  font-weight: 700;
  padding: 0.68rem 0.95rem;
  cursor: pointer;
}

.email-send {
  background: #111318;
  color: #ffffff;
  border-color: #111318;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 132px;
}

.email-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.email-send.is-loading {
  opacity: 1;
}

.email-send.is-success {
  background: #d8ffea;
  border-color: #d8ffea;
  color: #0f3a26;
}

.email-spinner {
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: email-spin 650ms linear infinite;
}

.email-checkmark {
  display: inline-block;
  font-weight: 900;
  transform: scale(0.7);
  animation: email-check-pop 220ms ease forwards;
}

.email-error {
  margin: 0.1rem 0 0;
  font-size: 0.88rem;
  color: #b42318;
}

.email-cancel:hover,
.email-send:hover:not(:disabled) {
  filter: brightness(0.95);
}

body.email-panel-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .email-panel {
    width: min(100vw, 480px);
    min-width: 0;
  }
}

@keyframes email-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes email-check-pop {
  to {
    transform: scale(1);
  }
}
