/*
 * Inwoovation Global UI Enhancements
 * Command Palette (Spotlight), Bento Grid Ecosystem Navigator, and Mega Navigation
 */

/* === SPOTLIGHT COMMAND PALETTE MODAL === */
.inwoo-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 100px 20px 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.inwoo-palette-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.inwoo-palette-box {
  width: 100%;
  max-width: 680px;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(56, 189, 248, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(-20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.inwoo-palette-overlay.active .inwoo-palette-box {
  transform: translateY(0) scale(1);
}

.inwoo-palette-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.inwoo-palette-search-icon {
  font-size: 1.2rem;
  opacity: 0.8;
}

#inwoo-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
}

#inwoo-palette-input::placeholder {
  color: #64748b;
  font-size: 0.95rem;
}

.inwoo-palette-esc-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.inwoo-palette-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}

.inwoo-pal-tab {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.inwoo-pal-tab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.inwoo-pal-tab.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.inwoo-palette-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 8px;
}

.inwoo-palette-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.inwoo-palette-item:hover, .inwoo-palette-item.selected {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateX(3px);
}

.inwoo-pal-icon {
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inwoo-pal-content {
  flex: 1;
  min-width: 0;
}

.inwoo-pal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.inwoo-pal-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inwoo-pal-cat {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.inwoo-pal-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inwoo-pal-arrow {
  color: #64748b;
  font-size: 1rem;
  padding-right: 4px;
  transition: transform 0.15s ease;
}

.inwoo-palette-item:hover .inwoo-pal-arrow, .inwoo-palette-item.selected .inwoo-pal-arrow {
  color: #38bdf8;
  transform: translateX(4px);
}

.inwoo-palette-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.inwoo-pal-shortcuts {
  display: flex;
  gap: 14px;
  font-size: 0.75rem;
  color: #94a3b8;
}

.inwoo-pal-shortcuts kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.7rem;
  color: #f8fafc;
  font-family: 'JetBrains Mono', monospace;
  margin-right: 2px;
}

/* Navbar Search Trigger Button */
.nav-search-trigger {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #94a3b8;
  border-radius: 100px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-search-trigger:hover {
  border-color: #38bdf8;
  color: #f8fafc;
  background: rgba(56, 189, 248, 0.15);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.nav-search-trigger kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.7rem;
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
}

/* === BENTO GRID ECOSYSTEM NAVIGATOR === */
.bento-section {
  margin: 60px 0;
}

.bento-header {
  text-align: center;
  margin-bottom: 36px;
}

.bento-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 10px;
}

.bento-sub {
  color: #94a3b8;
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 auto;
}

.bento-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.bento-nav-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bento-nav-btn:hover {
  color: #f8fafc;
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
}

.bento-nav-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(16, 185, 129, 0.2));
  border-color: #38bdf8;
  color: #f8fafc;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.25);
}

.bento-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

.bento-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(56, 189, 248, 0.15);
  background: rgba(30, 41, 59, 0.95);
}

.bento-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.bento-card-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento-card-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.bento-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 8px;
  line-height: 1.35;
}

.bento-card p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.bento-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

/* === MOBILE & TOUCH RESPONSIVE ENHANCEMENTS (2026-09-03 UI/UX TIER 2) === */
@media (max-width: 768px) {
  .inwoo-palette-overlay {
    padding: 24px 14px;
    align-items: flex-start;
  }

  .inwoo-palette-box {
    max-height: 88vh;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
  }

  .inwoo-palette-header {
    padding: 14px 16px;
  }

  #inwoo-palette-input {
    font-size: 1rem;
  }

  .inwoo-palette-results {
    max-height: 52vh;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .inwoo-palette-item {
    padding: 12px 14px;
    min-height: 48px;
  }

  .bento-grid-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bento-card {
    padding: 20px 18px;
    border-radius: 16px;
  }

  .bento-nav-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .bento-nav-btn {
    padding: 8px 16px;
    font-size: 0.88rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .inwoo-palette-overlay {
    padding: 12px 8px;
  }

  .inwoo-palette-box {
    max-height: 92vh;
    border-radius: 14px;
  }

  .inwoo-palette-header {
    padding: 12px 14px;
    gap: 8px;
  }

  .inwoo-palette-tabs {
    padding: 8px 12px;
    gap: 6px;
  }

  .inwoo-pal-tab {
    padding: 5px 10px;
    font-size: 0.78rem;
  }

  .inwoo-palette-footer {
    padding: 10px 14px;
    font-size: 0.72rem;
  }

  .bento-card {
    padding: 16px 14px;
  }

  .bento-card-icon {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }
}

