.kiwee-blog-search,
.kiwee-blog-search * {
  box-sizing: border-box;
}

.kiwee-blog-search__trigger {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 8px;
  margin: 0;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.kiwee-blog-search__trigger:focus,
.kiwee-blog-search__trigger:focus-visible,
.kiwee-blog-search__close:focus,
.kiwee-blog-search__close:focus-visible,
.kiwee-blog-search__input:focus,
.kiwee-blog-search__input:focus-visible {
  outline: none;
  box-shadow: none;
}

.kiwee-blog-search__trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  line-height: 1;
}

.kiwee-blog-search__trigger-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

.kiwee-blog-search__trigger-icon i {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.kiwee-blog-search__overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.45);
}

.kiwee-blog-search__overlay[hidden] {
  display: none !important;
}

.kiwee-blog-search__modal {
  position: relative;
  width: min(720px, 100%);
  max-height: min(82vh, 760px);
  padding: 32px;
  background: #fff;
  border-radius: 16px;
  overflow: visible;
}

.kiwee-blog-search__close {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  z-index: 2;
}

.kiwee-blog-search__close svg {
  width: 20px;
  height: 20px;
}

.kiwee-blog-search__box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  background: #fff;
}

.kiwee-blog-search__input-icon,
.kiwee-blog-search__input-icon svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: #666;
}

.kiwee-blog-search__input {
  width: 100%;
  min-width: 0;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: #111;
  font: inherit;
  line-height: 1.4;
}

.kiwee-blog-search__input::-webkit-search-cancel-button {
  cursor: pointer;
}

.kiwee-blog-search__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 32px;
  right: 32px;
  z-index: 4;
  max-height: min(54vh, 480px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.14);
}

.kiwee-blog-search__panel[hidden],
.kiwee-blog-search__recent[hidden],
.kiwee-blog-search__results[hidden],
.kiwee-blog-search__status[hidden] {
  display: none !important;
}

.kiwee-blog-search__recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 8px;
  font-size: 13px;
  color: #666;
}

.kiwee-blog-search__recent-clear {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.kiwee-blog-search__recent-list {
  list-style: none;
  padding: 0 8px 8px;
  margin: 0;
}

.kiwee-blog-search__recent-item button {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 10px 8px;
  margin: 0;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.kiwee-blog-search__recent-item button:hover,
.kiwee-blog-search__result:hover {
  background: rgba(0,0,0,.04);
}

.kiwee-blog-search__results {
  padding: 6px;
}

.kiwee-blog-search__result {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none !important;
  color: inherit !important;
}

.kiwee-blog-search__result-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #f2f2f2;
}

.kiwee-blog-search__result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kiwee-blog-search__result-main {
  min-width: 0;
}

.kiwee-blog-search__result-title {
  margin: 0 0 4px;
  font-weight: 600;
  color: #111;
}

.kiwee-blog-search__result-date {
  margin-bottom: 4px;
  font-size: 12px;
  color: #777;
}

.kiwee-blog-search__result-excerpt {
  font-size: 13px;
  line-height: 1.4;
  color: #666;
}

.kiwee-blog-search__status {
  padding: 18px 16px;
  color: #666;
  text-align: center;
}

body.kiwee-blog-search-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .kiwee-blog-search__overlay {
    align-items: flex-start;
    padding: 18px;
  }

  .kiwee-blog-search__modal {
    margin-top: 8vh;
    padding: 24px 18px;
  }

  .kiwee-blog-search__panel {
    left: 18px;
    right: 18px;
    max-height: 58vh;
  }

  .kiwee-blog-search__result {
    grid-template-columns: 60px 1fr;
  }

  .kiwee-blog-search__result-thumb {
    width: 60px;
    height: 60px;
  }
}

/* =========================================================
   v1.1.0 — alinhamento do botão e popup no topo
========================================================= */
.kiwee-blog-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.kiwee-blog-search__trigger {
  flex: 0 0 auto;
  align-self: center;
}

/* O popup passa a nascer próximo ao topo da viewport, em vez de no centro. */
.kiwee-blog-search__overlay {
  align-items: flex-start;
  padding-top: 90px;
}

.kiwee-blog-search__modal {
  margin-top: 0;
  max-height: calc(100vh - 114px);
}

@media (max-width: 767px) {
  .kiwee-blog-search__overlay {
    padding-top: 70px;
  }

  .kiwee-blog-search__modal {
    margin-top: 0;
    max-height: calc(100vh - 88px);
  }
}

/* =========================================================
   v1.1.1 — tamanho real do ícone do gatilho
   O SVG passa a herdar o tamanho do wrapper controlado pelo Elementor.
========================================================= */
.kiwee-blog-search__trigger-icon > svg,
.kiwee-blog-search__trigger-icon > .e-font-icon-svg {
  width: 100% !important;
  height: 100% !important;
}
