/* --- Z-Index Fixes --- */
/* Asegura que el Login esté sobre el buscador */
#loginModal {
  z-index: 10000 !important;
}

.modal-backdrop+.modal-backdrop {
  z-index: 9999 !important;
}

.smart-search-trigger {
  cursor: pointer !important;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.smart-search-trigger:hover {
  opacity: 0.8;
}

.smart-search-trigger .search-icon {
  margin-right: 8px;
  font-size: 16px;
}

/* --- Modal Base --- */
.smart-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s;
}

.smart-modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 10px;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  min-height: 400px;
}

/* --- Modal Components --- */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  text-transform: uppercase;
}

.close-btn {
  color: #000;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: #e0e0e0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.close-btn:hover {
  background: #ccc;
}

.modal-search-bar {
  position: relative;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  background: #f9f9f9;
}

.modal-search-bar input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 16px;
  padding: 5px 10px;
  outline: none;
  color: #333;
}

/* --- States --- */
.modal-empty-state {
  text-align: center;
  margin-top: 60px;
  color: #888;
}

.modal-empty-state .icon-circle {
  font-size: 40px;
  color: #aaa;
  margin-bottom: 15px;
}

.modal-empty-state p {
  font-size: 14px;
}

.search-results-container {
  margin-top: 20px;
  display: none;
  padding-bottom: 20px;
  overflow: auto;
  max-height: 30.5em;
}

.search-status-msg {
  text-align: center;
  padding: 20px;
  color: #666;
  width: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}