/**
 * Everyday Enterprise Suite — Universal 9-Dot App & Ecosystem Switcher Styles
 */
.everyday-app-switcher-wrap {
  position: relative;
  display: inline-block;
  z-index: 1060;
}

/* 9-Dot Waffle Button */
.everyday-waffle-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
}

.everyday-waffle-btn:hover,
.everyday-waffle-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.waffle-grid {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  grid-gap: 3.5px;
}

.waffle-grid span {
  width: 4px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 1px;
  transition: background 0.2s, transform 0.2s;
}

.everyday-waffle-btn:hover .waffle-grid span,
.everyday-waffle-btn.active .waffle-grid span {
  background: #10b981;
  transform: scale(1.15);
}

/* Popover Panel */
.everyday-switcher-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-width: 92vw;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(16, 185, 129, 0.1);
  z-index: 1070;
  overflow: hidden;
  animation: switcherFadeSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes switcherFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.switcher-popover-header {
  padding: 16px 16px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.switcher-brand-dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.switcher-close-btn {
  background: transparent;
  border: none;
  color: #64748b;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.switcher-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.switcher-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px 10px;
  margin-top: 4px;
}

.switcher-search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.82rem;
  width: 100%;
  outline: none;
}

.switcher-search-box input::placeholder {
  color: #64748b;
}

.switcher-kbd-hint {
  font-size: 0.65rem;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 4px;
  color: #94a3b8;
}

/* Body Scroll Area */
.switcher-popover-body {
  padding: 12px 14px;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.2) transparent;
}

.switcher-popover-body::-webkit-scrollbar {
  width: 4px;
}
.switcher-popover-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 4px;
}

.switcher-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  margin-bottom: 8px;
}

/* Connected Ecosystem Cards */
.switcher-ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.switcher-eco-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 8px;
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.switcher-eco-card:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  color: #fff;
}

.switcher-eco-card.active {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.08);
}

.eco-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.eco-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.eco-sub {
  font-size: 0.65rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* 3-Column Apps Grid */
.switcher-apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.switcher-app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  border-radius: 12px;
  text-decoration: none;
  color: #e2e8f0;
  transition: all 0.18s ease;
  background: transparent;
}

.switcher-app-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  transform: translateY(-2px);
}

.switcher-app-item .app-mini-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.2s;
}

.switcher-app-item:hover .app-mini-icon {
  transform: scale(1.1);
}

.switcher-app-item span {
  font-size: 0.74rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Footer */
.switcher-popover-footer {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.switcher-all-apps-btn {
  color: #34d399;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: color 0.15s;
}

.switcher-all-apps-btn:hover {
  color: #6ee7b7;
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .everyday-switcher-popover {
    width: 320px;
    right: -50px;
  }
}
