/* Hansabus – Contact Form 7 (elegant form)
   Add in: Appearance → Customize → Additional CSS
   Or enqueue this file in your theme after Contact Form 7’s styles.
*/

.hbf {
  --hbf-brand: #d01f2a;
  --hbf-brand-dark: #b71b25;
  --hbf-text: #1e293b;
  --hbf-muted: #64748b;
  --hbf-border: #e2e8f0;
  --hbf-bg: #f8fafc;
  --hbf-radius: 12px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--hbf-text);
}

.hbf-card {
  background: #fff;
  border: 1px solid var(--hbf-border);
  border-radius: var(--hbf-radius);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.hbf-head {
  background: linear-gradient(135deg, var(--hbf-brand) 0%, var(--hbf-brand-dark) 100%);
  color: #fff;
  padding: 1.25rem 1.5rem;
}

.hbf-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hbf-head p {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  opacity: 0.92;
  line-height: 1.45;
}

.hbf-body {
  padding: 1.5rem;
  background: var(--hbf-bg);
}

.hbf-section {
  margin-bottom: 1.5rem;
}

.hbf-section:last-of-type {
  margin-bottom: 0;
}

.hbf-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hbf-muted);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hbf-border);
}

.hbf-grid {
  display: grid;
  gap: 1rem 1.25rem;
}

@media (min-width: 640px) {
  .hbf-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
  .hbf-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) and (min-width: 640px) {
  .hbf-grid--3 {
    grid-template-columns: 1fr 1fr;
  }
}

.hbf-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hbf-field--full {
  grid-column: 1 / -1;
}

.hbf-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hbf-text);
  line-height: 1.3;
}

.hbf-field label,
.hbf-field .hbf-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hbf-text);
  line-height: 1.3;
}

.hbf-field .hbf-hint {
  font-size: 0.75rem;
  color: var(--hbf-muted);
  font-weight: 400;
  margin: 0;
  line-height: 1.4;
}

.hbf .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.hbf input[type="text"],
.hbf input[type="email"],
.hbf input[type="tel"],
.hbf input[type="url"],
.hbf input[type="number"],
.hbf input[type="date"],
.hbf select,
.hbf textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.85rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--hbf-text);
  background: #fff;
  border: 1px solid var(--hbf-border);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hbf input:focus,
.hbf select:focus,
.hbf textarea:focus {
  outline: none;
  border-color: var(--hbf-brand);
  box-shadow: 0 0 0 3px rgba(208, 31, 42, 0.15);
}

.hbf textarea {
  min-height: 9rem;
  resize: vertical;
}

.hbf .wpcf7-not-valid-tip {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: block !important;
  color: #b91c1c;
  font-weight: 600;
}

.hbf-accept {
  margin-top: 0.5rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--hbf-border);
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.hbf-accept a {
  color: var(--hbf-brand);
  font-weight: 600;
  text-decoration: none;
}

.hbf-accept a:hover {
  text-decoration: underline;
  color: var(--hbf-brand-dark);
}

.hbf-submit-wrap {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hbf-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.hbf .wpcf7-submit,
.hbf input.wpcf7-submit[type="submit"] {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff !important;
  background: var(--hbf-brand) !important;
  border: none !important;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(208, 31, 42, 0.25);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.hbf .wpcf7-submit:hover,
.hbf input.wpcf7-submit[type="submit"]:hover {
  background: var(--hbf-brand-dark) !important;
  box-shadow: 0 4px 12px rgba(183, 27, 37, 0.3);
}

.hbf .wpcf7-submit:active {
  transform: translateY(1px);
}

.hbf .wpcf7-response-output {
  margin: 1rem 0 0 !important;
  padding: 0.75rem 1rem !important;
  border-radius: 8px !important;
  font-size: 0.875rem !important;
  border: 1px solid var(--hbf-border) !important;
  display: block !important;
  color: #334155;
  background: #fff;
}

.hbf .wpcf7 form.invalid .wpcf7-response-output,
.hbf .wpcf7 form.unaccepted .wpcf7-response-output,
.hbf .wpcf7 form.payment-required .wpcf7-response-output {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
}

.hbf .wpcf7 form.sent .wpcf7-response-output {
  border-color: #22c55e !important;
  background: #f0fdf4 !important;
  color: #166534 !important;
}

.hbf .wpcf7-not-valid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12) !important;
}

.hbf .wpcf7-spinner {
  margin: 0 0 0 0.5rem;
}

/* Checkbox / acceptance alignment */
.hbf-accept .wpcf7-list-item {
  margin: 0;
}

.hbf-accept input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--hbf-brand);
}
