/* ================================
   Generic dcc.Dropdown (React-Select v1)
================================ */

.Select-control {
  background-color: #1F223C !important;
  color: white;
}

.Select-menu-outer {
  background-color: #1F223C;
  color: white;
}

.Select-value-label {
  color: white !important;
}

/* When using classNamePrefix="styled-dropdown" (React-Select v3+) */
.styled-dropdown__control--is-focused {
  box-shadow: 0px 6px 10px #1F223C !important;
}

/* ================================
   Styled Dropdown (dbc.DropdownMenu, class "styled-dropdown")
================================ */

.styled-dropdown .dropdown-toggle {
  background-color: #1B1D3C !important;
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 999px !important;
  font-size: 13px;
  padding: 6px 14px;
  backdrop-filter: blur(3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  align-items: center;
  display: flex;
}

.styled-dropdown .dropdown-menu {
  background-color: rgba(27, 29, 60, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px !important;
  box-shadow: 0 8px 16px rgba(0,0,0,0.6);
  padding: 6px 0;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  z-index: 1100;
}

.styled-dropdown .dropdown-item {
  color: #EDEDED !important;
  font-size: 13px;
  padding: 8px 16px;
  transition: background-color 0.2s ease;
  font-weight: 200;
}

.styled-dropdown .dropdown-item:hover {
  background-color: rgba(255,110,199,0.1) !important;
  color: #FFD93D !important;
  font-weight: 200;
}

/* React-Select menu list within styled dropdown */
.styled-dropdown__menu-list {
  background-color: transparent !important;
  color: #ffffff !important;
  padding: 4px 0;
}

/* Options */
.styled-dropdown__option {
  color: #ffffff !important;
  font-size: 13px;
  padding: 8px 16px;
  transition: background-color 0.2s ease;
}

/* Hover + focus */
.styled-dropdown__option:hover,
.styled-dropdown__option--is-focused {
  background-color: rgba(255, 110, 199, 0.1) !important;
  color: #FFD93D !important;
}

/* Selected option */
.styled-dropdown__option--is-selected {
  background-color: rgba(255, 110, 199, 0.2) !important;
  color: #FFD93D !important;
  font-weight: 500;
}

/* Scrollbar (menu) */
.styled-dropdown .dropdown-menu::-webkit-scrollbar {
  width: 6px;
}
.styled-dropdown .dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
}
.styled-dropdown .dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.4);
}

@media (max-width: 768px) {
  .styled-dropdown .dropdown-menu {
    max-height: 200px;
  }
}

/* ================================
   Styled Tooltip
================================ */

.styled-tooltip .tooltip-inner {
  background-color: rgba(27, 29, 60, 0.95) !important;
  color: #FFD93D !important;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px !important;
  padding: 8px 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  max-width: 260px;
  white-space: normal;
}

.styled-tooltip .tooltip-inner strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #FFD93D;
}

/* Tooltip arrow */
.styled-tooltip .tooltip-arrow::before {
  border-top-color: rgba(27, 29, 60, 0.95) !important;
  border-bottom-color: rgba(27, 29, 60, 0.95) !important;
  border-left-color: rgba(27, 29, 60, 0.95) !important;
  border-right-color: rgba(27, 29, 60, 0.95) !important;
}

/* Optional: hover "glow" */
.styled-tooltip:hover {
  box-shadow: 0 0 12px rgba(255,110,199,0.4);
}

/* ================================
   Mantine Switch (styled-mantine-switch)
================================ */

.styled-mantine-switch .mantine-Switch-root {
  background-color: #1B1D3C !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px !important;
  padding: 6px 14px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(3px);
}

.styled-mantine-switch .mantine-Switch-track {
  background-color: #1B1D3C !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  height: 30px !important;
  min-height: 22px !important;
  border-radius: 999px !important;
}

.styled-mantine-switch .mantine-Switch-thumb {
  background-color: #FFD93D !important;
  box-shadow: 0 0 4px rgba(255, 217, 61, 0.4);
  width: 18px !important;
  height: 18px !important;
}

/* ================================
   Segmented control toggle (graph toggles)
================================ */

