/* ── Design tokens ── */
:root {
  --vb-navy:      #0a2647;
  --vb-primary:   #0f3d73;
  --vb-mid:       #18579f;
  --vb-accent:    #2f78c7;
  --vb-light:     #e8f2ff;
  --vb-soft:      #f4f9ff;
  --vb-border:    #cddff4;
  --vb-ink:       #0d1f3c;
  --vb-muted:     #4b5a72;
  --vb-white:     #ffffff;
  --vb-radius:    12px;
  --vb-shadow:    0 8px 32px rgba(15, 61, 115, 0.10);
}

/* ── Page-level background ── */
.vb-page-wrap {
  background: var(--vb-soft);
  padding: 40px 20px 60px;
}

/* ── Form shell ── */
.vb-form-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--vb-ink);
}

/* ── Lead paragraph ── */
.vb-lead {
  max-width: 820px;
  color: var(--vb-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 32px;
}

/* ── Section card ── */
.vb-form-section {
  background: var(--vb-white);
  border-radius: 18px;
  border: 1px solid var(--vb-border);
  box-shadow: var(--vb-shadow);
  padding: 30px 32px 26px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.vb-form-section:hover {
  box-shadow: 0 12px 40px rgba(15, 61, 115, 0.14);
}

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

/* Left accent line on section card */
.vb-form-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--vb-accent), var(--vb-mid));
  border-radius: 18px 0 0 18px;
}

/* ── Section heading ── */
.vb-form-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--vb-primary);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

/* Section number badge extracted from the heading text */
.vb-form-section h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vb-accent);
  flex-shrink: 0;
}

/* ── Field grid ── */
.vb-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

/* ── Individual field ── */
.vb-field {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

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

/* ── Labels ── */
.vb-field label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vb-muted);
  margin-bottom: 6px;
  transition: color 0.2s ease;
}

.vb-field:focus-within label {
  color: var(--vb-accent);
}

/* ── Inputs / selects / textareas ── */
.vb-field input,
.vb-field select,
.vb-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  border: 1.5px solid var(--vb-border);
  border-radius: var(--vb-radius);
  background: var(--vb-soft);
  color: var(--vb-ink);
  font: inherit;
  font-size: 0.92rem;
  box-sizing: border-box;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  -webkit-appearance: none;
  appearance: none;
}

/* Placeholder */
.vb-field input::placeholder,
.vb-field textarea::placeholder {
  color: #aab9cc;
  font-style: italic;
  font-size: 0.88rem;
}

/* Select arrow */
.vb-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232f78c7' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Textarea */
.vb-field textarea {
  min-height: 108px;
  resize: vertical;
  line-height: 1.6;
}

/* File input */
.vb-field input[type="file"] {
  padding: 12px;
  cursor: pointer;
  font-size: 0.85rem;
}

/* Restore native checkbox/radio — appearance:none breaks their checkmark */
.vb-field input[type="checkbox"],
.vb-field input[type="radio"],
.vb-check-grid input[type="checkbox"],
.vb-check-grid input[type="radio"] {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  width: 17px !important;
  height: 17px !important;
  min-height: unset !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 3px !important;
  background: none !important;
  box-shadow: none !important;
  flex-shrink: 0;
  accent-color: var(--vb-accent);
  cursor: pointer;
}

/* Focus */
.vb-field input:focus,
.vb-field select:focus,
.vb-field textarea:focus {
  outline: none;
  border-color: var(--vb-accent);
  background: var(--vb-white);
  box-shadow: 0 0 0 4px rgba(47, 120, 199, 0.13), 0 2px 8px rgba(15, 61, 115, 0.08);
}

.vb-field input[type="checkbox"]:focus,
.vb-field input[type="radio"]:focus {
  box-shadow: 0 0 0 3px rgba(47, 120, 199, 0.25) !important;
  outline: none !important;
}

/* Readonly / disabled */
.vb-field input[readonly],
.vb-field input:disabled {
  background: #eef4fb;
  color: var(--vb-muted);
  cursor: default;
  border-color: #d8e9f7;
}

