/* ════════════════════════════════════════════════════════════════════════════════
   361 Universal Searchable Switcher (Sektör & Modül Seçici) CSS
   Modern, Dark Theme, Glassmorphism, Keyboard-friendly, Zero-flicker
   ════════════════════════════════════════════════════════════════════════════════ */

.uni-switcher-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 8, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}

.uni-switcher-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.uni-switcher-dialog {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: #080f1e;
  border: 1px solid rgba(0, 104, 249, 0.35);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.uni-switcher-modal.is-open .uni-switcher-dialog {
  transform: scale(1) translateY(0);
}

/* Header & Search */
.uni-switcher-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 22, 44, 0.6);
}

.uni-switcher-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.uni-switcher-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.uni-switcher-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 104, 249, 0.2);
  color: #1dd2e9;
  border: 1px solid rgba(29, 210, 233, 0.3);
  text-transform: uppercase;
}

.uni-switcher-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(232, 237, 244, 0.7);
  cursor: pointer;
  transition: all 0.15s;
}

.uni-switcher-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.uni-switcher-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.uni-switcher-search-icon {
  position: absolute;
  left: 16px;
  color: rgba(232, 237, 244, 0.4);
  pointer-events: none;
}

.uni-switcher-input {
  width: 100%;
  padding: 13px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #ffffff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.uni-switcher-input:focus {
  background: rgba(0, 104, 249, 0.08);
  border-color: #0068f9;
  box-shadow: 0 0 0 3px rgba(0, 104, 249, 0.25);
}

.uni-switcher-input::placeholder {
  color: rgba(232, 237, 244, 0.4);
}

.uni-switcher-clear {
  position: absolute;
  right: 12px;
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

.uni-switcher-input:not(:placeholder-shown) + .uni-switcher-clear {
  display: flex;
}

/* Category Filter Tabs */
.uni-switcher-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(8, 15, 30, 0.5);
  overflow-x: auto;
  scrollbar-width: none;
}

.uni-switcher-tabs::-webkit-scrollbar {
  display: none;
}

.uni-switcher-tab {
  padding: 6px 12px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(232, 237, 244, 0.6);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.uni-switcher-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.uni-switcher-tab.is-active {
  background: rgba(0, 104, 249, 0.2);
  color: #1dd2e9;
  border-color: rgba(0, 104, 249, 0.4);
}

/* Content List / Grid */
.uni-switcher-body {
  padding: 16px 24px 24px;
  overflow-y: auto;
  max-height: 520px;
}

.uni-switcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.uni-switcher-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.uni-switcher-card:hover,
.uni-switcher-card:focus-visible {
  background: rgba(0, 104, 249, 0.12);
  border-color: rgba(0, 104, 249, 0.4);
  transform: translateY(-2px);
  outline: none;
}

.uni-switcher-card.is-current {
  background: rgba(29, 210, 233, 0.08);
  border-color: rgba(29, 210, 233, 0.4);
}

.uni-switcher-card-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.uni-switcher-card-info {
  flex: 1;
  min-width: 0;
}

.uni-switcher-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 3px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.uni-switcher-card-current-tag {
  font-size: 10px;
  font-weight: 700;
  color: #1dd2e9;
  background: rgba(29, 210, 233, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
}

.uni-switcher-card-desc {
  font-size: 12px;
  color: rgba(232, 237, 244, 0.6);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.uni-switcher-empty {
  text-align: center;
  padding: 48px 16px;
  color: rgba(232, 237, 244, 0.5);
  font-size: 14px;
}

/* Subnav Switcher Trigger Button */
.switcher-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 104, 249, 0.15);
  border: 1px solid rgba(0, 104, 249, 0.35);
  color: #1dd2e9;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}

.switcher-trigger-btn:hover {
  background: rgba(0, 104, 249, 0.28);
  border-color: #1dd2e9;
  color: #ffffff;
  transform: translateY(-1px);
}

.switcher-trigger-btn svg {
  transition: transform 0.18s;
}

.switcher-trigger-btn:hover svg {
  transform: translateY(1px);
}

/* Footer Keyboard Helper */
.uni-switcher-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(4, 8, 16, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: rgba(232, 237, 244, 0.45);
}

.uni-switcher-hints {
  display: flex;
  gap: 12px;
}

.uni-switcher-kbd {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(232, 237, 244, 0.8);
  font-size: 11px;
  font-family: monospace;
}

@media (max-width: 640px) {
  .uni-switcher-dialog {
    max-height: 90vh;
    border-radius: 16px;
  }
  .uni-switcher-grid {
    grid-template-columns: 1fr;
  }
  .uni-switcher-footer {
    display: none;
  }
}
