/* =========================================================
   Easy Quizzz Algolia Search Overlay
   Matches the main Easy-Quizzz search layout.
   ========================================================= */
:root {
  --eq-algolia-blue: #00a4ef;
  --eq-algolia-teal: #1f7886;
  --eq-algolia-gold: #d49500;
  --eq-algolia-text: #111827;
  --eq-algolia-muted: #64748b;
  --eq-algolia-line: #e5e7eb;
  --eq-algolia-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
  --eq-algolia-width: 898px;
}

body.eq-algolia-open,
body.eq-algolia-modal-open {
  overflow: hidden;
}

.eq-algolia-search-panel {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  padding-top: 6px;
  align-items: flex-start;
  justify-content: center;
  font-family: inherit;
}

body.admin-bar .eq-algolia-search-panel {
  padding-top: 50px;
}

.eq-algolia-search-panel.is-open {
  display: flex;
}

.eq-algolia-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.34);
  cursor: default;
}

.eq-algolia-search-dialog {
  position: relative;
  z-index: 2;
  width: min(var(--eq-algolia-width), calc(100vw - 40px));
  max-height: calc(100vh - 18px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.admin-bar .eq-algolia-search-dialog {
  max-height: calc(100vh - 60px);
}

.eq-algolia-search-card {
  width: 100%;
  height: 62px;
  background: #ffffff;
  border: 1px solid #cfe6ea;
  border-radius: 0;
  box-shadow: var(--eq-algolia-shadow);
  overflow: hidden;
}

.eq-algolia-searchbar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  background: #ffffff;
}

.eq-algolia-searchbar-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--eq-algolia-blue);
  background-color: var(--eq-algolia-blue) !important;
  opacity: 1;
  transform: scale(0.86);
}

.eq-search-icon-mask {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 20px 20px;
  mask-size: 20px 20px;
}

.eq-algolia-input {
  flex: 1 1 auto;
  height: 100%;
  min-width: 0;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #1f2937 !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
  font-weight: 400 !important;
  padding: 0 16px 0 0 !important;
  margin: 0 !important;
  -webkit-appearance: none;
  appearance: none;
}

.eq-algolia-input::placeholder {
  color: #a5adbd;
  opacity: 1;
}

.eq-algolia-clear {
  flex: 0 0 48px;
  width: 48px;
  height: 62px;
  border: 0 !important;
  border-left: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #ffffff !important;
  color: var(--eq-algolia-blue) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 26px !important;
  line-height: 1 !important;
  font-weight: 300 !important;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: none !important;
  transition: color .15s ease, background-color .15s ease;
}

.eq-algolia-clear:hover,
.eq-algolia-clear:focus,
.eq-algolia-clear:active {
  color: #000000 !important;
  background: #ffffff !important;
  outline: 0 !important;
}

.eq-algolia-results-card {
  display: none;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e6edf2;
  border-radius: 0;
  box-shadow: var(--eq-algolia-shadow);
  overflow: hidden;
  max-height: min(660px, calc(100vh - 100px));
  min-height: 0;
  flex-direction: column;
}

body.admin-bar .eq-algolia-results-card {
  max-height: min(660px, calc(100vh - 155px));
}

.eq-algolia-search-panel.has-query .eq-algolia-results-card {
  display: flex;
}

.eq-algolia-results {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  max-height: none;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #d2d7dd #f8fafc;
}

body.admin-bar .eq-algolia-results {
  max-height: none;
}

.eq-algolia-results::-webkit-scrollbar {
  width: 8px;
}

.eq-algolia-results::-webkit-scrollbar-track {
  background: #f8fafc;
}

.eq-algolia-results::-webkit-scrollbar-thumb {
  background: #d2d7dd;
  border-radius: 8px;
}

.eq-algolia-result {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 61px;
  padding: 10px 20px 10px 16px;
  border-bottom: 1px solid #e9eef3;
  background: #ffffff;
  text-decoration: none !important;
  color: inherit;
}

.eq-algolia-result:hover,
.eq-algolia-result:focus {
  background: #fbfdff;
  text-decoration: none !important;
  outline: 0;
}

.eq-algolia-result-main {
  min-width: 0;
}

.eq-algolia-title {
  display: block;
  margin: 0 0 6px;
  color: #17a6de;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eq-algolia-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  color: #111827;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 400;
}

.eq-algolia-meta span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.eq-algolia-meta span + span::before {
  content: '|';
  color: #111827;
  margin: 0 7px;
  font-weight: 400;
}

.eq-algolia-cta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  min-width: 104px;
  color: var(--eq-algolia-gold);
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.eq-algolia-cta svg,
.eq-algolia-cta .eq-algolia-arrow {
  display: inline-flex;
  width: 15px;
  height: 15px;
  color: var(--eq-algolia-gold);
}

.eq-algolia-highlight,
.eq-algolia-meta mark,
.eq-algolia-title mark {
  background: #dff7fb;
  color: inherit;
  padding: 0 1px;
  font-weight: 700;
}

