.daily-chart-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.daily-topic-dropdown {
  position: relative;
  min-width: 290px;
  max-width: 360px;
  width: 100%;
}

.daily-topic-dropdown__toggle {
  position: relative;
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(140, 120, 200, 0.18);
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92),
    rgba(246, 240, 255, 0.96)
  );
  color: var(--text-color, #1c1730);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.daily-topic-dropdown__toggle:hover {
  border-color: rgba(140, 120, 200, 0.28);
  box-shadow:
    0 14px 28px rgba(123, 97, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.daily-topic-dropdown__toggle:focus-visible {
  outline: none;
  border-color: rgba(168, 85, 247, 0.42);
  box-shadow:
    0 0 0 4px rgba(207, 124, 255, 0.12),
    0 14px 28px rgba(123, 97, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.daily-topic-dropdown.is-open .daily-topic-dropdown__toggle {
  border-color: rgba(168, 85, 247, 0.34);
  box-shadow:
    0 0 0 4px rgba(207, 124, 255, 0.1),
    0 16px 32px rgba(123, 97, 255, 0.1);
}

.daily-topic-dropdown__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(140, 120, 200, 0.95);
  font-size: 0.95rem;
  flex: 0 0 auto;
}

.daily-topic-dropdown__label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.daily-topic-dropdown__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-color, #7a7396);
  font-size: 0.82rem;
  transition:
    transform 0.18s ease,
    color 0.18s ease;
  flex: 0 0 auto;
}

.daily-topic-dropdown.is-open .daily-topic-dropdown__caret {
  transform: rotate(180deg);
  color: rgba(168, 85, 247, 0.95);
}

.daily-topic-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  right: 0;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.daily-topic-dropdown.is-open .daily-topic-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.daily-topic-dropdown__menu-inner {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.45rem;
  border: 1px solid rgba(140, 120, 200, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 20px 40px rgba(64, 44, 120, 0.14),
    0 6px 18px rgba(64, 44, 120, 0.08);
  backdrop-filter: blur(10px);
}

.daily-topic-dropdown__menu-inner::-webkit-scrollbar {
  width: 10px;
}

.daily-topic-dropdown__menu-inner::-webkit-scrollbar-track {
  background: rgba(140, 120, 200, 0.08);
  border-radius: 999px;
}

.daily-topic-dropdown__menu-inner::-webkit-scrollbar-thumb {
  background: rgba(140, 120, 200, 0.26);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.daily-topic-dropdown__menu-inner::-webkit-scrollbar-thumb:hover {
  background: rgba(140, 120, 200, 0.4);
  background-clip: padding-box;
}

.daily-topic-dropdown__item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-color, #1c1730);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.daily-topic-dropdown__item:hover {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  color: rgba(106, 63, 196, 1);
}

.daily-topic-dropdown__item:focus-visible {
  outline: none;
  background: rgba(207, 124, 255, 0.12);
  color: rgba(106, 63, 196, 1);
}

.daily-topic-dropdown__item.is-selected {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  color: rgba(106, 63, 196, 1);
}

.daily-topic-dropdown__item-text {
  font-size: 0.95rem;
  line-height: 1.25;
}

html[data-theme="dark"] .daily-topic-dropdown__toggle {
  border-color: rgba(207, 124, 255, 0.2);
  background: linear-gradient(
    180deg,
    rgba(22, 27, 45, 0.96),
    rgba(16, 21, 37, 0.98)
  );
  color: #eef0ff;
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/*
html[data-theme="dark"] .daily-topic-dropdown__toggle:hover {
  border-color: rgba(207, 124, 255, 0.32);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .daily-topic-dropdown__toggle:focus-visible,
html[data-theme="dark"]
  .daily-topic-dropdown.is-open
  .daily-topic-dropdown__toggle {
  border-color: rgba(207, 124, 255, 0.46);
  box-shadow:
    0 0 0 4px rgba(207, 124, 255, 0.14),
    0 16px 34px rgba(0, 0, 0, 0.34);
}
*/
html[data-theme="dark"] .daily-topic-dropdown__icon {
  color: rgba(207, 124, 255, 0.92);
}

html[data-theme="dark"] .daily-topic-dropdown__caret {
  color: #a7afcf;
}

html[data-theme="dark"]
  .daily-topic-dropdown.is-open
  .daily-topic-dropdown__caret {
  color: #cf7cff;
}

html[data-theme="dark"] .daily-topic-dropdown__menu-inner {
  border-color: rgba(207, 124, 255, 0.18);
  background: rgba(17, 24, 45, 0.98);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.34),
    0 8px 20px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"]
  .daily-topic-dropdown__menu-inner::-webkit-scrollbar-track {
  background: rgba(207, 124, 255, 0.08);
}

html[data-theme="dark"]
  .daily-topic-dropdown__menu-inner::-webkit-scrollbar-thumb {
  background: rgba(207, 124, 255, 0.26);
  background-clip: padding-box;
}

html[data-theme="dark"]
  .daily-topic-dropdown__menu-inner::-webkit-scrollbar-thumb:hover {
  background: rgba(207, 124, 255, 0.4);
  background-clip: padding-box;
}

html[data-theme="dark"] .daily-topic-dropdown__item {
  color: #eef0ff;
}

html[data-theme="dark"] .daily-topic-dropdown__item.is-selected {
  background: rgba(207, 124, 255, 0.16);
  color: #f3dcff;
}

@media (max-width: 768px) {
  .daily-topic-dropdown {
    min-width: 100%;
    max-width: 100%;
  }
}
