.gbpa-gcf-wrap {
  max-width: 820px;
  margin: 1.5rem 0;
}

.gbpa-gcf {
  position: relative;
  border: 2px solid #110f7c;
  border-radius: 10px;
  padding: 2em 1.5em;
  box-shadow: 0 4px 16px rgba(17,15,124,.10);
}

.gbpa-gcf-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #110f7c;
  color: #fff;
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
}

.gbpa-gcf h1 {
  font-size: 1.3em;
  font-weight: 700;
  text-align: center;
  color: #110f7c;
  margin: 0.5em 0 0.75em;
}

.gbpa-gcf-label {
  display: block;
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 8px;
}

/* Honeypot field - hidden from users, visible to bots */
.gbpa-gcf-trap {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

.gbpa-gcf-input {
  width: 100%;
  font-size: 18px;
  font-family: inherit;
  padding: 14px 14px;
  padding-right: 180px; /* Space for submit button only */
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,0.2);
  background: var(--gbpa-gcf-primary-bg, #eef1f4);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gbpa-gcf-input:focus {
  outline: none;
  border-color: #219D77;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(33,157,119,0.1), 0 2px 4px rgba(0,0,0,0.08);
}

/* Smaller, modern placeholder copy */
.gbpa-gcf-input::placeholder{
  font-size: 0.92em;
  opacity: 0.7;
}

.gbpa-gcf-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
  margin-bottom: 10px;
}

.gbpa-gcf-status {
  font-size: 13px;
  opacity: 0.75;
}


/* Theme hardening: prevent the clear button from becoming a full-width overlay */



.gbpa-gcf-results {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--gbpa-gcf-results-bg, #f7f7f7);
  border: 1px solid rgba(0,0,0,0.06);
}

/* "Results for ..." line under the search input */
.gbpa-gcf-current{
  margin-top: 8px;
  margin-bottom: 2px;
  font-size: 13px;
  opacity: 0.85;
}

.gbpa-gcf-current strong{
  font-weight: 600;
}

.gbpa-gcf-section + .gbpa-gcf-section {
  margin-top: 14px;
}

.gbpa-gcf-no-exact-match {
  margin: 0 0 14px 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #5a5a5a;
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
  border-left: 3px solid rgba(0,0,0,0.15);
}

.gbpa-gcf-section-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  opacity: 0.9;
  margin: 2px 0 8px 2px;
}

.gbpa-gcf-section-body {
  display: grid;
  gap: 20px;
}

.gbpa-gcf-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 10px;
  background: rgba(255,255,255,0.65);
}

