/* --------------------------------------------------------------------------
   Custom form panel
   -------------------------------------------------------------------------- */

.nova-custom-form {
  margin: 1.5rem 0; 
}

.nova-custom-form__header {
  margin-bottom: 1.25rem;
}

.nova-custom-form__title {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900, #0f172a);
  font-family: var(--font-family-base);
}

.nova-custom-form__desc {
  margin: 0;
  color: var(--gray-500, #64748b);
  font-size: 0.875rem;
  line-height: 1.6;
  font-family: var(--font-family-base);
}

/* 蜜罐：即使插件 CSS 未加载也不应露出（与评论表单一致） */
.nova-custom-form__honeypot,
.nova-custom-form__honeypot[hidden] {
  display: none !important;
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.nova-custom-form__honeypot-label {
  display: none !important;
}

.nova-custom-form__captcha-wrap {
  margin-top: 0.25rem;
}

.nova-custom-form__fields {
  margin-bottom: 0;
}

.nova-custom-form__field {
  margin-bottom: 0;
}

.nova-custom-form__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700, #334155);
  font-family: var(--font-family-base);
}

.nova-custom-form__required {
  color: #ef4444;
  margin-left: 0.15rem;
}

.nova-custom-form .form-control,
.nova-custom-form .form-select {
  border-color: var(--gray-200, #e2e8f0);
  background-color: #fff;
  font-size: 0.9375rem;
  font-family: var(--font-family-base);
}

.nova-custom-form .form-select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23334155' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}

.nova-custom-form textarea.form-control {
  resize: vertical;
  min-height: 6rem;
}

.nova-custom-form .form-control:focus,
.nova-custom-form .form-select:focus {
  border-color: var(--primary-color, #2563eb);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #2563eb) 15%, transparent);
}

.nova-custom-form__choices {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  padding: 0.625rem 0rem;
  background: #fff;
  flex-wrap: wrap;
}

.nova-custom-form__choice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--gray-700, #475569);
  cursor: pointer;
}

.nova-custom-form__choice input[type="checkbox"],
.nova-custom-form__choice input[type="radio"] {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--primary-color, #2563eb);
}

.nova-custom-form__actions {
  margin-top: 1.25rem;
  padding-top: 0.25rem;
}

.nova-custom-form__alert {
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-size: 0.875rem;
}

.nova-custom-form__alert:not(.d-none) {
  display: block;
}

.nova-custom-form__field.is-invalid .form-control,
.nova-custom-form__field.is-invalid .form-select {
  border-color: #ef4444;
}

.nova-custom-form__field.is-invalid .nova-custom-form__label {
  color: #ef4444;
}

.nova-custom-form.is-submitting .nova-custom-form__submit {
  opacity: 0.7;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Top toast (same as comment success)
   -------------------------------------------------------------------------- */

.site-toast-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10060;
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem;
  pointer-events: none;
}

.site-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 36rem);
  padding: 0.875rem 1rem;
  border-radius: var(--border-radius, 12px);
  background-color: var(--surface-color, #fff);
  border: 1px solid var(--gray-200, #e2e8f0);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  color: var(--text-color, #1e293b);
  transform: translateY(calc(-100% - 1rem));
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.35s ease;
}

.site-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.site-toast--success {
  border-color: color-mix(in srgb, #10b981 35%, var(--gray-200, #e2e8f0));
  background-color: color-mix(in srgb, #10b981 8%, var(--surface-color, #fff));
}

.site-toast--success .site-toast__icon {
  color: #10b981;
}

.site-toast--warning {
  border-color: color-mix(in srgb, var(--accent-color, #f59e0b) 35%, var(--gray-200, #e2e8f0));
  background-color: color-mix(in srgb, var(--accent-color, #f59e0b) 8%, var(--surface-color, #fff));
}

.site-toast--warning .site-toast__icon {
  color: var(--accent-color, #f59e0b);
}

.site-toast--danger {
  border-color: color-mix(in srgb, #ef4444 35%, var(--gray-200, #e2e8f0));
  background-color: color-mix(in srgb, #ef4444 8%, var(--surface-color, #fff));
}

.site-toast--danger .site-toast__icon {
  color: #ef4444;
}

.site-toast__icon {
  flex-shrink: 0;
  font-size: 1.125rem;
}

.site-toast__message {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.site-toast__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--gray-500, #64748b);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-toast__close:hover,
.site-toast__close:focus-visible {
  color: var(--gray-700, #334155);
  background-color: color-mix(in srgb, var(--gray-900, #0f172a) 6%, transparent);
}