/* ── Checkbox / radio grid ── */
.vb-check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.vb-check-grid label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1.5px solid var(--vb-border);
  border-radius: var(--vb-radius);
  background: var(--vb-soft);
  color: var(--vb-ink);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.vb-check-grid label:hover {
  border-color: var(--vb-accent);
  background: var(--vb-light);
  box-shadow: 0 2px 8px rgba(47, 120, 199, 0.12);
}

.vb-check-grid input[type="checkbox"],
.vb-check-grid input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: unset;
  flex-shrink: 0;
  accent-color: var(--vb-accent);
  border-radius: 4px;
}

/* ── Submit / actions ── */
.vb-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--vb-border);
}

.vb-submit {
  min-height: 50px;
  padding: 13px 36px;
  border: none;
  border-radius: var(--vb-radius);
  color: var(--vb-white);
  background: linear-gradient(90deg, var(--vb-navy) 0%, var(--vb-accent) 100%);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 16px rgba(15, 61, 115, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.vb-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s ease;
}

.vb-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 61, 115, 0.34);
}

.vb-submit:hover::after {
  background: rgba(255,255,255,0.06);
}

.vb-submit:active {
  transform: translateY(0);
}

.vb-submit:focus {
  outline: 3px solid rgba(47, 120, 199, 0.4);
  outline-offset: 3px;
}

/* ── Alert messages ── */
.vb-alert {
  padding: 14px 18px;
  margin: 0 0 24px;
  border-radius: var(--vb-radius);
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vb-alert--success {
  color: #0e5e42;
  background: #e8f8ef;
  border: 1px solid #bfe8ce;
}

.vb-alert--error {
  color: #84242e;
  background: #fff0f1;
  border: 1px solid #f0c5cc;
}

/* ── Gallery grid ── */
.vb-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.vb-gallery-item {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--vb-border);
  border-radius: 16px;
  background: var(--vb-white);
  box-shadow: 0 6px 24px rgba(15, 61, 115, 0.09);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vb-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(15, 61, 115, 0.16);
}

.vb-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.vb-gallery-item:hover img {
  transform: scale(1.04);
}

.vb-gallery-item figcaption {
  padding: 12px 16px;
  color: var(--vb-muted);
  font-weight: 700;
  font-size: 0.85rem;
}

/* ── Contact layout ── */
.vb-contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}

.vb-contact-stack {
  display: grid;
  gap: 16px;
}

.vb-contact-box {
  padding: 22px 26px;
  border: 1.5px solid var(--vb-border);
  border-radius: 16px;
  background: var(--vb-white);
  box-shadow: 0 6px 24px rgba(15, 61, 115, 0.08);
  border-top: 3px solid var(--vb-accent);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.vb-contact-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 61, 115, 0.14);
}

.vb-contact-box h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--vb-primary);
  font-size: 1rem;
  font-weight: 700;
}

.vb-contact-box p {
  margin: 0;
  color: var(--vb-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Contact page polish */
.page-id-7 .vb-form-shell {
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  border: 1px solid #dbe9f9;
  border-radius: 20px;
  padding: 18px;
}

.page-id-7 .vb-form-grid {
  gap: 18px 18px;
}

.page-id-7 .vb-field input,
.page-id-7 .vb-field textarea {
  background: #ffffff;
  border-color: #cfe0f4;
}

.page-id-7 .vb-field input:focus,
.page-id-7 .vb-field textarea:focus {
  border-color: var(--vb-accent);
  box-shadow: 0 0 0 3px rgba(47, 120, 199, 0.15);
}

.page-id-7 .vb-form-actions {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #dbe9f9;
}

.page-id-7 .vb-submit {
  min-width: 180px;
  border-radius: 10px;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .vb-form-section {
    padding: 22px 18px 18px;
  }

  .vb-form-grid,
  .vb-contact-layout {
    grid-template-columns: 1fr;
  }

  .vb-check-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .vb-gallery-grid {
    grid-template-columns: 1fr;
  }

  .vb-submit {
    width: 100%;
    justify-content: center;
  }
}

/* ── Patient Search Bar ── */
.vb-search-bar {
  background: linear-gradient(180deg, #fbfdff 0%, #f1f7ff 100%);
  border: 1px solid #d8e7f9;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(15, 61, 115, 0.08);
}

.vb-search-bar__header {
  margin-bottom: 10px;
}

.vb-search-bar__title {
  margin: 0 0 3px;
  color: var(--vb-primary);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.2;
}

.vb-search-bar__help {
  margin: 0;
  color: #5c6f88;
  font-size: 0.82rem;
  line-height: 1.45;
}

.vb-search-bar__inner {
  display: flex;
  align-items: stretch;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #d7e6f7;
  border-radius: 10px;
  padding: 5px;
}

.vb-search-bar__icon {
  font-size: 1rem;
  color: #7d93ae;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-left: 8px;
}

.vb-search-bar__input {
  flex: 1 1 auto;
  padding: 10px 12px !important;
  border: none !important;
  border-radius: 7px !important;
  font-size: 0.9rem !important;
  color: var(--vb-ink) !important;
  background: #ffffff !important;
  outline: none !important;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: unset !important;
  box-shadow: none !important;
}

.vb-search-bar__input:focus {
  box-shadow: inset 0 0 0 1px #2f78c7, 0 0 0 2px rgba(47, 120, 199, 0.08) !important;
}

.vb-search-bar__input::placeholder {
  color: #9cb0c6 !important;
  opacity: 1;
}

.vb-search-bar__btn {
  flex-shrink: 0;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--vb-primary), var(--vb-accent));
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}

.vb-search-bar__btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 61, 115, 0.22);
}

