/* Encrypt/Decrypt Message Animations */

@keyframes message-fade-in {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 10px));
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes message-fade-out {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 10px));
  }
}

.encrypt-message {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro", sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ui-text);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  width: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
}

/* Position relative to progress circle - center horizontally using 50% of circle */
.progress-circle + .encrypt-message {
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Alternative: if message is inside progress circle container */
.progress-circle ~ .encrypt-message {
  left: 50%;
  transform: translate(-50%, -50%);
}

.encrypt-message-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
  animation: message-fade-in 0.3s ease forwards;
}

.encrypt-message-hidden {
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: message-fade-out 0.3s ease forwards;
}

.encrypt-message::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--ui-surface);
  opacity: 0.8;
}

.encrypt-message span {
  display: inline-block;
  padding: 10px 18px;
  background-color: var(--ui-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 140px;
  position: relative;
  text-align: center;
  margin: 0 auto;
}

.encrypt-message:not(:has(span)) {
  padding: 10px 18px;
  background-color: var(--ui-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 140px;
  text-align: center;
  margin: 0 auto;
}

/* Processing state - handled by JavaScript animation */
.encrypt-message.processing {
  /* Visual indicator that processing is happening */
}
