/* =============================================================
   ULTREIA FRONT — v3.0
   CSS pulito, nessuna duplicazione, nessuna icona di default.
   ============================================================= */

/* ── Forza il wrapper Elementor a occupare il 100% ── */
.elementor-widget-ultreia_search_bar,
.elementor-widget-ultreia_search_bar .elementor-widget-container {
  width: 100% !important;
}

/* ── Base Container ── */
.elementor-widget .ultreia-search-bar {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.elementor-widget .ultreia-search-bar__grid {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0;
  width: 100%;
  background: #ffffff;
  border-radius: 60px;
  padding: 6px;
  box-shadow: 
    0 20px 60px rgba(0,0,0,.08),
    0 8px 20px rgba(0,0,0,.06);
  transition: box-shadow .3s ease;
}

.elementor-widget .ultreia-search-bar:hover .elementor-widget .ultreia-search-bar__grid {
  box-shadow: 
    0 25px 70px rgba(0,0,0,.12),
    0 10px 25px rgba(0,0,0,.08);
}

/* ── Search Input con Rotating Placeholder ── */
.elementor-widget .ultreia-search-bar__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-right: 1px solid #e5e7eb;
  min-width: 0; /* importante per ellipsis */
  flex: 1 1 auto;
  width: 100%;
}

.elementor-widget .ultreia-search-bar__input-wrapper::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  margin-right: 12px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' 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");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: .6;
}

.elementor-widget .ultreia-search-bar__input {
  border: none !important;
  background: transparent !important;
  padding: 16px 0 !important;
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #1f2937 !important;
  outline: none !important;
  box-shadow: none !important;
  width: 100%;
}

.elementor-widget .ultreia-search-bar__input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* ── Rotating Placeholder Effect ── */
.ultreia-rotating-placeholder {
  position: absolute;
  left: 62px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #9ca3af;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 1;
  transition: opacity .3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.elementor-widget .ultreia-search-bar__input:focus + .ultreia-rotating-placeholder,
.elementor-widget .ultreia-search-bar__input:not(:placeholder-shown) + .ultreia-rotating-placeholder {
  opacity: 0;
  pointer-events: none;
}

.ultreia-rotating-placeholder__static {
  display: inline-block;
  vertical-align: middle;
  font-weight: 400;
  line-height: 1.2em;
}

.ultreia-rotating-placeholder__dynamic {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  min-width: 150px;
  height: 1.2em;
  overflow: hidden;
  white-space: nowrap;
}

.ultreia-rotating-placeholder__word {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  font-weight: 600;
  color: #2563eb;
  white-space: nowrap;
}

/* Timing e transizioni gestiti via JS per supportare N keyword senza overlap */

@keyframes rotate-word {
  0%            { opacity: 0; transform: translateY(8px); }
  8%            { opacity: 1; transform: translateY(0); }
  75%           { opacity: 1; transform: translateY(0); }
  90%, 100%     { opacity: 0; transform: translateY(-8px); }
}


.elementor-widget .ultreia-search-bar__select {
  appearance: none;
  border: none !important;
  background: transparent !important;
  padding: 16px 40px 16px 20px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  cursor: pointer;
  outline: none !important;
  box-shadow: none !important;
  border-right: 1px solid #e5e7eb !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px !important;
  transition: color .2s, background-color .2s;
  white-space: nowrap;
}

.elementor-widget .ultreia-search-bar__select:hover {
  background-color: rgba(243,244,246,.8) !important;
}

.elementor-widget .ultreia-search-bar__select:focus {
  background-color: #f9fafb !important;
}

/* ── Search Button ── */
.elementor-widget .ultreia-search-bar__btn {
  border: none !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  padding: 14px 40px !important;
  border-radius: 50px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .3s ease !important;
  box-shadow: 
    0 4px 14px rgba(37,99,235,.25),
    inset 0 1px 0 rgba(255,255,255,.2) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  letter-spacing: .02em;
}

.elementor-widget .ultreia-search-bar__btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 
    0 8px 20px rgba(37,99,235,.35),
    inset 0 1px 0 rgba(255,255,255,.2) !important;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
}

.elementor-widget .ultreia-search-bar__btn:active {
  transform: translateY(0) !important;
  box-shadow: 
    0 2px 8px rgba(37,99,235,.3),
    inset 0 1px 0 rgba(255,255,255,.2) !important;
}

/* Icona search dentro il bottone (opzionale) */
.elementor-widget .ultreia-search-bar__btn::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' 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");
  background-size: contain;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .elementor-widget .ultreia-search-bar__grid {
    border-radius: 50px;
  }
}

