/* Shared search-card pattern: videos, jobs and circuits. */
.kd-body #main-content .kd-search-card {
  --kd-search-surface: #14191e;
  --kd-search-input: #0d1116;
  padding: 1.25rem;
  border: 1px solid var(--kd-border);
  border-radius: 8px;
  background: var(--kd-search-surface) !important;
  color: var(--kd-text);
}
.kd-body .kd-search-card .kd-search-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}
.kd-body .kd-search-fields > * { width: auto; min-width: 0; }
.kd-body .kd-search-fields > .kd-search-query { grid-column: 1 / -1; }
.kd-body .kd-search-card .form-label {
  color: var(--kd-text);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
  margin-bottom: .5rem;
}
.kd-body .kd-search-card :is(.form-control, .form-select) {
  background-color: var(--kd-search-input);
  border-color: var(--kd-border);
  color: var(--kd-text);
  min-height: 3rem;
}
.kd-body .kd-search-card :is(.form-hint, .input-icon-addon) { color: var(--kd-muted); }
.kd-body .kd-search-card .btn-primary { min-height: 3rem; }
.kd-body .kd-search-card .kd-search-submit { margin-top: 0; align-self: start; margin-block-start: 1.8125rem; }
.kd-body .kd-search-card .kd-circuit-search-location { grid-column: 1 / 3; }
.kd-body .kd-search-card .kd-country-circuit-toolbar { margin-top: 1rem; margin-bottom: 0 !important; }
.kd-body .kd-search-card .kd-country-circuit-filter-fields {
  padding: 1rem 0 0;
  border: 0;
  border-top: 1px solid var(--kd-border);
  border-radius: 0;
  background: transparent;
}
@media (max-width: 767.98px) {
  .kd-body #main-content .kd-search-card { padding: 1rem; }
  .kd-body .kd-search-card .kd-search-fields { grid-template-columns: minmax(0, 1fr); }
  .kd-body .kd-search-card .kd-search-fields > * { grid-column: 1; }
  .kd-body .kd-search-card .kd-search-submit { margin: 0; width: 100%; }
}

.kd-body .kd-search-card .kd-search-actions { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; }
.kd-body .kd-search-card .btn-link { color:var(--kd-muted); }
.kd-body .kd-search-card .btn-link:is(:hover,:focus-visible) { color:var(--kd-text); }
@media(max-width:767.98px) { .kd-body .kd-search-actions .btn-primary { flex:1 0 100%; } }

/* Disclosure belongs to the form; results controls follow the entire card. */
.kd-body .kd-search-card .kd-country-circuit-filters { display:block; margin-top:1rem; }
.kd-body .kd-search-card .kd-country-circuit-filters > summary { border:0; padding:.25rem 0; color:var(--kd-muted); text-decoration:underline; text-underline-offset:.2em; }
.kd-body .kd-search-card .kd-country-circuit-filters > summary:is(:hover,:focus-visible) { color:var(--kd-text); }
.kd-body .kd-country-circuit-results .kd-search-results-toolbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.kd-body .kd-search-results-toolbar > nav { margin:0; }

/* Match the established account/login checkbox, including keyboard focus. */
.kd-body .kd-search-card .form-check-input {
  appearance:none;
  width:20px;
  height:20px;
  border:1px solid rgba(255,255,255,.4);
  border-radius:2px;
  background-color:rgba(255,255,255,.08);
  background-position:center;
  background-repeat:no-repeat;
  background-size:20px auto;
  cursor:pointer;
}
/* Selected state inherits the same global Kart rule as login. */
.kd-body .kd-search-card .form-check-input:focus-visible { outline: 2px solid var(--kd-yellow); outline-offset: 2px; }

.kd-body .kd-search-card .kd-search-disclosure > details > .kd-search-filter-link {
  display:list-item;
  list-style:disclosure-closed inside;
  width:fit-content;
  padding:.25rem 0;
  border:0;
  border-radius:0;
  background:none;
  box-shadow:none;
  text-decoration:none;
  cursor:pointer;
}
.kd-body .kd-search-card .kd-search-disclosure > details[open] > .kd-search-filter-link { list-style-type:disclosure-open; }
.kd-body .kd-search-card .kd-search-disclosure > details > .kd-search-filter-link::-webkit-details-marker { display:inline; }
.kd-body .kd-search-card .kd-search-disclosure > details > .kd-search-filter-link:hover { text-decoration:underline; }

.kd-body .kd-search-card .kd-search-region { grid-column:1 / 3; }
.kd-body .kd-search-disclosure { position:relative; }
.kd-body .kd-search-card .kd-search-disclosure > details > summary { padding-right:6rem; }
.kd-body .kd-search-clear { position:absolute; top:0; right:0; padding:.25rem 0; color:var(--kd-muted); text-decoration:none; }
.kd-body .kd-search-clear:hover { color:var(--kd-text); text-decoration:underline; }
@media(max-width:767.98px) { .kd-body .kd-search-card .kd-search-region { grid-column:1; } }

@media(min-width:768px) {
  .kd-body .kd-search-card .kd-circuit-simple-search { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto; }
  .kd-body .kd-search-card .kd-circuit-simple-search > .kd-search-query,
  .kd-body .kd-search-card .kd-circuit-simple-search > .kd-search-region { grid-column:auto; }
  .kd-body .kd-search-card .kd-circuit-simple-search > .kd-search-submit { align-self:end; margin:0; }
}

/* Phone pagination: previous, neighbouring pages, next; retain desktop shortcuts. */
@media(max-width:767.98px) {
  .kd-pagination-nav .kd-pagination-edge,
  .kd-pagination-nav .kd-pagination-mobile-extra,
  .kd-pagination-nav .kd-pagination-ellipsis { display:none; }
  .kd-pagination-nav .pagination { flex-wrap:nowrap; }
  .kd-pagination-nav .page-link { min-width:44px; min-height:44px; }
}
