/* EmailJS Modal ve Toast Stilleri */
/* Türkçe yorum: E-posta gönderim modal'ları ve bildirimler için CSS */

/* Success Modal */
.success-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}

.success-modal.show {
  opacity: 1;
  visibility: visible;
}

.success-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.success-modal__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--color-surface);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 480px;
  width: 90%;
  border: 1px solid var(--color-border);
  transition: transform 0.3s ease-in-out;
}

.success-modal.show .success-modal__content {
  transform: translate(-50%, -50%) scale(1);
}

.success-modal__icon {
  width: 80px;
  height: 80px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: bold;
  margin: 0 auto 20px;
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-modal__title {
  color: var(--color-text);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 15px;
}

.success-modal__message {
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 30px;
}

.success-modal__actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.success-modal__close,
.success-modal__whatsapp {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  min-width: 120px;
}

.success-modal__close {
  background: var(--color-primary);
  color: white;
}

.success-modal__close:hover {
  background: var(--color-primary-700);
  transform: translateY(-2px);
}

.success-modal__whatsapp {
  background: #25D366;
  color: white;
}

.success-modal__whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--color-surface);
  color: var(--color-text);
  padding: 16px 24px;
  border-radius: 12px;
  border-left: 4px solid var(--color-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  font-weight: 500;
  max-width: 400px;
  z-index: 9999;
  transform: translateX(400px);
  transition: transform 0.3s ease-in-out;
}

.toast.show {
  transform: translateX(0);
}

.toast--success {
  border-left-color: #28a745;
}

.toast--error {
  border-left-color: #dc3545;
}

.toast--warning {
  border-left-color: #ffc107;
}

.toast--info {
  border-left-color: var(--color-primary);
}

/* Form Field Validation */
.modern-form__input.is-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.modern-form__input.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.field-error {
  display: block;
  color: #dc3545;
  font-size: 12px;
  margin-top: 5px;
  font-weight: 500;
}

/* Loading State */
.modern-form__submit.loading {
  opacity: 0.7;
  cursor: not-allowed;
  position: relative;
}

.modern-form__submit.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: buttonSpinner 1s linear infinite;
}

@keyframes buttonSpinner {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

/* Rate Limit Warning */
.rate-limit-warning {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid #ffc107;
  color: #856404;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 15px;
  display: none;
}

.rate-limit-warning.show {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .success-modal__content {
    padding: 30px 20px;
    margin: 20px;
    width: calc(100% - 40px);
  }
  
  .success-modal__title {
    font-size: 20px;
  }
  
  .success-modal__message {
    font-size: 14px;
  }
  
  .success-modal__actions {
    flex-direction: column;
  }
  
  .success-modal__close,
  .success-modal__whatsapp {
    width: 100%;
  }
  
  .toast {
    bottom: 20px;
    right: 20px;
    left: 20px;
    max-width: none;
    transform: translateY(100px);
  }
  
  .toast.show {
    transform: translateY(0);
  }
}

/* Dark Mode Uyumluluğu */
@media (prefers-color-scheme: dark) {
  .success-modal__content {
    background: var(--color-surface);
    border-color: var(--color-border);
  }
  
  .toast {
    background: var(--color-surface);
    color: var(--color-text);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .success-modal,
  .success-modal__content,
  .toast,
  .modern-form__submit {
    transition: none;
    animation: none;
  }
  
  .success-modal__icon {
    animation: none;
  }
}

/* Focus States */
.success-modal__close:focus,
.success-modal__whatsapp:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.modern-form__input:focus.is-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.modern-form__input:focus.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}