@media (max-width: 991px) {
  .elementor-widget .ultreia-search-bar__grid {
    grid-template-columns: 1fr;
    gap: 1px;
    border-radius: 24px;
    padding: 0;
    background: #f3f4f6;
  }

  .ultreia-search-bar__input-wrapper,
  .elementor-widget .ultreia-search-bar__select {
    border-right: none !important;
    background: #ffffff !important;
    border-radius: 0 !important;
  }

  .elementor-widget .ultreia-search-bar__input-wrapper {
    border-radius: 24px 24px 0 0 !important;
  }

  .ultreia-search-bar__select:last-of-type {
    border-radius: 0 !important;
  }

  .elementor-widget .ultreia-search-bar__btn {
    border-radius: 0 0 24px 24px !important;
    padding: 16px 32px !important;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .elementor-widget .ultreia-search-bar__grid {
    border-radius: 20px;
  }

  .elementor-widget .ultreia-search-bar__input-wrapper {
    padding: 0 20px;
  }

  .elementor-widget .ultreia-search-bar__input {
    font-size: 15px !important;
  }

  .ultreia-rotating-placeholder {
  position: absolute;
  left: 62px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #9ca3af;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 1;
  transition: opacity .3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

  .ultreia-rotating-placeholder__dynamic {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  min-width: 150px;
  height: 1.2em;
  overflow: hidden;
  white-space: nowrap;
}

  .elementor-widget .ultreia-search-bar__select {
    padding: 14px 36px 14px 20px !important;
    font-size: 14px !important;
  }

  .elementor-widget .ultreia-search-bar__btn {
    font-size: 15px !important;
    padding: 14px 28px !important;
  }

  .elementor-widget .ultreia-search-bar__input-wrapper {
    border-radius: 20px 20px 0 0 !important;
  }

  .elementor-widget .ultreia-search-bar__btn {
    border-radius: 0 0 20px 20px !important;
  }
}

/* ── Dark Mode Support (opzionale) ── */
@media (prefers-color-scheme: dark) {
  .elementor-widget .ultreia-search-bar__grid {
    background: #1f2937;
    box-shadow: 
      0 20px 60px rgba(0,0,0,.4),
      0 8px 20px rgba(0,0,0,.3);
  }

  .elementor-widget .ultreia-search-bar__input-wrapper {
    border-right-color: #374151;
  }

  .elementor-widget .ultreia-search-bar__input {
    color: #f9fafb !important;
  }

  .elementor-widget .ultreia-search-bar__input::placeholder {
    color: #6b7280;
  }

  .ultreia-rotating-placeholder {
  position: absolute;
  left: 62px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #9ca3af;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 1;
  transition: opacity .3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

  .ultreia-rotating-placeholder__word {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  font-weight: 600;
  color: #2563eb;
  white-space: nowrap;
}

  .elementor-widget .ultreia-search-bar__select {
    color: #f9fafb !important;
    border-right-color: #374151 !important;
  }

  .elementor-widget .ultreia-search-bar__select:hover {
    background-color: rgba(55,65,81,.5) !important;
  }

  @media (max-width: 991px) {
    .elementor-widget .ultreia-search-bar__grid {
      background: #374151;
    }

    .ultreia-search-bar__input-wrapper,
    .elementor-widget .ultreia-search-bar__select {
      background: #1f2937 !important;
    }
  }
}
/* ============================================================================
   ULTREIA SEARCH BAR — White + Figtree + Rotating Keywords FIXED
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&display=swap');

/* Container */
.elementor-widget .ultreia-search-bar {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'Figtree', -apple-system, sans-serif;
}

.elementor-widget .ultreia-search-bar__grid {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0;
  width: 100%;
  background: #ffffff !important;
  border-radius: 60px;
  padding: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.08), 0 8px 20px rgba(0,0,0,.06);
  transition: box-shadow .3s;
}

.elementor-widget .ultreia-search-bar:hover .ultreia-search-bar__grid {
  box-shadow: 0 25px 70px rgba(0,0,0,.12), 0 10px 25px rgba(0,0,0,.08);
}

/* Input wrapper + icon */
.elementor-widget .ultreia-search-bar__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 28px;
  border-right: 1px solid #e5e7eb;
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}

.elementor-widget .ultreia-search-bar__input-wrapper::before {
  content: '';
  width: 20px;
  height: 20px;
  margin-right: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' 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");
  opacity: .7;
}

.elementor-widget .ultreia-search-bar__input {
  border: none !important;
  background: transparent !important;
  padding: 18px 0 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #1f2937 !important;
  outline: none !important;
  box-shadow: none !important;
  width: 100%;
  font-family: 'Figtree', sans-serif !important;
}

.elementor-widget .ultreia-search-bar__input::placeholder {
  color: transparent;
}

/* Rotating placeholder - INLINE + NO WRAP */
.elementor-widget .ultreia-rotating-placeholder {
  position: absolute;
  left: 62px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #9ca3af;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.elementor-widget .ultreia-rotating-placeholder__static {
  display: inline;
  font-weight: 400;
  white-space: nowrap;
}

.elementor-widget .ultreia-rotating-placeholder__dynamic {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  min-width: 200px !important;
  width: auto !important;
  max-width: 300px !important;
  height: 1.2em;
  overflow: visible !important;
  white-space: nowrap !important;
}

.elementor-widget .ultreia-rotating-placeholder__word {
  position: absolute;
  left: 0;
  top: 0;
  width: auto !important;
  min-width: 200px !important;
  opacity: 0;
  font-weight: 600;
  color: #2563eb;
  white-space: nowrap !important;
  overflow: visible !important;
}

/* Timing e transizioni gestiti via JS per supportare N keyword senza overlap */


@keyframes rotate-word {
  0%            { opacity: 0; transform: translateY(8px); }
  8%            { opacity: 1; transform: translateY(0); }
  75%           { opacity: 1; transform: translateY(0); }
  90%, 100%     { opacity: 0; transform: translateY(-8px); }
}

/* Selects */
.elementor-widget .ultreia-search-bar__select {
  appearance: none;
  border: none !important;
  background: transparent !important;
  padding: 18px 48px 18px 24px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  cursor: pointer;
  outline: none !important;
  border-right: 1px solid #e5e7eb !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-size: 16px !important;
  white-space: nowrap;
  font-family: 'Figtree', sans-serif !important;
}

.elementor-widget .ultreia-search-bar__select:hover {
  background-color: rgba(249,250,251,.8) !important;
}

/* Button Ultreia red */
.elementor-widget .ultreia-search-bar__btn {
  border: none !important;
  background: #e63027 !important;
  color: #ffffff !important;
  padding: 16px 48px !important;
  border-radius: 50px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: transform .2s, box-shadow .3s, background .2s !important;
  box-shadow: 0 4px 14px rgba(230,48,39,.25) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-family: 'Figtree', sans-serif !important;
}

.elementor-widget .ultreia-search-bar__btn::before {
  display: none !important;
}

.elementor-widget .ultreia-search-bar__btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(230,48,39,.35) !important;
  background: #d12820 !important;
}