.eq-algolia-search-footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  flex: 0 0 72px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 30px;
  background: #ffffff;
  border-top: 1px solid #e6edf2;
}

.eq-algolia-suggest-btn,
.eq-algolia-suggest-btn:visited {
  width: 218px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--eq-algolia-blue);
  color: #ffffff !important;
  border: 2px solid var(--eq-algolia-blue);
  border-radius: 0;
  padding: 11px 20px;
  font-size: 16px;
  line-height: 1.1;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.eq-algolia-suggest-btn:hover,
.eq-algolia-suggest-btn:focus {
  background: #ffffff;
  color: var(--eq-algolia-blue) !important;
  border-color: var(--eq-algolia-blue);
  text-decoration: none !important;
  outline: 0;
}

.eq-algolia-message,
.eq-algolia-empty,
.eq-algolia-error {
  padding: 24px 20px;
  color: var(--eq-algolia-muted);
  font-size: 15px;
  line-height: 1.5;
  background: #ffffff;
}

.eq-algolia-empty strong,
.eq-algolia-error strong {
  display: block;
  color: var(--eq-algolia-text);
  margin-bottom: 4px;
}

/* Keep legacy class names working if any old markup is cached. */
.eq-algolia-search-inner,
.eq-algolia-search-head {
  display: contents;
}

@media (max-width: 1024px) {
  .eq-algolia-search-panel {
    padding-top: 8px;
  }

  body.admin-bar .eq-algolia-search-panel {
    padding-top: 46px;
  }

  .eq-algolia-search-dialog {
    width: min(92vw, var(--eq-algolia-width));
  }
}

@media (max-width: 767px) {
  .eq-algolia-search-panel,
  body.admin-bar .eq-algolia-search-panel {
    padding: 8px 10px 0;
    align-items: flex-start;
  }

  .eq-algolia-search-dialog {
    width: 100%;
    max-height: calc(100vh - 18px);
    gap: 10px;
  }

  .eq-algolia-search-card {
    height: 56px;
  }

  .eq-algolia-searchbar-icon {
    flex-basis: 44px;
    width: 44px;
  }

  .eq-algolia-input {
    font-size: 16px !important;
  }

  .eq-algolia-clear {
    flex-basis: 44px;
    width: 44px;
    height: 56px;
    font-size: 32px !important;
  }

  .eq-algolia-results-card {
    max-height: calc(100vh - 82px);
  }

  .eq-algolia-results,
  body.admin-bar .eq-algolia-results {
    max-height: calc(100vh - 160px);
  }

  .eq-algolia-result {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 12px 14px;
  }

  .eq-algolia-title {
    white-space: normal;
    font-size: 15px;
  }

  .eq-algolia-cta {
    justify-content: flex-start;
    font-size: 14px;
  }

  .eq-algolia-search-footer {
    justify-content: stretch;
    padding: 10px 14px;
    flex-basis: 66px;
    min-height: 66px;
  }

  .eq-algolia-suggest-btn {
    width: 100%;
    min-height: 44px;
    font-size: 15px;
  }
}



/* Exact Easy-Quizzz search overlay refinements */
.eq-algolia-search-panel,
.eq-algolia-search-dialog {
  --eq-algolia-blue: #00A4EF;
  --eq-algolia-yellow: #F8B904;
}

.eq-algolia-search-card {
  overflow: hidden !important;
}

.eq-algolia-searchbar {
  position: relative !important;
}

.eq-algolia-searchbar-icon {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  height: 100% !important;
  margin: 0 !important;
  z-index: 5 !important;
  background: transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMzM2FkY2IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4Ii8+PHBhdGggZD0ibTIxIDIxLTQuMzUtNC4zNSIvPjwvc3ZnPg==") center center / 16px 16px no-repeat !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  transform: none !important;
}

.eq-algolia-input {
  min-width: 0 !important;
  padding-left: 48px !important;
  padding-right: 48px !important;
  margin-left: 0 !important;
  color: #111827 !important;
}

.eq-algolia-input::placeholder {
  color: #8a98a9 !important;
  opacity: 1;
}

.eq-algolia-clear {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
  width: 48px !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  z-index: 5 !important;
  pointer-events: auto !important;
  color: #33adcb !important;
  transition: color .15s ease;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
}

.eq-algolia-search-panel.has-query .eq-algolia-clear {
  display: flex !important;
}

.eq-algolia-clear:hover,
.eq-algolia-clear:focus-visible {
  color: #000000 !important;
}

.eq-algolia-results {
  padding-bottom: 76px !important;
  scrollbar-gutter: stable;
}

.eq-algolia-result,
.eq-algolia-result:visited {
  border-bottom: 0 !important;
  color: inherit;
}

.eq-algolia-result + .eq-algolia-result {
  margin-top: 0;
}

.eq-algolia-result:hover,
.eq-algolia-result:focus-visible {
  background: #eaf9fd;
}