.vb-search-bar__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Status messages */
.vb-search-status {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 500;
}

.vb-search-status--info {
  background: #e8f2ff;
  color: var(--vb-primary);
  border-left: 4px solid var(--vb-accent);
}

.vb-search-status--found {
  background: #e6f9f0;
  color: #0d5c32;
  border-left: 4px solid #22a85c;
}

.vb-search-status--notfound {
  background: #fff3f3;
  color: #a02020;
  border-left: 4px solid #e05252;
}

.vb-search-status--warn {
  background: #fff8e6;
  color: #7a5300;
  border-left: 4px solid #f0a800;
}

/* Edit mode banner */
.vb-edit-banner {
  background: linear-gradient(90deg, #e6f9f0 0%, #d0f5e4 100%);
  border: 1.5px solid #22a85c;
  border-radius: var(--vb-radius);
  padding: 14px 20px;
  margin-bottom: 16px;
  font-size: 0.92rem;
  font-weight: 500;
  color: #0d5c32;
  display: flex;
  align-items: center;
  gap: 12px;
}

.vb-clear-btn {
  margin-left: auto;
  background: transparent;
  border: 1.5px solid #22a85c;
  color: #0d5c32;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.vb-clear-btn:hover {
  background: #22a85c;
  color: #fff;
}

@media (max-width: 640px) {
  .vb-search-bar {
    padding: 14px;
  }

  .vb-search-bar__inner {
    flex-wrap: wrap;
    padding: 6px;
  }

  .vb-search-bar__icon {
    display: none;
  }

  .vb-search-bar__input {
    width: 100%;
    padding: 11px 12px !important;
    box-shadow: inset 0 0 0 1px #d7e6f7 !important;
  }

  .vb-search-bar__btn {
    width: 100%;
    text-align: center;
    padding: 11px 14px;
  }
}

/* ── Gutenberg shortcode preview cards (editor only) ── */
.editor-styles-wrapper .wp-block-shortcode {
  position: relative;
}

.editor-styles-wrapper .vb-shortcode-preview {
  margin-top: 12px;
  border: 1px solid var(--vb-border);
  border-left: 4px solid var(--vb-accent);
  border-radius: 10px;
  background: linear-gradient(180deg, #f9fcff 0%, #eef6ff 100%);
  padding: 12px 14px;
  box-shadow: 0 3px 12px rgba(15, 61, 115, 0.08);
}

.editor-styles-wrapper .vb-shortcode-preview__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--vb-primary);
  margin-bottom: 4px;
}

.editor-styles-wrapper .vb-shortcode-preview__desc {
  font-size: 12px;
  color: var(--vb-muted);
  line-height: 1.5;
  margin-bottom: 6px;
}

.editor-styles-wrapper .vb-shortcode-preview__code {
  font-size: 11px;
  color: #1b365d;
  background: #e4efff;
  border: 1px solid #cddff4;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-block;
}