/* Responsive */
@media (max-width: 991px) {
  .elementor-widget .ultreia-search-bar__grid {
    grid-template-columns: 1fr;
    gap: 1px;
    border-radius: 24px;
    padding: 0;
    background: #f3f4f6 !important;
  }

  .elementor-widget .ultreia-search-bar__input-wrapper {
    border-right: none !important;
    background: #ffffff !important;
    border-radius: 24px 24px 0 0 !important;
    padding: 0 24px;
  }

  .elementor-widget .ultreia-rotating-placeholder {
    left: 58px;
  }

  .elementor-widget .ultreia-search-bar__select {
    background: #ffffff !important;
    border-right: none !important;
    padding: 16px 44px 16px 24px !important;
  }

  .elementor-widget .ultreia-search-bar__btn {
    border-radius: 0 0 24px 24px !important;
    padding: 18px 32px !important;
  }
}

@media (max-width: 576px) {
  .elementor-widget .ultreia-rotating-placeholder__dynamic {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  min-width: 200px !important;
  width: auto !important;
  max-width: 300px !important;
  height: 1.2em;
  overflow: visible !important;
  white-space: nowrap !important;
}
}


/* ── Nessun risultato ────────────────────────────────────────────────── */
/* Quando c'è un solo figlio .ultreia-no-results, il grid container
   viene forzato a comportarsi come block per far espandere il figlio */
.elementor-loop-container:has(.ultreia-no-results) {
  display: block !important;
}

.ultreia-no-results {
  width: 100% !important;
  padding: 80px 20px !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.ultreia-no-results p {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700 !important;
  font-size: clamp(1.8rem, 5vw, 3.5rem) !important;
  line-height: 1.2 !important;
  color: #1a1a1a !important;
  margin: 0 auto !important;
  text-align: center !important;
  max-width: 900px !important;
}

@media (max-width: 480px) {
  .ultreia-no-results {
    padding: 60px 16px !important;
  }
}
