.rpb-browser,
.rpb-browser * {
  box-sizing: border-box;
}

.rpb-browser {
  --rpb-primary: #0263CB;
  --rpb-hover: #6FA53A;
  --rpb-active: #F57C00;
  --rpb-blue: var(--rpb-primary);
  --rpb-navy: #0d2350;
  --rpb-orange: var(--rpb-primary);
  --rpb-green: var(--rpb-hover);
  --rpb-border: #e4ebf4;
  --rpb-panel-bg: #ffffff;
  --rpb-card-bg: #fbfcfe;
  --rpb-muted: #7b879b;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: clamp(28px, 4vw, 64px);
  width: 100%;
  align-items: start;
  color: #172033;
}

.rpb-main-column {
  min-width: 0;
}

.rpb-status {
  min-height: 1px;
  margin: 0 0 10px;
  color: var(--rpb-muted);
  font-size: 14px;
}

.rpb-results {
  display: grid;
  gap: 20px;
  transition: opacity 180ms ease;
}

.rpb-browser.is-loading .rpb-results,
.rpb-browser.is-loading .rpb-pagination-wrap {
  opacity: 0.48;
  pointer-events: none;
}

.rpb-post-card {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  background: var(--rpb-card-bg);
  border: 1px solid var(--rpb-border);
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(22, 50, 90, 0.035);
}

.rpb-post-image {
  position: relative;
  display: block;
  min-height: 190px;
  height: 100%;
  overflow: hidden;
  background: #eaf1f9;
}

.rpb-post-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: cover;
  transition: transform 300ms ease;
}

.rpb-post-card:hover .rpb-post-image img {
  transform: scale(1.025);
}

.rpb-image-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  color: #a8b8ca;
  background: linear-gradient(135deg, #edf4fa, #dbe8f4);
}

