/* Contact Form Popup Styling - Light Theme Compatible */

.message-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: all 0.3s ease;
  padding: 1rem;
}

.message-popup {
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: scale(1);
  transition: all 0.3s ease;
}

.message-popup.success {
  border-color: var(--color-success);
  box-shadow: 0 20px 60px rgba(5, 150, 105, 0.2);
}

.message-popup.error {
  border-color: var(--color-error);
  box-shadow: 0 20px 60px rgba(220, 38, 38, 0.2);
}

.message-popup h3 {
  color: var(--text-primary) !important;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.message-popup p {
  color: var(--text-secondary) !important;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.popup-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.success-icon {
  width: 3rem;
  height: 3rem;
  background: var(--color-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.success-checkmark {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.checkmark-path {
  stroke-dasharray: 25;
  stroke-dashoffset: 25;
  animation: checkmark 0.6s ease-in-out 0.3s forwards;
}

@keyframes checkmark {
  to {
    stroke-dashoffset: 0;
  }
}

.error-icon {
  width: 3rem;
  height: 3rem;
  background: var(--color-error);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
}

.auto-close-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 1rem 1rem;
  animation: progressBar 5s linear forwards;
}

.auto-close-progress.success {
  background: var(--color-success);
}

.auto-close-progress.error {
  background: var(--color-error);
}

@keyframes progressBar {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
  .message-overlay {
    background: rgba(0, 0, 0, 0.8);
  }
  
  .message-popup {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .message-overlay,
  .message-popup,
  .popup-close,
  .checkmark-path,
  .auto-close-progress {
    animation: none;
    transition: none;
  }
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .message-popup {
    margin: 1rem;
    padding: 1.5rem;
  }
}