/* ==========================================================================
   PREMIUM LUXURY SEARCH COMPONENT (GLASSMORPHISM)
   Inspired by Apple, Ray-Ban, & Gentle Monster
   ========================================================================== */

:root {
  --gold-premium: #F4B73D;
  --gold-glow: rgba(244, 183, 61, 0.25);
  --glass-bg: rgba(15, 15, 15, 0.75);
  --glass-border: rgba(244, 183, 61, 0.2);
  --glass-border-hover: rgba(244, 183, 61, 0.5);
  --text-primary: #FFFFFF;
  --text-muted: rgba(255, 255, 255, 0.5);
  --transition-smooth: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Search Trigger Button Wrapper */
.luxury-search-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Icon Trigger styling with subtle scale and golden glow */
.search-trigger-btn {
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth);
  outline: none;
}

.search-trigger-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.search-trigger-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-primary);
  transition: stroke 0.3s var(--transition-smooth), filter 0.3s var(--transition-smooth);
}

.search-trigger-btn:hover {
  transform: scale(1.08);
}

.search-trigger-btn:hover svg {
  stroke: var(--gold-premium);
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

/* Premium Click Ripple Effect */
.search-trigger-btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-effect 0.4s ease-out;
  background: rgba(244, 183, 61, 0.4);
  pointer-events: none;
}

@keyframes ripple-effect {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Glassmorphism Container with Slide + Fade Expansion */
.luxury-search-container {
  position: absolute;
  right: 0;
  width: 48px;
  height: 48px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px) scale(0.95);
  transition: 
    width 0.35s var(--transition-smooth), 
    opacity 0.35s var(--transition-smooth), 
    visibility 0.35s var(--transition-smooth), 
    transform 0.35s var(--transition-smooth),
    border-color 0.3s var(--transition-smooth);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  z-index: 1000;
  will-change: transform, width, opacity;
}

/* Active State Triggered by JS class assignment */
.luxury-search-container.is-active {
  opacity: 1;
  visibility: visible;
  width: min(340px, calc(50vw - 124px)); 
  transform: translateX(0) scale(1);
  border-color: var(--gold-premium);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 15px var(--gold-glow);
}

/* Embedded Input Layout */
.luxury-search-input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0 45px 0 20px;
  color: var(--text-primary);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  outline: none;
  font-weight: 300;
}

.luxury-search-input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.luxury-search-input::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

/* Inside container Close action button */
.luxury-search-close {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.2s ease;
}

.luxury-search-close:hover {
  color: var(--gold-premium);
}

/* Dropdown Suggestion Box Panel */
.luxury-suggestions-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth), visibility 0.3s var(--transition-smooth);
  overflow: hidden;
  z-index: 999;
}

.luxury-suggestions-panel.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Suggestion List Items */
.suggestion-item {
  padding: 14px 20px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.25s ease, padding-left 0.25s var(--transition-smooth);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.is-focused {
  background: rgba(244, 183, 61, 0.08);
  padding-left: 26px;
  outline: none;
}

/* Text match highlighting styling */
.suggestion-item mark {
  background: transparent;
  color: var(--gold-premium);
  font-weight: 500;
}

/* Secondary meta items inside suggestions */
.suggestion-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Mobile Adaptive Viewports */
@media (max-width: 480px) {
  .luxury-search-container.is-active {
    width: calc(100vw - 40px); /* Preserves responsive margin layout */
    right: -10px;
  }
}