.styled-segmented-toggle {
  display: flex;
  gap: 6px;
  font-size: 13px;
  font-weight: 200;
}

.styled-segmented-toggle .mantine-SegmentedControl-control {
  all: unset;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: transparent;
  color: #ffffff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 200;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  user-select: none;
}

.styled-segmented-toggle .mantine-SegmentedControl-control:hover {
  border-color: #FFD93D;
  color: #FFD93D;
}

.styled-segmented-toggle .mantine-SegmentedControl-control[data-active="true"] {
  border-color: #FFD93D;
  color: #ffffff;
  font-weight: 200;
  box-shadow: 0 3px 6px rgba(255, 217, 61, 0.2);
}

/* Hide radio inputs */
.styled-segmented-toggle input[type="radio"] {
  display: none !important;
}

/* ================================
   Read-more link
================================ */

.read-more-btn,
.btn-link.read-more-btn {
  color: #FFD93D !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  transition: color .15s ease-in-out;
  text-decoration: none !important;
}

.read-more-btn:hover,
.read-more-btn:focus,
.read-more-btn:active {
  color: #FFFFFF !important;
  text-decoration: none !important;
}

/* ================================
   Admin Charity Dropdown (scoped)
================================ */

.admin-charity-dropdown {
  display: inline-block;
}

/* Control */
.admin-charity-dropdown .Select-control {
  background-color: #1B1D3C !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 999px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  display: flex !important;
  align-items: center !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  cursor: pointer;
}

/* Text wrapper */
.admin-charity-dropdown .Select-multi-value-wrapper {
  flex: 1 1 auto;
  min-width: 0;
}

/* Placeholder + selected text */
.admin-charity-dropdown .Select-placeholder,
.admin-charity-dropdown .Select-value-label {
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 200;
  line-height: 1;
  transform: translateY(-5px);
}

/* Move text slightly up */
.admin-charity-dropdown .Select-placeholder,
.admin-charity-dropdown .Select-value {
  transform: translateY(-2px) !important;
}

/* Arrow */
.admin-charity-dropdown .Select-arrow-zone {
  flex: 0 0 auto;
  display: flex !important;
  align-items: center !important;
  justify-content: center;
  padding-left: 6px;
}

.admin-charity-dropdown .Select-arrow {
  border-top-color: rgba(255,255,255,0.8) !important;
  margin: 0 !important;
  border-width: 3px 3px 0 3px !important;
}

/* Focus/active */
.admin-charity-dropdown .is-open > .Select-control,
.admin-charity-dropdown .is-focused > .Select-control {
  box-shadow: 0px 6px 10px #1F223C !important;
  border-color: rgba(255,255,255,0.35) !important;
}

/* Menu panel */
.admin-charity-dropdown .Select-menu-outer {
  background-color: rgba(27, 29, 60, 0.95) !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 8px 16px rgba(0,0,0,0.6);
  z-index: 2200;
}

/* Menu list */
.admin-charity-dropdown .Select-menu {
  max-height: 240px;
}

/* Options */
.admin-charity-dropdown .Select-option {
  color: #EDEDED !important;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 200;
  background-color: transparent !important;
}

/* Hover / focus */
.admin-charity-dropdown .Select-option.is-focused {
  background-color: rgba(255,110,199,0.1) !important;
  color: #FFD93D !important;
}

/* Selected */
.admin-charity-dropdown .Select-option.is-selected {
  background-color: rgba(255,110,199,0.2) !important;
  color: #FFD93D !important;
  font-weight: 500;
}

/* Scrollbar for long lists */
.admin-charity-dropdown .Select-menu-outer::-webkit-scrollbar {
  width: 6px;
}
.admin-charity-dropdown .Select-menu-outer::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
}
.admin-charity-dropdown .Select-menu-outer::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.4);
}

/* Desktop vs mobile usage */
.admin-charity-desktop {
  display: block;
}

.admin-charity-mobile {
  display: none;
}

@media (max-width: 900px) {
  .admin-charity-desktop {
    display: none !important;
  }
  .admin-charity-mobile {
    display: inline-flex !important;
  }
}
