/**
 * Controles da vitrine no estilo da barra de filtros (inputs, selects e botões
 * com a mesma altura). Escopo: .ciee-vitrine-wrapper — o tema FacInPro estiliza
 * `button` com degradê e line-height 51px, o que distorce os selects do Preline.
 */

.ciee-vitrine-wrapper {
  --ciee-control-h: 36px;
  --ciee-control-radius: 4px;
  --ciee-control-border: #8c8f94;
  --ciee-control-text: #2c3338;
  --ciee-control-placeholder: #646970;
  --ciee-control-font: 14px;
  --ciee-btn: #0046e1;
  --ciee-btn-hover: #0036b8;
  --radius-10: 4px;
  --radius-lg: 4px;
  --radius-md: 4px;
  --radius-xl: 4px;
}

/* ---------------------------------------------------------------------------
   Reset do tema em qualquer botão da vitrine
   --------------------------------------------------------------------------- */
.ciee-vitrine-wrapper button,
.ciee-vitrine-wrapper .button,
.ciee-vitrine-wrapper .btn,
.ciee-vitrine-wrapper a.button,
.ciee-vitrine-wrapper input[type="submit"] {
  background-image: none !important;
  background-size: auto !important;
  background-position: 0 0 !important;
  filter: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  height: auto;
  min-height: 0;
  line-height: 1.25 !important;
  border-radius: var(--ciee-control-radius) !important;
}

/* Select nativo fica invisível; o Preline mostra o botão customizado. */
.ciee-vitrine-wrapper select.hidden,
.ciee-vitrine-wrapper select.is-custom,
.ciee-vitrine-wrapper select[data-hs-select] {
  display: none !important;
}

/* ---------------------------------------------------------------------------
   Campos visíveis: text, date e o botão do HSSelect (único select na tela)
   --------------------------------------------------------------------------- */
.ciee-vitrine-wrapper input[type="text"],
.ciee-vitrine-wrapper input[type="search"],
.ciee-vitrine-wrapper input[type="number"],
.ciee-vitrine-wrapper input[type="date"],
.ciee-vitrine-wrapper input[type="month"],
.ciee-vitrine-wrapper input[type="datetime-local"],
.ciee-vitrine-wrapper .hs-select > button[type="button"],
.ciee-vitrine-wrapper button[aria-expanded]:not(.view-more):not([data-hs-overlay]) {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  height: var(--ciee-control-h) !important;
  min-height: var(--ciee-control-h) !important;
  max-height: var(--ciee-control-h) !important;
  margin: 0 !important;
  padding: 0 12px !important;
  padding-block: 0 !important;
  border: 1px solid var(--ciee-control-border) !important;
  border-radius: var(--ciee-control-radius) !important;
  background-color: #fff !important;
  background-image: none !important;
  color: var(--ciee-control-text) !important;
  font-size: var(--ciee-control-font) !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  text-align: left !important;
  box-shadow: none !important;
  outline: none !important;
  appearance: none;
  -webkit-appearance: none;
}

.ciee-vitrine-wrapper input[type="date"] {
  padding-right: 10px !important;
}

.ciee-vitrine-wrapper input::placeholder {
  color: var(--ciee-control-placeholder) !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}

.ciee-vitrine-wrapper input:focus,
.ciee-vitrine-wrapper .hs-select > button[type="button"]:focus,
.ciee-vitrine-wrapper button[aria-expanded]:not(.view-more):not([data-hs-overlay]):focus {
  border-color: #2271b1 !important;
  box-shadow: 0 0 0 1px #2271b1 !important;
}

.ciee-vitrine-wrapper .hs-select {
  position: relative;
  display: block;
  width: 100%;
  overflow: visible !important;
}

.ciee-vitrine-wrapper .hs-select > button[type="button"],
.ciee-vitrine-wrapper button[aria-expanded]:not(.view-more):not([data-hs-overlay]) {
  position: relative !important;
  padding-right: 32px !important;
  cursor: pointer !important;
}

