/*
 * EU Contact Kit — self-contained contact form styles.
 * No external CSS variables required; all values are literal so this file can
 * be dropped into any static site (link it, or paste into the site stylesheet).
 * Pairs with partials/contact-section.html and js/contact-form.js.
 */

/* ---- Layout ------------------------------------------------------------- */
.contact-form-container {
  width: 100%;
  min-width: 0;
}

.contact-form-container h2 {
  margin-bottom: 2rem;
}

.contact-form {
  background: #ffffff;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

/* ---- Fields ------------------------------------------------------------- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2d2d2d;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #f9fafb;
  color: #2d2d2d;
  transition: all 0.3s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #10b981;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9ca3af;
}

.form-group textarea {
  resize: vertical;
}

.form-group input[type="file"] {
  padding: 0.75rem;
  background: #ffffff;
  cursor: pointer;
}

.file-info {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: #6b7280;
}

/* ---- File preview ------------------------------------------------------- */
.file-preview-list {
  margin-top: 1rem;
  display: none;
}

.file-preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.file-preview-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.file-preview-name {
  font-size: 0.875rem;
  color: #2d2d2d;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview-size {
  font-size: 0.75rem;
  color: #6b7280;
}

.file-preview-delete {
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.2s;
}

.file-preview-delete:hover {
  background: #dc2626;
}

/* ---- Turnstile ---------------------------------------------------------- */
#turnstile-container {
  margin-bottom: 1.5rem;
  min-height: 65px; /* reserve space to avoid layout shift while the widget loads */
}

/* ---- Submit button ------------------------------------------------------ */
.submit-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ---- Toast notifications ------------------------------------------------ */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333333;
  color: #ffffff;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 10000;
  max-width: 400px;
}

.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  background: #28a745;
}

.toast-error {
  background: #dc3545;
}

.toast-warning {
  background: #ffc107;
  color: #333333;
}

.toast-info {
  background: #17a2b8;
}

@media (max-width: 768px) {
  .toast-notification {
    left: 20px;
    right: 20px;
    bottom: 20px;
    max-width: none;
  }
}

/* ---- Screen-reader-only ------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .submit-btn,
  .toast-notification,
  .form-group input,
  .form-group textarea,
  .file-preview-delete {
    transition-duration: 0.01ms;
  }
}
