/**
 * Professionelle Styles für Kontaktformulare und Success/Error Banner
 * Gant-Move Umzugsunternehmen
 */

/* ===== SUCCESS BANNER ===== */
.success-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 9999;
  max-width: 600px;
  width: 90%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    opacity 0.3s ease;
  opacity: 0;
  animation: slideDown 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.success-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@keyframes slideDown {
  0% {
    transform: translateX(-50%) translateY(-120%);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.success-banner-content {
  display: flex;
  align-items: flex-start;
  padding: 25px 30px;
  gap: 20px;
  position: relative;
}

.success-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
}

.success-text {
  flex: 1;
  color: white;
}

.success-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.success-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
}

.success-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.success-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* ===== ERROR BANNER ===== */
.error-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 9999;
  max-width: 600px;
  width: 90%;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(239, 68, 68, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    opacity 0.3s ease;
  opacity: 0;
}

.error-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.error-banner-content {
  display: flex;
  align-items: flex-start;
  padding: 25px 30px;
  gap: 20px;
  position: relative;
}

.error-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

.error-text {
  flex: 1;
  color: white;
}

.error-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.error-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
}

.error-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.error-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* ===== FORM ENHANCEMENTS ===== */
.form-control:focus,
.form-select:focus {
  border-color: #0066cc;
  box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.15);
}

.form-check-input:checked {
  background-color: #0066cc;
  border-color: #0066cc;
}

.form-check-input:focus {
  border-color: #0066cc;
  box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.15);
}

/* Loading Button */
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* Validation Feedback Styling */
.invalid-feedback {
  font-size: 0.875rem;
  margin-top: 0.5rem;
  color: #dc3545;
  animation: fadeIn 0.3s ease;
}

.valid-feedback {
  font-size: 0.875rem;
  margin-top: 0.5rem;
  color: #198754;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid,
.was-validated .form-select:valid {
  border-color: #198754;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .success-banner,
  .error-banner {
    top: 10px;
    width: 95%;
    max-width: none;
  }

  .success-banner-content,
  .error-banner-content {
    padding: 20px;
    gap: 15px;
  }

  .success-icon,
  .error-icon {
    width: 40px;
    height: 40px;
  }

  .success-icon svg,
  .error-icon svg {
    width: 32px;
    height: 32px;
  }

  .success-title,
  .error-title {
    font-size: 16px;
  }

  .success-message,
  .error-message {
    font-size: 13px;
  }

  .success-close,
  .error-close {
    width: 28px;
    height: 28px;
    top: 12px;
    right: 12px;
  }

  .success-close svg,
  .error-close svg {
    width: 18px;
    height: 18px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .success-banner {
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.6),
      0 0 0 1px rgba(255, 255, 255, 0.15);
  }

  .error-banner {
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.6),
      0 0 0 1px rgba(255, 255, 255, 0.15);
  }
}

/* Accessibility */
.success-close:focus,
.error-close:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Print */
@media print {
  .success-banner,
  .error-banner {
    display: none;
  }
}