/* Seta dupla do Preline (extraMarkup). Não esconder .select-dropdown. */
.ciee-vitrine-wrapper .hs-select > [class*="end-3"][class*="top-1/2"],
.ciee-vitrine-wrapper button[aria-expanded]:not(.view-more):not([data-hs-overlay]) .absolute,
.ciee-vitrine-wrapper button[aria-expanded]:not(.view-more):not([data-hs-overlay]) svg {
  display: none !important;
  visibility: hidden !important;
}

.ciee-vitrine-wrapper .hs-select > button[type="button"]::after,
.ciee-vitrine-wrapper button[aria-expanded]:not(.view-more):not([data-hs-overlay])::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 12px;
  height: 8px;
  margin-top: -4px;
  border: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23646970' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 8px;
  transform: none;
  pointer-events: none;
}

.ciee-vitrine-wrapper .button:not(.button-outline),
.ciee-vitrine-wrapper .button-outline,
.ciee-vitrine-wrapper .view-more,
.ciee-vitrine-wrapper .ciee-vitrine-load-more,
.ciee-vitrine-wrapper a.button {
  overflow: hidden !important;
}

.ciee-vitrine-wrapper .hs-select > button[type="button"] span,
.ciee-vitrine-wrapper button[aria-expanded]:not(.view-more):not([data-hs-overlay]) span {
  display: flex !important;
  align-items: center !important;
  color: var(--ciee-control-text) !important;
  font-weight: 400 !important;
  font-size: var(--ciee-control-font) !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Botões de ação (Aplicar, Ver detalhes, Carregar mais, Tenho interesse)
   --------------------------------------------------------------------------- */
.ciee-vitrine-wrapper .button:not(.button-outline),
.ciee-vitrine-wrapper .view-more,
.ciee-vitrine-wrapper .ciee-vitrine-load-more,
.ciee-vitrine-wrapper a.button:not(.button-outline) {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  height: var(--ciee-control-h) !important;
  min-height: var(--ciee-control-h) !important;
  max-height: var(--ciee-control-h) !important;
  padding: 0 14px !important;
  border: 1px solid var(--ciee-btn) !important;
  border-radius: var(--ciee-control-radius) !important;
  background-color: var(--ciee-btn) !important;
  background-image: none !important;
  color: #fff !important;
  font-size: var(--ciee-control-font) !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: none !important;
}

.ciee-vitrine-wrapper .button:not(.button-outline):hover,
.ciee-vitrine-wrapper .button:not(.button-outline):focus,
.ciee-vitrine-wrapper .view-more:hover,
.ciee-vitrine-wrapper .view-more:focus,
.ciee-vitrine-wrapper .ciee-vitrine-load-more:hover,
.ciee-vitrine-wrapper .ciee-vitrine-load-more:focus,
.ciee-vitrine-wrapper a.button:not(.button-outline):hover,
.ciee-vitrine-wrapper a.button:not(.button-outline):focus {
  background-color: var(--ciee-btn-hover) !important;
  background-image: none !important;
  border-color: var(--ciee-btn-hover) !important;
  color: #fff !important;
}

.ciee-vitrine-wrapper button[type="submit"].button::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ciee-vitrine-wrapper .button-outline {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: var(--ciee-control-h) !important;
  min-height: var(--ciee-control-h) !important;
  max-height: var(--ciee-control-h) !important;
  padding: 0 14px !important;
  border: 1px solid var(--ciee-control-border) !important;
  border-radius: var(--ciee-control-radius) !important;
  background-color: #fff !important;
  background-image: none !important;
  color: var(--ciee-control-text) !important;
  font-size: var(--ciee-control-font) !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.ciee-vitrine-wrapper .button-outline:hover,
.ciee-vitrine-wrapper .button-outline:focus {
  background-color: #f0f0f1 !important;
  border-color: #50575e !important;
  color: #1d2327 !important;
}

.ciee-vitrine-wrapper .view-more,
.ciee-vitrine-wrapper a.button {
  width: 100%;
}

.ciee-vitrine-wrapper .ciee-vitrine-item .view-more {
  margin-top: auto;
}

/* ---------------------------------------------------------------------------
   Exceções: sugestões de cidade e fechar modal
   --------------------------------------------------------------------------- */
.ciee-vitrine-wrapper .ciee-city-suggestions button {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--ciee-control-text) !important;
  font-size: var(--ciee-control-font) !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  text-align: left !important;
  box-shadow: none !important;
}

.ciee-vitrine-wrapper .ciee-city-suggestions button:hover,
.ciee-vitrine-wrapper .ciee-city-suggestions button:focus {
  background: #f0f0f1 !important;
  color: #1d2327 !important;
}

.ciee-vitrine-wrapper .hs-overlay .pointer-events-auto.w-full {
  position: relative;
}

.ciee-vitrine-wrapper .hs-overlay .flex.items-center.pt-3.px-4 {
  position: static;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible;
}

.ciee-vitrine-wrapper .hs-overlay button[aria-label="Close"] {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  z-index: 5;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background-color: #e2e8f0 !important;
  background-image: none !important;
  color: #1e293b !important;
  box-shadow: none !important;
  line-height: 0 !important;
  font-size: 0 !important;
  text-align: center !important;
}

.ciee-vitrine-wrapper .hs-overlay button[aria-label="Close"] .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ciee-vitrine-wrapper .hs-overlay button[aria-label="Close"] svg {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  flex-shrink: 0;
  stroke-width: 3;
}

.ciee-vitrine-wrapper .hs-overlay button[aria-label="Close"]:hover,
.ciee-vitrine-wrapper .hs-overlay button[aria-label="Close"]:focus {
  background-color: #cbd5e1 !important;
}

.ciee-vitrine-wrapper .ciee-vitrine-modal .title {
  font-weight: 700 !important;
}

.ciee-vitrine-wrapper .ciee-vitrine-modal {
  padding-right: 44px !important;
}

.ciee-vitrine-wrapper .select-dropdown {
  position: absolute !important;
  left: 0;
  right: 0;
  z-index: 80 !important;
  border: 1px solid #dcdcde !important;
  border-radius: var(--ciee-control-radius) !important;
  background: #fff !important;
  box-shadow: none !important;
}

.ciee-vitrine-wrapper .select-dropdown.hidden {
  display: none !important;
}

.ciee-vitrine-wrapper .select-dropdown:not(.hidden) {
  display: block !important;
}

.ciee-vitrine-wrapper .select-dropdown button,
.ciee-vitrine-wrapper .select-dropdown [role="option"] {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  border: 0 !important;
  border-radius: 3px !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--ciee-control-text) !important;
  font-size: var(--ciee-control-font) !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  text-align: left !important;
  box-shadow: none !important;
  cursor: pointer;
}

