/**
 * Custom Form System – styled with brand colors
 * Uses theme CSS variables when available; fallbacks for standalone use.
 */
:root {
  --custom-form-primary: var(--primary-color, #2ecc71);
  --custom-form-secondary: var(--secondary-color, #ff6b00);
  --custom-form-text: var(--text-color, #252525);
  --custom-form-muted: var(--gray-color, #828282);
  --custom-form-bg: var(--white-color, #ffffff);
  --custom-form-border: var(--light-gray, #ececec);
  --custom-form-focus-ring: var(--primary-color, #2ecc71);
}

.custom-form--styled {
  padding: 1.75rem;
  background: var(--custom-form-bg);
  border-radius: 12px;
  border: 1px solid var(--custom-form-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  font-family: inherit;
  margin: 20px 0;
}

.custom-form--styled .custom-form__field {
  margin-bottom: 1.25rem;
}

.custom-form--styled .custom-form__field:last-of-type {
  margin-bottom: 1.5rem;
}

.custom-form--styled .custom-form__input,
.custom-form--styled .custom-form__textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--custom-form-text);
  background: var(--custom-form-bg);
  border: 1px solid var(--custom-form-border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.custom-form--styled .custom-form__input::placeholder,
.custom-form--styled .custom-form__textarea::placeholder {
  color: var(--custom-form-muted);
}

.custom-form--styled .custom-form__input:hover,
.custom-form--styled .custom-form__textarea:hover {
  border-color: var(--custom-form-primary);
}

.custom-form--styled .custom-form__input:focus,
.custom-form--styled .custom-form__textarea:focus {
  border-color: var(--custom-form-focus-ring);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15);
}

.custom-form--styled .custom-form__textarea {
  resize: vertical;
  min-height: 100px;
}

.custom-form--styled .custom-form__actions {
  margin-top: 0.5rem;
}

.custom-form--styled .custom-form__submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--custom-form-bg);
  background: linear-gradient(135deg, var(--custom-form-primary) 0%, #27ae60 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
  box-shadow: 0 2px 8px rgba(46, 204, 113, 0.35);
}

.custom-form--styled .custom-form__submit:hover {
  background: linear-gradient(135deg, var(--custom-form-secondary) 0%, #e55a00 100%);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.35);
  transform: translateY(-1px);
}

.custom-form--styled .custom-form__submit:active {
  transform: translateY(0);
}

.custom-form__response {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  border-radius: 8px;
  text-align: center;
}

.custom-form__response:not(:empty) {
  background: rgba(46, 204, 113, 0.12);
  color: var(--custom-form-text);
  border: 1px solid rgba(46, 204, 113, 0.3);
}
