.griffinforms-block-editor .gf-bp-wrapper {
  padding: 0;
  background: transparent;
}

.griffinforms-block-editor .gf-bp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.griffinforms-block-editor .gf-bp-title {
  font-weight: 700;
  font-size: 14px;
}

.griffinforms-block-editor .gf-bp-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
}

.griffinforms-block-editor .gf-bp-nav {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.griffinforms-block-editor .gf-bp-page-indicator {
  font-size: 13px;
  color: #444;
}

.griffinforms-block-editor .gf-bp-preview .griffinforms-block-preview {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
  max-width: 100%;
  overflow: visible;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-heading {
  margin-bottom: 4px;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-desc {
  color: #555;
  font-size: 13px;
  margin-bottom: 12px;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-page {
  margin-bottom: 12px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  display: block !important;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-page-body {
  display: block !important;
  width: 100%;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-page-title {
  margin-bottom: 6px;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-page-desc {
  color: #666;
  font-size: 12px;
  margin-bottom: 6px;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-row {
  margin-bottom: 8px;
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100%;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-row-heading {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
  grid-column: 1 / -1;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-row-desc {
  color: #777;
  font-size: 12px;
  margin-bottom: 4px;
  grid-column: 1 / -1;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-field {
  margin-bottom: 8px;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 2px;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-required {
  color: #d9534f;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-control {
  width: 100%;
  max-width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  background: #fcfcfc;
  box-sizing: border-box;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-select {
  min-height: 38px;
  max-width: 100% !important;
  background-color: #fcfcfc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpolyline points='2,4 6,8 10,4' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 10px) 50%;
  background-size: 12px 12px;
  padding-right: 28px;
  -webkit-appearance: none;
  appearance: none;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-select::-ms-expand {
    display: none;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-address .gf-bp-select {
  min-height: unset;
}

/* Phone field preview: join select + input */
.griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group .gf-bp-phone-select.gf-bp-control[data-gf-style-group="block-preview"][data-gf-style-type="select_input"] {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group .gf-bp-phone-input.gf-bp-control[data-gf-style-group="block-preview"][data-gf-style-type="text_input"] {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group {
    gap: 0 !important;
    align-items: stretch;
}

/* Remove visible seam between select and input */
.griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group .gf-bp-phone-input.gf-bp-control {
    margin-left: -1px !important;
}

.griffinforms-block-editor .griffinforms-block-preview.gf-bp-no-theme .gf-bp-phone-group .gf-bp-phone-input.gf-bp-control {
    margin-left: 0 !important;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group .gf-bp-phone-select.gf-bp-control {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: var(--gf-phone-caret-image, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpolyline points='2,4 6,8 10,4' fill='none' stroke='%236c757d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")) !important;
    background-position: calc(100% - 14px) 50% !important;
    background-size: 12px 12px !important;
    background-repeat: no-repeat !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding-right: 44px !important;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group .gf-bp-phone-select.gf-bp-control[data-gf-phone-display-mode="flag_code_name"] {
    flex: 0 0 35% !important;
    width: 35% !important;
    min-width: 140px !important;
    max-width: 220px !important;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group .gf-bp-phone-select.gf-bp-control[data-gf-phone-display-mode="flag_code"] {
    flex: 0 0 28% !important;
    width: 28% !important;
    min-width: 120px !important;
    max-width: 180px !important;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group .gf-bp-phone-select.gf-bp-control[data-gf-phone-display-mode="code_only"] {
    flex: 0 0 16% !important;
    width: 16% !important;
    min-width: 76px !important;
    max-width: 110px !important;
}

.griffinforms-block-editor .griffinforms-block-preview.gf-xs .gf-bp-phone-group .gf-bp-phone-select.gf-bp-control[data-gf-phone-display-mode="code_only"],
.griffinforms-block-editor .griffinforms-block-preview.gf-sm .gf-bp-phone-group .gf-bp-phone-select.gf-bp-control[data-gf-phone-display-mode="code_only"] {
    background-image: none !important;
    padding-right: 12px !important;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-textarea {
  min-height: 60px;
  resize: vertical;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-options {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #555;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-options-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-right: 12px;
  flex: 0 0 auto;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-options-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-row .gf-bp-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-radio,
.griffinforms-block-editor .griffinforms-block-preview .gf-bp-checkbox {
  width: 14px;
  height: 14px;
  border: 1px solid #999;
  display: inline-block;
  border-radius: 50%;
  background: #f9f9f9;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-checkbox {
  border-radius: 2px;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-help {
  color: #777;
  font-size: 12px;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-description {
  color: #666;
  font-size: 12px;
  margin-bottom: 2px;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-submit {
  margin-top: 12px;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-submit-btn {
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  font-weight: 600;
}

.griffinforms-block-editor .gf-bp-nav {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  grid-column: 1 / -1;
}

.griffinforms-block-editor .gf-bp-nav .gf-bp-nav-btn {
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  font-weight: 600;
}

.griffinforms-block-editor .gf-bp-nav .gf-bp-nav-next,
.griffinforms-block-editor .gf-bp-nav .gf-bp-nav-submit {
  margin-left: auto;
}

/* No-theme Gutenberg preview button parity with frontend defaults */
.griffinforms-block-editor .griffinforms-block-preview.gf-bp-no-theme .gf-bp-submit-btn,
.griffinforms-block-editor .griffinforms-block-preview.gf-bp-no-theme .gf-bp-nav .gf-bp-nav-btn {
  color: #fff;
  border: 1px solid transparent;
}

.griffinforms-block-editor .griffinforms-block-preview.gf-bp-no-theme .gf-bp-nav .gf-bp-nav-prev {
  background-color: #212529;
  border-color: #212529;
}

.griffinforms-block-editor .griffinforms-block-preview.gf-bp-no-theme .gf-bp-submit-btn.gf-bp-nav-next,
.griffinforms-block-editor .griffinforms-block-preview.gf-bp-no-theme .gf-bp-submit-btn.gf-bp-nav-submit {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

/* Progress bar in block preview */
.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar {
  margin-bottom: 1rem;
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar__track {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding-top: 0.25rem;
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar__connector-segment {
  flex: 1;
  height: 2px;
  background: var(--gf-progress-bar-muted, #6c757d);
  margin-top: calc(1rem - 1px);
  align-self: auto;
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar__connector-segment[data-gf-progress-state="complete"] {
  background: var(--gf-progress-bar-accent, #0d6efd);
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 2rem;
  width: 2rem;
  overflow: visible;
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar__marker {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--gf-progress-bar-muted, #6c757d);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar__step[data-gf-progress-state="active"] .griffinforms-progress-bar__marker,
.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar__step[data-gf-progress-state="complete"] .griffinforms-progress-bar__marker {
  background: var(--gf-progress-bar-accent, #0d6efd);
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar__marker-icon {
  font-family: 'Material Symbols Outlined' !important;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: normal;
  font-style: normal;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  -webkit-font-smoothing: antialiased;
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar__label {
  font-size: 0.7rem;
  text-align: center;
  color: var(--gf-progress-bar-muted, #6c757d);
  margin-top: 0.35rem;
  white-space: nowrap;
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar__step[data-gf-progress-state="active"] .griffinforms-progress-bar__label {
  color: var(--gf-progress-bar-accent, #0d6efd);
  font-weight: 600;
}

/* Tabs style */
.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar[data-gf-progress-style="tabs"] .griffinforms-progress-bar__track {
  gap: 0.4rem;
  align-items: stretch;
  padding-top: 0;
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar[data-gf-progress-style="tabs"] .griffinforms-progress-bar__step {
  flex: 1 1 0;
  width: auto;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  padding: 0.6rem 0.75rem;
  min-height: 2.5rem;
  background: #fff;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar[data-gf-progress-style="tabs"] .griffinforms-progress-bar__step[data-gf-progress-state="active"] {
  border-color: var(--gf-progress-bar-accent, #0d6efd);
  background: color-mix(in srgb, var(--gf-progress-bar-accent, #0d6efd) 10%, #fff);
  color: var(--gf-progress-bar-accent, #0d6efd);
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar[data-gf-progress-style="tabs"] .griffinforms-progress-bar__step[data-gf-progress-state="active"] .griffinforms-progress-bar__label {
  color: var(--gf-progress-bar-accent, #0d6efd);
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar[data-gf-progress-style="tabs"] .griffinforms-progress-bar__marker {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  margin-bottom: 0;
  background: var(--gf-progress-bar-muted, #6c757d);
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar[data-gf-progress-style="tabs"] .griffinforms-progress-bar__step[data-gf-progress-state="active"] .griffinforms-progress-bar__marker,
.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar[data-gf-progress-style="tabs"] .griffinforms-progress-bar__step[data-gf-progress-state="complete"] .griffinforms-progress-bar__marker {
  background: var(--gf-progress-bar-accent, #0d6efd);
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar[data-gf-progress-style="tabs"] .griffinforms-progress-bar__label {
  font-size: 0.7rem;
  margin-top: 0;
  color: var(--gf-progress-bar-muted, #6c757d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.griffinforms-block-editor .griffinforms-block-preview .griffinforms-progress-bar[data-gf-progress-style="tabs"] .griffinforms-progress-bar__connector-segment {
  display: none;
}

.griffinforms-block-editor .griffinforms-block-preview .gf-bp-truncated {
  margin-top: 12px;
  padding: 8px;
  border: 1px dashed #d9534f;
  color: #a94442;
  background: #fff5f5;
  font-size: 12px;
  border-radius: 4px;
}

.griffinforms-block-editor .gf-bp-placeholder {
  padding: 12px;
  border: 1px dashed #ccc;
  border-radius: 6px;
  background: #fafafa;
}

.griffinforms-block-editor .gf-bp-placeholder-title {
  font-weight: 600;
}

@media (max-width: 480px) {
  .griffinforms-block-editor .griffinforms-block-preview .gf-bp-row .gf-bp-col {
    grid-column: 1 / -1 !important;
  }

  .griffinforms-block-editor .griffinforms-block-preview .gf-bp-options-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .griffinforms-block-editor .griffinforms-block-preview .gf-bp-options-col {
    margin-right: 0;
  }

  .griffinforms-block-editor .griffinforms-block-preview .gf-bp-nav {
    flex-direction: column;
  }

  .griffinforms-block-editor .griffinforms-block-preview .gf-bp-nav .gf-bp-nav-btn {
    width: 100%;
  }

  .griffinforms-block-editor .griffinforms-block-preview .gf-bp-address .gf-bp-address-col {
    grid-column: 1 / -1 !important;
  }
}

.griffinforms-block-editor .griffinforms-block-preview.gf-xs .gf-bp-row .gf-bp-col {
  grid-column: 1 / -1 !important;
}

.griffinforms-block-editor .griffinforms-block-preview.gf-xs .gf-bp-options-wrap {
  flex-direction: column;
  align-items: stretch;
}

.griffinforms-block-editor .griffinforms-block-preview.gf-xs .gf-bp-options-col {
  margin-right: 0;
}

.griffinforms-block-editor .griffinforms-block-preview.gf-xs .gf-bp-nav {
  flex-direction: column;
}

.griffinforms-block-editor .griffinforms-block-preview.gf-xs .gf-bp-nav .gf-bp-nav-btn {
  width: 100%;
}

.griffinforms-block-editor .griffinforms-block-preview.gf-xs .gf-bp-address .gf-bp-address-col {
  grid-column: 1 / -1 !important;
}
