/* ================================================
   Search Opponent Modal — Modern Dark Glass Theme
   Matches the realtime waiting-room aesthetic
   ================================================ */

/* ---- Modal chrome ---- */
.modal-dialog-search-opponent-menu .modal-content {
  background: radial-gradient(circle at 50% -20%, #1e1b4b 0%, #0f172a 70%);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  font-family: 'Outfit', sans-serif;
}

.modal-dialog-search-opponent-menu .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  border-radius: 20px 20px 0 0;
  padding: 18px 24px;
}

.modal-dialog-search-opponent-menu .modal-header .modal-title,
.modal-dialog-search-opponent-menu .modal-header > div {
  color: #f8fafc !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem !important;
  letter-spacing: -0.01em;
  text-transform: none !important;
}

.modal-dialog-search-opponent-menu .modal-header .btn-close,
.modal-dialog-search-opponent-menu .modal-header button[class*="fa-times"] {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.7;
  transition: opacity 0.2s;
}
.modal-dialog-search-opponent-menu .modal-header .btn-close:hover,
.modal-dialog-search-opponent-menu .modal-header button[class*="fa-times"]:hover {
  opacity: 1;
}

.modal-dialog-search-opponent-menu .modal-body {
  background: transparent;
  padding: 28px 24px;
  min-height: 45vh;
}

/* ---- Alert / Info banner ---- */
#searchOpponent-menu .search-menu-alert-container {
  background: rgba(16, 185, 129, 0.08) !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  border-radius: 14px;
  color: #d1fae5;
  padding: 16px 20px !important;
  margin-bottom: 24px;
  width: 100% !important;
}
#searchOpponent-menu .search-menu-alert-container .fa-info {
  background: #10b981 !important;
  color: #fff !important;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0 8px 0 0 !important;
  font-size: 0.85rem !important;
}
#searchOpponent-menu .search-menu-alert-container .col {
  font-size: 0.7rem !important;
  line-height: 1.5;
  color: #d1fae5;
}

/* ---- Section labels ---- */
#searchOpponent-menu label,
#searchOpponent-menu .search-menu-player-label,
#searchOpponent-menu .search-menu-quizz-label,
#searchOpponent-menu .search-menu-starting-mode-label,
#searchOpponent-menu .search-menu-game-mode-label {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  font-family: 'Outfit', sans-serif;
}
#searchOpponent-menu label small {
  font-size: inherit !important;
  color: inherit !important;
}
#searchOpponent-menu label .fas,
#searchOpponent-menu label .fa,
#searchOpponent-menu label svg {
  color: #3b82f6 !important;
  font-size: 0.9rem !important;
}

/* ---- Shared input / select look ---- */
#searchOpponent-menu .search-box,
#searchOpponent-menu .search-box-2 {
  background: rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 4px 8px !important;
  width: 100% !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#searchOpponent-menu .search-box:focus-within,
#searchOpponent-menu .search-box-2:focus-within {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
#searchOpponent-menu .search-box.selected-quizz-focus,
#searchOpponent-menu .search-box-2.selected-quizz-focus {
  /* border-color: #10b981 !important; */
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
#searchOpponent-menu .search-box input,
#searchOpponent-menu .search-box-2 input,
#searchOpponent-menu .search-box-input,
#searchOpponent-menu .search-box-input-2 {
  background: transparent !important;
  color: #f8fafc !important;
  border: none !important;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  padding: 10px 12px !important;
  width: 100% !important;
}
#searchOpponent-menu .search-box input::placeholder,
#searchOpponent-menu .search-box-2 input::placeholder {
  color: #64748b;
}