.gbpa-gcf-result.gbpa-gcf-primary{
  background: var(--gbpa-gcf-results-bg, #f7f7f7);
  border-color: rgba(0,0,0,0.12);
}

.gbpa-gcf-result.is-active {
  outline: 2px solid rgba(0,0,0,0.25);
}

.gbpa-gcf-name {
  font-size: 18px;
  line-height: 1.25;
}

.gbpa-gcf-result.gbpa-gcf-primary .gbpa-gcf-name{
  font-size: 20px;
  font-weight: 600;
}

.gbpa-gcf-related-link {
  color: inherit;
  text-decoration: none;
}

/* Make related rows feel modern-clickable (no old-school underline) */
.gbpa-gcf-result:not(.gbpa-gcf-primary){
  cursor: pointer;
}

.gbpa-gcf-result:not(.gbpa-gcf-primary):hover{
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.14);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

/* Permanent diagonal arrow on related categories */
.gbpa-gcf-result:not(.gbpa-gcf-primary) .gbpa-gcf-name::after{
  content: "\2197";
  display: inline-block;
  margin-left: 8px;
  opacity: 0.6;
  font-size: 0.85em;
}

.gbpa-gcf-related-link:focus{
  outline: none;
}

.gbpa-gcf-result:not(.gbpa-gcf-primary):focus-within{
  outline: 2px solid rgba(0,0,0,0.18);
}

/* Back/Forward navigation under related categories */
.gbpa-gcf-nav{
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

.gbpa-gcf-nav-btn{
  font-size: 13px;
  padding: 8px 12px;
}

.gbpa-gcf-nav-btn[disabled]{
  opacity: 0.5;
  cursor: not-allowed;
}

.gbpa-gcf-copy {
  /* Visual styling comes from .gbpa-action-btn (keeps layout consistent).
     This class only provides small, component-specific behavior. */
  white-space: nowrap;
}

/* The clear (X) button and copy buttons are also .gbpa-action-btn.
   Prevent any theme / earlier rules from making them full-width.
   (A full-width icon button creates the "big green bar" overlay.) */
.gbpa-gcf .gbpa-clear-btn.gbpa-action-btn,
.gbpa-gcf .gbpa-gcf-copy.gbpa-action-btn{
  width: auto;
  min-width: unset;
}

.gbpa-gcf-name mark {
  padding: 0 2px;
  border-radius: 4px;
}

.gbpa-gcf-footnote {
  margin-top: 10px;
  font-size: 13px;
  opacity: 0.75;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}


/* (v2) No headings inside results; results are the destination. */


/* Ensure highlighted segments don't create visible gaps inside compound words (theme mark padding can look like spaces) */
.gbpa-gcf .gbpa-gcf-name mark{
  padding: 0 !important;
  margin: 0 !important;
  display: inline !important;
}


/* 1.4.3 UI button helpers (can be overridden in theme CSS) */
.gbpa-gcf .gbpa-action-btn{
  background-color:#110f7c;
  color:#fff;
  border:none;
  border-radius:6px;
  cursor:pointer;
  transition:background-color .15s ease, box-shadow .15s ease;
}
.gbpa-gcf .gbpa-action-btn:hover{ background-color:#0d0b5e; }
.gbpa-gcf .gbpa-action-btn:focus{ outline:none; box-shadow:0 0 0 2px rgba(17,15,124,.3); }
.gbpa-gcf .gbpa-action-btn--icon{ border-radius:999px; padding:6px 10px; font-size:13px; }
.gbpa-search-wrapper{ position:relative; }
.gbpa-gcf-turnstile-row{ display:flex; justify-content:flex-end; margin-top:8px; }
.gbpa-gcf-submit{ 
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.gbpa-clear-btn{ 
  position:absolute;
  top:50%;
  right:180px; /* Left of the submit button */
  transform:translateY(-50%);
  height:28px;
  min-width:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

/* Mobile: button below input for easier thumb reach */
@media (max-width: 600px) {
  .gbpa-gcf-input {
    padding-right: 44px; /* Just space for clear X */
  }
  .gbpa-gcf-submit {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 10px;
    padding: 12px 16px;
  }
  .gbpa-clear-btn {
    right: 8px; /* Back to normal position when button is below */
  }
}
.gbpa-copy-wrap{ display:inline-flex; align-items:center; gap:8px; }
.gbpa-copied-hint{ font-size:12px; opacity:0; transform:translateY(-2px); transition:opacity .15s ease, transform .15s ease; user-select:none; pointer-events:none; }
.gbpa-copied-hint.is-visible{ opacity:1; transform:translateY(0); }


@media (min-width: 740px) {
  /* Keep the related categories laid out like the old results grid (2 cols on desktop). */
  .gbpa-gcf-section-related .gbpa-gcf-section-body,
  .gbpa-gcf-section-hub .gbpa-gcf-section-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gbpa-gcf-showmore-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

/* Hub links section */
.gbpa-gcf-hub-links {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid rgba(0,0,0,0.1);
}

.gbpa-gcf-hub-showmore {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.gbpa-gcf-hub-showmore-btn {
  padding: 10px 20px;
  font-size: 14px;
}

.gbpa-gcf-hub-path {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 10px;
  color: #222;
}

.gbpa-gcf-hub-path span {
  font-weight: 700;
}

.gbpa-gcf-hub-link {
  color: #219D77;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.gbpa-gcf-hub-link:hover {
  border-bottom-color: #219D77;
}

.gbpa-gcf-hub-separator {
  opacity: 0.5;
  margin: 0 4px;
}

/* Flag button - icon only at far right of footnote */
.gbpa-gcf-flag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 20px;
  height: 20px;
  background: transparent;
  color: #c0392b;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.gbpa-gcf-flag-btn svg {
  display: block;
  flex-shrink: 0;
}

.gbpa-gcf-flag-btn:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.gbpa-gcf-flag-btn:focus {
  outline: none;
  opacity: 0.7;
}

.gbpa-gcf-results {
  position: relative;
}

/* Flag modal */
.gbpa-gcf-flag-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.gbpa-gcf-flag-content {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.gbpa-gcf-flag-header {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #222;
}

.gbpa-gcf-flag-keyphrase {
  font-weight: 700;
  color: #219D77;
}

.gbpa-gcf-flag-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 16px;
}

.gbpa-gcf-flag-textarea:focus {
  outline: none;
  border-color: #219D77;
  box-shadow: 0 0 0 3px rgba(33, 157, 119, 0.1);
}

.gbpa-gcf-flag-char-count {
  font-size: 12px;
  color: #666;
  margin-bottom: 16px;
}

.gbpa-gcf-flag-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.gbpa-gcf-flag-cancel {
  padding: 10px 20px;
  background: #e0e0e0;
  color: #333;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.gbpa-gcf-flag-cancel:hover {
  background: #d0d0d0;
}

.gbpa-gcf-flag-submit {
  padding: 10px 20px;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.gbpa-gcf-flag-submit:hover {
  background: #a93226;
}

.gbpa-gcf-flag-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

