/**
 * GARNETA SMART SEARCH + QUICK ACTION STYLES
 * Compact First, Expand When Needed
 */

/* Smart Search Container - Compact */
.smart-search-wrapper {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

/* Input Box - Compact */
.smart-search-input-box {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}

.smart-search-input-box:focus-within {
  border-color: var(--green);
  box-shadow: 0 2px 16px rgba(36,240,199,0.15);
}

.smart-search-icon {
  font-size: 1.1rem;
  margin-right: 10px;
  opacity: 0.7;
}

.smart-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  padding: 6px 0;
  min-height: 36px;
}

.smart-search-input::placeholder {
  color: var(--soft-text);
}

.smart-search-shortcut {
  font-size: 0.7rem;
  color: var(--soft-text);
  background: rgba(255,255,255,0.08);
  padding: 3px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

/* Dropdown - Compact */
.smart-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  z-index: 100;
  max-height: 500px;
  overflow-y: auto;
}

.smart-search-dropdown.hidden {
  display: none;
}

/* Results Container */
.smart-search-results {
  padding: 10px;
}

/* Section */
.smart-search-section {
  margin-bottom: 12px;
}

.smart-search-section:last-child {
  margin-bottom: 0;
}

.smart-search-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--soft-text);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

/* Quick Action Card - Compact */
.quick-action-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.quick-action-card:hover {
  border-color: rgba(36,240,199,0.25);
  box-shadow: 0 2px 12px rgba(36,240,199,0.08);
}

.quick-action-card.supplier-card {
  border-left: 3px solid var(--orange);
}

/* Card Header - Compact */
.quick-action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.quick-action-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.quick-action-category {
  font-size: 0.7rem;
  color: var(--soft-text);
  background: rgba(36,240,199,0.08);
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Card Info - Compact Row Layout */
.quick-action-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.quick-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.info-label {
  color: var(--soft-text);
  font-size: 0.8rem;
}

.info-value {
  color: var(--text);
  font-weight: 600;
}

/* Stock Colors */
.stock-low {
  color: #ff6b6b;
}

.stock-medium {
  color: #ffd93d;
}

.stock-high {
  color: var(--green);
}

/* Quick Action Buttons - Compact */
.quick-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-action-buttons .btn {
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 6px;
  min-height: 32px;
}

/* Empty State */
.smart-search-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--soft-text);
}

.smart-search-empty span {
  font-size: 2.5rem;
  opacity: 0.5;
  display: block;
  margin-bottom: 8px;
}

.smart-search-empty p {
  margin: 0;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .smart-search-wrapper {
    max-width: 100%;
  }
  
  .smart-search-input-box {
    padding: 8px 12px;
  }
  
  .smart-search-input {
    font-size: 0.9rem;
  }
  
  .smart-search-shortcut {
    display: none;
  }
  
  .quick-action-buttons {
    flex-direction: column;
  }
  
  .quick-action-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.smart-search-dropdown:not(.hidden) {
  animation: slideDown 0.2s ease;
}

/* Hover Ninja Action Buttons */
.hover-ninja-container {
  position: relative;
  overflow: hidden;
}

.hover-ninja-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%) translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--card-bg, #1a2235);
  padding-left: 15px;
  box-shadow: -20px 0 15px var(--card-bg, #1a2235);
}

.quick-action-card:hover .hover-ninja-actions {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
}

.hover-ninja-content {
  flex: 1;
  min-width: 0;
  transition: opacity 0.3s ease;
}

.quick-action-card:hover .hover-ninja-content {
  opacity: 0.3;
}
