/* =========================================================================
   1. TRIGGER BUTTON
   ========================================================================= */
.mw-finder-trigger-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #ffffff !important;
  font-size: 17px;
  line-height: 1;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  top: 6px;
}
.mw-finder-trigger-btn i { color: #ffffff !important; }
.mw-finder-trigger-btn:hover { opacity: 0.8; }
.mw-finder-trigger-btn:active { transform: scale(0.90); }

@media (min-width: 768px) {
  .mw-finder-trigger-btn {
    font-size: 17px;
    padding: 5px;
    top: 0;
  }
}

/* =========================================================================
   2. BACKDROP & MODAL SHELL
   ========================================================================= */
#searchBubbleBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999998;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
#searchBubbleBackdrop.active {
  display: block;
  opacity: 1;
}

#searchBubbleModal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  width: 95%;
  max-width: 820px;
  max-height: 85vh;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 999999;
  display: none;
  opacity: 0;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
#searchBubbleModal.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #222222;
  background: #181818;
}
.bubble-title {
  color: #999999;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.bubble-close-btn {
  background: none;
  border: none;
  color: #777777;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.bubble-close-btn:hover { color: #ffffff; }

.bubble-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.bubble-main-results {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #222222;
}

.bubble-results-list {
  overflow-y: auto;
  padding: 14px 18px;
  flex: 1;
}

/* =========================================================================
   3. FILTERS SIDEBAR & SELECTS (ΑΠΟΛΥΤΟ RESET ΓΙΑ ΚΑΘΑΡΑ ΓΡΑΜΜΑΤΑ)
   ========================================================================= */
.bubble-filters-sidebar {
  width: 250px;
  background: #161616;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-shrink: 0;
  overflow-y: auto;
  box-sizing: border-box;
}

.filter-group-title {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  color: #888888 !important;
  letter-spacing: 0.5px !important;
  margin-bottom: 8px !important;
  display: block !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.bubble-filter-input {
  width: 100% !important;
  max-width: 100% !important;
  height: 44px !important;
  background: #1e1e1e !important;
  color: #ffffff !important;
  border: 1px solid #333333 !important;
  border-radius: 8px !important;
  padding: 0 14px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 14px !important;
  outline: none !important;
  box-sizing: border-box !important;
}
.bubble-filter-input:focus { border-color: #ef4444 !important; }

/* Πλήρες reset: Ακυρώνει gothic/serif γραμματοσειρές & κατεστραμμένα line-heights του θέματος */
#searchBubbleModal select.bubble-filter-select {
  all: unset !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  line-height: 44px !important;
  background-color: #1e1e1e !important;
  color: #ffffff !important;
  border: 1px solid #333333 !important;
  border-radius: 8px !important;
  padding: 0 38px 0 14px !important;
  box-sizing: border-box !important;
  cursor: pointer !important;

  /* Καθαρή, κεντραρισμένη γραμματοσειρά χωρίς περικοπές */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  font-style: normal !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  vertical-align: middle !important;

  /* Custom βέλος χωρίς να πατάει πάνω στις λέξεις */
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 15px 15px !important;
}

#searchBubbleModal select.bubble-filter-select:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

#searchBubbleModal select.bubble-filter-select option {
  background-color: #181818 !important;
  color: #ffffff !important;
  padding: 10px 14px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
}

/* =========================================================================
   4. RESULT CARDS
   ========================================================================= */
.bubble-result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.bubble-result-card:hover {
  background-color: #1f1f1f;
  transform: translateX(4px);
}
.bubble-thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background-color: #2a2a2a;
  flex-shrink: 0;
  border: 1px solid #333333;
}
.bubble-thumb-placeholder {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: #202020;
  border: 1px solid #333333;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555555;
  flex-shrink: 0;
}
.bubble-info-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.bubble-item-title {
  color: #f0f0f0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bubble-result-card:hover .bubble-item-title { color: #ffffff; }
.bubble-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #888888;
  flex-wrap: wrap;
}
.bubble-category-badge {
  background: rgba(225, 29, 72, 0.2);
  color: #f43f5e;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
}
.bubble-status {
  padding: 40px 20px;
  text-align: center;
  color: #777777;
  font-size: 14px;
}

/* =========================================================================
   5. PAGINATION
   ========================================================================= */
.bubble-pagination {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #181818;
  border-top: 1px solid #222222;
}
.bubble-page-btn {
  background: #242424;
  color: #ffffff;
  border: 1px solid #333333;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 700;
}
.bubble-page-btn:hover:not(:disabled) { background: #e11d48; border-color: #e11d48; }
.bubble-page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.bubble-page-info { color: #888888; font-size: 12px; }

/* =========================================================================
   6. MOBILE OPTIMIZATIONS
   ========================================================================= */
@media (max-width: 768px) {
  #searchBubbleModal {
    width: 95% !important;
    max-width: 95% !important;
    max-height: calc(100dvh - 85px - env(safe-area-inset-bottom, 0px)) !important;
    top: calc(46% - 15px) !important;
    border-radius: 14px !important;
  }

  .bubble-header {
    padding: 12px 16px !important;
  }

  .bubble-body {
    flex-direction: column !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .bubble-main-results {
    border-right: none !important;
    overflow: visible !important;
  }

  .bubble-results-list {
    max-height: 44vh !important;
    padding: 10px 12px !important;
  }

  .bubble-filters-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-top: 1px solid #222222 !important;
    padding: 12px 14px !important;
    background: #141414 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .bubble-result-card {
    gap: 10px !important;
    padding: 8px 10px !important;
  }

  .bubble-thumb,
  .bubble-thumb-placeholder {
    width: 48px !important;
    height: 48px !important;
  }

  .bubble-item-title {
    font-size: 13.5px !important;
  }

  .bubble-pagination {
    padding: 8px 14px !important;
  }
}