/* ---- Bootstrap Select AJAX overrides ---- */
#searchOpponent-menu .results-quizz {
  width: 100% !important;
}
#searchOpponent-menu #ajax-select,
#searchOpponent-menu .results-quizz-picker,
#searchOpponent-menu .selectpicker {
  width: 100% !important;
}
#searchOpponent-menu .bootstrap-select .btn,
#searchOpponent-menu .bootstrap-select .dropdown-toggle {
  background: rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  color: #f8fafc !important;
  padding: 12px 16px !important;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
}
#searchOpponent-menu .bootstrap-select .dropdown-menu {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
#searchOpponent-menu .bootstrap-select .dropdown-menu .inner li a {
  color: #f8fafc;
}
#searchOpponent-menu .bootstrap-select .dropdown-menu .inner li a:hover,
#searchOpponent-menu .bootstrap-select .dropdown-menu .inner li.selected a {
  background: rgba(59, 130, 246, 0.2);
  color: #fff;
}

/* ---- Select dropdowns (game mode, starting mode) ---- */
#searchOpponent-menu .form-select,
#searchOpponent-menu .game-mode-selector,
#searchOpponent-menu .starting-mode-selector {
  background: rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  color: #f8fafc !important;
  padding: 17px 16px !important;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500 !important;
  appearance: auto;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
#searchOpponent-menu .form-select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
}
#searchOpponent-menu .form-select option {
  background: #1e293b;
  color: #f8fafc;
}
#searchOpponent-menu .game-mode-box,
#searchOpponent-menu .starting-mode-box,
#searchOpponent-menu .starting-mode-select-container,
#searchOpponent-menu .game-mode-select-container {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  margin: 0 !important;
}

/* ---- Opponent chips ---- */
#searchOpponent-menu .results-opponent {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  min-height: 48px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 8px;
}
#searchOpponent-menu .selected-user {
  background: rgba(59, 130, 246, 0.15) !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
  color: #f8fafc !important;
  border-radius: 7px !important;
  padding: 4px 12px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  animation: chipSlideIn 0.3s ease;
}
@keyframes chipSlideIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
#searchOpponent-menu .remove-selected-opponent {
  color: #ef4444 !important;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.7;
  transition: opacity 0.15s;
}
#searchOpponent-menu .remove-selected-opponent:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ---- Separators ---- */
#searchOpponent-menu .hr {
  border: none !important;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  width: 100% !important;
  margin: 20px 0 !important;
}

/* ---- Group switch ---- */
#searchOpponent-menu .form-switch-for-group {
  width: 100% !important;
}
#searchOpponent-menu .form-switch-for-group .form-check-label {
  color: #94a3b8 !important;
  font-size: 0.85rem;
  font-family: 'Outfit', sans-serif;
}
#searchOpponent-menu .form-check-input:checked {
  background-color: #3b82f6;
  border-color: #3b82f6;
}

/* ---- Submit button ---- */
#searchOpponent-menu .search-button-for-challenge-dual {
  background: #3b82f6 !important;
  color: #fff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 14px 24px !important;
  width: 100% !important;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 16px !important;
}
#searchOpponent-menu .search-button-for-challenge-dual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
#searchOpponent-menu .search-button-for-challenge-dual:hover:not(.disabled)::after {
  opacity: 1;
}
#searchOpponent-menu .search-button-for-challenge-dual:active:not(.disabled) {
  transform: scale(0.98);
}
#searchOpponent-menu .search-button-for-challenge-dual.disabled {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #64748b !important;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ---- Vanilla Autocomplete dropdown in dark context ---- */
.modal-dialog-search-opponent-menu .vanilla-ac-dropdown {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.modal-dialog-search-opponent-menu .vanilla-ac-item {
  color: #f8fafc !important;
  padding: 10px 14px;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.modal-dialog-search-opponent-menu .vanilla-ac-item:last-child {
  border-bottom: none;
}
.modal-dialog-search-opponent-menu .vanilla-ac-item:hover,
.modal-dialog-search-opponent-menu .vanilla-ac-item.selected {
  background: rgba(59, 130, 246, 0.2) !important;
}

/* ---- Responsive ---- */
@media (max-width: 576px) {
  .modal-dialog-search-opponent-menu .modal-body {
    padding: 20px 16px;
  }
  #searchOpponent-menu .search-menu-alert-container {
    padding: 12px !important;
  }
}