.eq-algolia-title {
  color: #33adcb !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  font-weight: 400 !important;
}

.eq-algolia-meta {
  color: #111827 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  gap: 0 !important;
}

.eq-algolia-meta-part {
  color: #111827 !important;
  font-weight: 400 !important;
}

.eq-algolia-meta-part + .eq-algolia-meta-part::before {
  content: none !important;
}

.eq-algolia-meta-sep {
  display: inline-block !important;
  color: #111827 !important;
  margin: 0 6px !important;
  font-weight: 400 !important;
}

.eq-algolia-highlight {
  background: transparent !important;
  color: #33adcb !important;
  font-weight: 700 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.eq-algolia-cta,
.eq-algolia-arrow {
  color: var(--eq-algolia-yellow) !important;
}

.eq-algolia-cta {
  font-size: 16px !important;
  font-weight: 700 !important;
}

.eq-algolia-search-footer {
  position: sticky !important;
  bottom: 18px !important;
  z-index: 6 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 30px 0 0 !important;
  border-top: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: flex-end !important;
  pointer-events: none !important;
}

.eq-algolia-suggest-btn {
  pointer-events: auto !important;
  min-height: 45px !important;
  padding: 0 32px !important;
  background: rgba(0,164,239,var(--tw-bg-opacity, 1)) !important;
  color: #ffffff !important;
  border: 2px solid rgba(0,164,239,var(--tw-bg-opacity, 1)) !important;
  box-shadow: none !important;
}

.eq-algolia-suggest-btn:hover,
.eq-algolia-suggest-btn:focus-visible {
  background: #ffffff !important;
  color: rgba(0,164,239,var(--tw-bg-opacity, 1)) !important;
  border-color: rgba(0,164,239,var(--tw-bg-opacity, 1)) !important;
}

@media (max-width: 767px) {
  .eq-algolia-searchbar-icon {
    flex-basis: 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 56px !important;
  }
  .eq-algolia-search-footer {
    bottom: 14px !important;
    padding-right: 14px !important;
  }
  .eq-algolia-suggest-btn {
    width: auto !important;
    min-width: 190px !important;
    padding: 0 22px !important;
  }
}

/* 2026-05-08: polished Algolia overlay fixes */
.eq-algolia-search-card {
  position: relative;
}



.eq-algolia-search-card.is-loading .eq-algolia-searchbar-icon {
  background-image: none !important;
  background-color: transparent !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

.eq-algolia-search-card.is-loading .eq-algolia-searchbar-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 164, 239, .25);
  border-top-color: var(--eq-algolia-blue, #00a4ef);
  border-radius: 999px;
  animation: eq-algolia-spin .75s linear infinite;
}

@keyframes eq-algolia-spin {
  to { transform: rotate(360deg); }
}

.eq-algolia-results {
  padding-bottom: 96px !important;
}

.eq-algolia-search-footer {
  position: absolute !important;
  right: 30px !important;
  bottom: 18px !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: none;
  z-index: 6;
}

.eq-algolia-suggest-btn {
  pointer-events: auto;
  box-shadow: none !important;
}

.eq-algolia-meta span + span::before,
.eq-algolia-meta .eq-algolia-meta-part + .eq-algolia-meta-part::before {
  content: none !important;
}

.eq-algolia-meta-sep {
  color: #111827 !important;
  margin: 0 10px !important;
  opacity: 1 !important;
}

@media (max-width: 640px) {
  .eq-algolia-search-footer {
    right: 16px !important;
    bottom: 12px !important;
  }
  .eq-algolia-suggest-btn {
    min-height: 42px !important;
    padding: 0 18px !important;
  }
}
.eq-algolia-results-card {
  position: relative !important;
}

/* Live-site search overlay alignment */
.eq-algolia-results {
  scrollbar-width: auto !important;
  scrollbar-color: #cfcfcf #f5f5f5 !important;
}

.eq-algolia-results::-webkit-scrollbar {
  width: 12px !important;
}

.eq-algolia-results::-webkit-scrollbar-track {
  background: #f5f5f5 !important;
}

.eq-algolia-results::-webkit-scrollbar-thumb {
  background: #cfcfcf !important;
  border-radius: 8px !important;
  border: 2px solid #f5f5f5 !important;
}

.eq-algolia-result {
  min-height: 60px !important;
  padding: 8px 26px 8px 16px !important;
}

.eq-algolia-result:hover,
.eq-algolia-result:focus-visible {
  background: transparent !important;
}

.eq-algolia-title {
  margin-bottom: 5px !important;
  color: #33adcb !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  font-weight: 400 !important;
}

.eq-algolia-meta,
.eq-algolia-meta-part,
.eq-algolia-meta-sep {
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 400 !important;
}

.eq-algolia-highlight {
  color: #33adcb !important;
  font-weight: 700 !important;
}

.eq-algolia-cta {
  font-size: 14px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
}