.ciee-vitrine-wrapper .select-dropdown button::after,
.ciee-vitrine-wrapper .select-dropdown [role="option"]::after {
  content: none !important;
  display: none !important;
}

.ciee-vitrine-wrapper .shrink-0.flex.flex-row.gap-2.items-end .button {
  width: auto;
  white-space: nowrap;
}

/* Cards com a mesma altura; botão sempre no rodapé */
.ciee-vitrine-wrapper .ciee-vitrine-list {
  display: grid !important;
  align-items: stretch !important;
  grid-auto-rows: 1fr;
}

.ciee-vitrine-wrapper .ciee-vitrine-item {
  height: 100% !important;
  min-height: 100%;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden;
}

.ciee-vitrine-wrapper .ciee-vitrine-item .title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ciee-vitrine-wrapper .ciee-vitrine-item .logo {
  flex-shrink: 0;
  height: 44px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.ciee-vitrine-wrapper .ciee-vitrine-item .logo img {
  max-height: 44px !important;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.ciee-vitrine-wrapper .ciee-vitrine-item .description {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.ciee-vitrine-wrapper .ciee-vitrine-item ul {
  flex: 1 1 auto;
  min-height: 0;
}

.ciee-vitrine-wrapper .ciee-vitrine-item li {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px;
}

.ciee-vitrine-wrapper .ciee-vitrine-item li svg {
  flex-shrink: 0;
}

.ciee-vitrine-wrapper .ciee-vitrine-item .view-more {
  margin-top: auto !important;
  flex-shrink: 0;
}