.rpb-image-placeholder svg {
  width: 54px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.rpb-post-content {
  align-self: center;
  padding: clamp(16px, 2vw, 24px);
}

.rpb-post-title {
  margin: 0 0 7px;
  font-size: clamp(20px, 1.45vw, 25px);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.rpb-post-title a {
  color: var(--rpb-blue);
  text-decoration: none;
}

.rpb-post-title a:hover,
.rpb-post-title a:focus-visible {
  color: var(--rpb-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.rpb-post-date {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  color: #8b96a7;
  font-size: 13px;
}

.rpb-post-date svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.rpb-post-excerpt {
  margin: 0 0 11px;
  color: #202a3d;
  font-size: 15px;
  line-height: 1.5;
}

.rpb-read-more {
  display: inline-block;
  color: var(--rpb-orange);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.rpb-read-more:hover,
.rpb-read-more:focus-visible {
  color: var(--rpb-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.rpb-sidebar {
  display: grid;
  gap: 28px;
  position: sticky;
  top: 28px;
}

.admin-bar .rpb-sidebar {
  top: 60px;
}

.rpb-panel {
  padding: 30px;
  background: var(--rpb-panel-bg);
  border: 1px solid var(--rpb-border);
  border-radius: 22px;
  box-shadow: 0 12px 35px rgba(22, 50, 90, 0.035);
}

.rpb-panel-title {
  margin: 0 0 22px;
  color: var(--rpb-navy);
  font-size: 23px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.rpb-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  min-height: 60px;
}

.rpb-search-input {
  width: 100%;
  min-width: 0;
  min-height: 60px;
  padding: 0 18px;
  color: #172033;
  background: #fff;
  border: 1px solid #dce3ec;
  border-right: 0;
  border-radius: 14px 0 0 14px;
  outline: none;
  font: inherit;
  font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(20, 49, 91, 0.025);
}

.rpb-search-input:focus {
  border-color: var(--rpb-blue);
  box-shadow: 0 0 0 3px rgba(2, 99, 203, 0.14);
}

.rpb-search-button {
  display: grid;
  place-items: center;
  min-height: 60px;
  padding: 0;
  color: #fff;
  background: var(--rpb-primary);
  border: 0;
  border-radius: 0 14px 14px 0;
  cursor: pointer;
  transition: background 160ms ease;
}

.rpb-search-button:hover,
.rpb-search-button:focus-visible {
  background: var(--rpb-hover);
}

.rpb-search-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.rpb-term-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rpb-term-list li + li {
  border-top: 1px solid #edf1f6;
}

.rpb-term-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 2px;
  color: #18243a;
  background: transparent;
  border: 0;
  text-align: left;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.rpb-term-button small {
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 23px;
  padding: 0 7px;
  color: #64748b;
  background: #f0f4f8;
  border-radius: 999px;
  font-size: 11px;
}

.rpb-term-button:hover,
.rpb-term-button:focus-visible {
  color: var(--rpb-hover);
}

.rpb-term-button.is-active {
  color: var(--rpb-active);
  font-weight: 650;
}

.rpb-term-button.is-active small {
  color: var(--rpb-active);
  background: rgba(245, 124, 0, 0.10);
}

.rpb-recent-list {
  display: grid;
  gap: 20px;
}

.rpb-recent-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.rpb-recent-thumb {
  display: block;
  width: 96px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e8eef5;
  border-radius: 13px;
}

.rpb-recent-thumb img,
.rpb-recent-placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.rpb-recent-placeholder {
  background: linear-gradient(135deg, #edf4fa, #dbe8f4);
}

.rpb-recent-content h4 {
  margin: 1px 0 8px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 650;
}

.rpb-recent-content h4 a {
  color: var(--rpb-navy);
  text-decoration: none;
}


.rpb-recent-content h4 a:hover,
.rpb-recent-content h4 a:focus-visible {
  color: var(--rpb-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rpb-recent-content time {
  color: #7d899b;
  font-size: 13px;
}

.rpb-empty {
  padding: 50px 28px;
  text-align: center;
  background: var(--rpb-card-bg);
  border: 1px dashed #cad5e2;
  border-radius: 14px;
}

.rpb-empty h3 {
  margin: 0 0 8px;
  color: var(--rpb-navy);
  font-size: 22px;
}

.rpb-empty p {
  margin: 0;
  color: var(--rpb-muted);
}

.rpb-pagination-wrap {
  margin-top: 30px;
  transition: opacity 180ms ease;
}

.rpb-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rpb-page-button {
  min-width: 42px;
  min-height: 42px;
  padding: 7px 12px;
  color: #183054;
  background: #fff;
  border: 1px solid #dce4ed;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.rpb-page-button:hover,
.rpb-page-button:focus-visible {
  color: #fff;
  background: var(--rpb-hover);
  border-color: var(--rpb-hover);
}

.rpb-page-button.is-current {
  color: #fff;
  background: var(--rpb-active);
  border-color: var(--rpb-active);
}

.rpb-page-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rpb-page-gap {
  padding: 0 3px;
  color: #8792a4;
}

.rpb-admin-error {
  padding: 14px 16px;
  border-left: 4px solid #d63638;
  background: #fff;
}


/* Keep labels visible even when the active theme applies global button/link styles. */
.rpb-browser .rpb-post-title a,
.rpb-browser .rpb-read-more,
.rpb-browser .rpb-recent-content h4 a {
  color: var(--rpb-primary) !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-indent: 0 !important;
}

.rpb-browser .rpb-post-title a:hover,
.rpb-browser .rpb-post-title a:focus-visible,
.rpb-browser .rpb-read-more:hover,
.rpb-browser .rpb-read-more:focus-visible,
.rpb-browser .rpb-recent-content h4 a:hover,
.rpb-browser .rpb-recent-content h4 a:focus-visible {
  color: var(--rpb-hover) !important;
}

.rpb-browser button.rpb-term-button,
.rpb-browser button.rpb-page-button,
.rpb-browser button.rpb-search-button {
  font-family: inherit !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-indent: 0 !important;
}

.rpb-browser .rpb-term-name,
.rpb-browser .rpb-page-label {
  display: inline !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-indent: 0 !important;
}

.rpb-browser button.rpb-term-button:hover,
.rpb-browser button.rpb-term-button:focus-visible {
  color: var(--rpb-hover) !important;
  background: transparent !important;
}

.rpb-browser button.rpb-term-button.is-active,
.rpb-browser button.rpb-term-button.is-active:hover,
.rpb-browser button.rpb-term-button.is-active:focus-visible {
  color: var(--rpb-active) !important;
  background: transparent !important;
}

.rpb-browser button.rpb-term-button.is-active small {
  color: var(--rpb-active) !important;
  background: rgba(245, 124, 0, 0.10) !important;
}

.rpb-browser button.rpb-search-button {
  color: #fff !important;
  background: var(--rpb-primary) !important;
}

.rpb-browser button.rpb-search-button:hover,
.rpb-browser button.rpb-search-button:focus-visible {
  color: #fff !important;
  background: var(--rpb-hover) !important;
}

.rpb-browser button.rpb-page-button:hover,
.rpb-browser button.rpb-page-button:focus-visible {
  color: #fff !important;
  background: var(--rpb-hover) !important;
  border-color: var(--rpb-hover) !important;
}

.rpb-browser button.rpb-page-button.is-current {
  color: #fff !important;
  background: var(--rpb-active) !important;
  border-color: var(--rpb-active) !important;
}

@media (max-width: 1050px) {
  .rpb-browser {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 30px;
  }

  .rpb-post-card {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .rpb-panel {
    padding: 24px;
  }
}

@media (max-width: 850px) {
  .rpb-browser {
    grid-template-columns: 1fr;
  }

  .rpb-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rpb-recent-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .rpb-post-card {
    grid-template-columns: 1fr;
  }

  .rpb-post-image {
    height: 220px;
    min-height: 220px;
    max-height: 220px;
  }

  .rpb-post-image img,
  .rpb-image-placeholder {
    min-height: 0;
    max-height: none;
  }

  .rpb-post-content {
    padding: 18px;
  }

  .rpb-sidebar {
    grid-template-columns: 1fr;
  }

  .rpb-recent-panel {
    grid-column: auto;
  }

  .rpb-panel {
    padding: 22px;
    border-radius: 16px;
  }
}

@media (max-width: 420px) {
  .rpb-recent-item {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .rpb-recent-thumb {
    width: 78px;
  }

  .rpb-page-button.rpb-prev,
  .rpb-page-button.rpb-next {
    width: 100%;
  }
}

/* v1.4.1 — Pagination palette + theme override protection.
 * Normal:   primary #0263CB on white
 * Current:  white on active #F57C00
 * Hover:    white on #6FA53A
 */
.rpb-browser .rpb-pagination button.rpb-page-button {
  color: #0263CB !important;
  -webkit-text-fill-color: #0263CB !important;
  background: #ffffff !important;
  border-color: #d8e5f5 !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

.rpb-browser .rpb-pagination button.rpb-page-button .rpb-page-label {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.rpb-browser .rpb-pagination button.rpb-page-button:hover,
.rpb-browser .rpb-pagination button.rpb-page-button:focus-visible {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #6FA53A !important;
  border-color: #6FA53A !important;
}

.rpb-browser .rpb-pagination button.rpb-page-button.is-current,
.rpb-browser .rpb-pagination button.rpb-page-button[aria-current="page"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #F57C00 !important;
  border-color: #F57C00 !important;
  font-weight: 600 !important;
}

.rpb-browser .rpb-pagination button.rpb-page-button.is-current:hover,
.rpb-browser .rpb-pagination button.rpb-page-button.is-current:focus-visible,
.rpb-browser .rpb-pagination button.rpb-page-button[aria-current="page"]:hover,
.rpb-browser .rpb-pagination button.rpb-page-button[aria-current="page"]:focus-visible {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #F57C00 !important;
  border-color: #F57C00 !important;
}

.rpb-browser .rpb-pagination button.rpb-page-button:disabled {
  color: #9aa7b8 !important;
  -webkit-text-fill-color: #9aa7b8 !important;
  background: #f7f9fc !important;
  border-color: #e4eaf1 !important;
  opacity: 0.7 !important;
  cursor: not-allowed !important;
}

.rpb-browser .rpb-pagination button.rpb-page-button:disabled:hover,
.rpb-browser .rpb-pagination button.rpb-page-button:disabled:focus-visible {
  color: #9aa7b8 !important;
  -webkit-text-fill-color: #9aa7b8 !important;
  background: #f7f9fc !important;
  border-color: #e4eaf1 !important;
}

.rpb-browser .rpb-pagination .rpb-page-gap {
  color: #7b879b !important;
  -webkit-text-fill-color: #7b879b !important;
}
