.bang-ac-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bg-secondary, var(--bg, #1e1e2e));
  border: 1px solid var(--border-light, rgba(255,255,255,0.1));
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  overflow: hidden;
  font-family: var(--font-sans, sans-serif);
}

.bang-ac-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.06));
}

.bang-ac-item:last-child {
  border-bottom: none;
}

.bang-ac-item:hover,
.bang-ac-item.bang-ac-active {
  background: var(--primary-light, rgba(139,92,246,0.12));
}

.bang-ac-trigger {
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  color: var(--primary, #cba6f7);
  min-width: 90px;
  flex-shrink: 0;
}

.bang-ac-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary, #cdd6f4);
  flex-shrink: 0;
}

.bang-ac-desc {
  font-size: 0.73rem;
  color: var(--text-secondary, #a6adc8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Hide sidebar and expand main column when Maps tab is active */
body.maps-tab-active .results-sidebar {
  display: none !important;
}

body.maps-tab-active .results-layout {
  grid-template-columns: 1fr !important;
  display: block !important;
}

body.maps-tab-active .results-main {
  width: 100% !important;
  max-width: 100% !important;
}

/* Map container */
#maps-plugin-container {
  width: 100%;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-light);
}

#maps-plugin-map {
  width: 100%;
  height: 420px;
}

/* Leaflet popup theming */
#maps-plugin-map .leaflet-popup-content-wrapper {
  background: var(--bg-light);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: none;
  border-radius: 6px;
}

#maps-plugin-map .leaflet-popup-content a {
  color: var(--text-link);
}

#maps-plugin-map .leaflet-popup-tip {
  background: var(--bg-light);
}

#maps-plugin-map .leaflet-control-attribution {
  background: var(--bg-light);
  color: var(--text-secondary);
  font-size: 0.7rem;
}

#maps-plugin-map .leaflet-control-attribution a {
  color: var(--text-link);
}

.maps-no-results {
  padding: 1.5rem;
  color: var(--text-secondary);
  text-align: center;
}

@media (max-width: 600px) {
  #maps-plugin-map {
    height: 260px !important;
  }
}

/* ── Calculator Plugin ─────────────────────────────────────────────────────── */

.calc-widget {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 704px;
  padding: 0 0 4px 0;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  user-select: none;
  overflow: hidden;
}

/* Display */
.calc-display {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px 16px 10px 16px;
  min-height: 72px;
  gap: 8px;
  border: 1px solid var(--border-light);
  border-radius: 13px;
}

.calc-history-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 6px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  line-height: 0;
  transition:
    color 0.15s,
    background 0.15s;
}

.calc-history-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.calc-display-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.calc-expr {
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: right;
  word-break: break-all;
  min-height: 1.4em;
  max-height: 3em;
  overflow: hidden;
  line-height: 1.4;
}

.calc-result {
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--text-primary);
  text-align: right;
  line-height: 1.1;
  word-break: break-all;
}

.calc-result--small {
  font-size: 1.6rem;
}

.calc-result--error {
  font-size: 1.4rem;
  color: var(--text-secondary);
}

/* History Panel */
.calc-history-panel {
  padding: 6px 0;
  max-height: 160px;
  overflow-y: auto;
}

.calc-history-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 12px 16px;
}

.calc-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 16px;
  cursor: pointer;
  transition: background 0.12s;
  gap: 12px;
}

.calc-history-item:hover {
  background: var(--border-light);
}

.calc-history-expr {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calc-history-val {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Grid */
.calc-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.5rem;
  border: 1px solid var(--border-light);
  background-color: var(--bg-light);
  border-radius: 13px;
}

.calc-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

/* Buttons */
.calc-btn {
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 400;
  height: 42px;
  padding: 0 4px;
  transition:
    background 0.12s,
    filter 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
}

button.calc-btn {
  border-radius: 13px;
}

.button-group button.calc-btn:first-child {
  border-radius: 13px 0 0 13px;
}
.button-group button.calc-btn:last-child {
  border-radius: 0 13px 13px 0;
}

.calc-row .button-group {
  grid-column: span 2;
}

.calc-btn sup {
  font-size: 0.6em;
  line-height: 1;
}

.calc-btn--digit {
  background: var(--bg-hover, var(--border-light));
  color: var(--text-primary);
}

.calc-btn--digit:hover {
  filter: brightness(1.15);
}

.calc-btn--digit:active {
  filter: brightness(0.9);
}

.calc-btn--sci {
  background: transparent;
  color: var(--text-secondary);
}

.calc-btn--sci:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.calc-btn--sci:active {
  filter: brightness(0.85);
}

.calc-btn--op {
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.calc-btn--op:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.calc-btn--op:active {
  filter: brightness(0.85);
}

.calc-btn--clear {
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
}

.calc-btn--clear:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.calc-btn--equals {
  background: var(--text-link);
  color: #202124;
  font-size: 1.1rem;
  font-weight: 500;
}

.calc-btn--equals:hover {
  background: var(--text-link-hover);
}

.calc-btn--equals:active {
  background: var(--text-link-active);
}

/* Deg/Rad toggle */
.calc-btn--toggle {
  background: transparent;
  color: var(--text-secondary);
  border-radius: 32px;
  font-size: 0.82rem;
}

.calc-btn--toggle.calc-btn--active {
  background: var(--bg-hover);
  color: var(--text-primary);
  font-weight: 500;
}

.calc-btn--toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Inv active */
.calc-btn--inv {
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.calc-btn--inv:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.calc-btn--inv.calc-btn--active {
  background: var(--bg-hover);
  color: var(--text-primary);
  font-weight: 500;
}

/* Footer */
.calc-footer {
  text-align: center;
  padding: 6px 0 2px;
}

.calc-footer-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 4px;
  transition: color 0.15s;
}

.calc-footer-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.currency-widget {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  max-width: 704px;
  color: var(--text-primary);
  padding: 0 0 8px 0;
}

.currency-header {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
  line-height: 1.4;
}

.currency-result {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.currency-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
  opacity: 0.75;
  margin-bottom: 18px;
}

.currency-inputs {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
}

.currency-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
}

.currency-from-input,
.currency-to-input {
  flex: 1;
  min-width: 0;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  -moz-appearance: textfield;
}

.currency-from-input::-webkit-outer-spin-button,
.currency-from-input::-webkit-inner-spin-button,
.currency-to-input::-webkit-outer-spin-button,
.currency-to-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.currency-select-wrap {
  position: relative;
  flex-shrink: 0;
}

.currency-select-wrap::after {
  content: "▾";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1;
}

.currency-from-select,
.currency-to-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-hover, rgba(128, 128, 128, 0.08));
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 5px 26px 5px 9px;
  cursor: pointer;
  outline: none;
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
}

.currency-from-select:hover,
.currency-to-select:hover {
  border-color: var(--text-secondary);
}

.currency-loading .currency-from-select,
.currency-loading .currency-to-select {
  opacity: 0.5;
  pointer-events: none;
}

.currency-loading .currency-to-input {
  opacity: 0.4;
}

.currency-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0;
}

.dict-card {
  max-width: 704px;
  color: var(--text-primary);
  padding: 0 0 8px 0;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

.dict-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.dict-word {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.dict-phonetic {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-family: ui-monospace, monospace;
  opacity: 0.85;
}

/* Entry groups */

.dict-entry-group {
  margin-bottom: 14px;
}

.dict-entry-group:last-of-type {
  margin-bottom: 8px;
}

.dict-pos {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--link-color, #4a90e2);
  margin-bottom: 6px;
}

/* Definitions list */

.dict-definitions {
  margin: 0 0 8px 0;
  padding-left: 1.3rem;
}

.dict-definitions li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.dict-definition {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.dict-tag {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-hover, rgba(128, 128, 128, 0.1));
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}

.dict-example {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-top: 3px;
  margin-left: 0;
  line-height: 1.45;
}

/* Synonyms */

.dict-synonyms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.dict-syn-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.dict-syn-chip {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-hover, rgba(128, 128, 128, 0.1));
  border: 1px solid var(--border-light, rgba(128, 128, 128, 0.2));
  border-radius: 20px;
  padding: 2px 10px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.dict-syn-chip:hover {
  background: var(--bg-active, rgba(128, 128, 128, 0.2));
  color: var(--text-primary);
}

/* Divider between groups */

.dict-entry-group + .dict-entry-group {
  border-top: 1px solid var(--border-light, rgba(128, 128, 128, 0.15));
  padding-top: 12px;
}

/* Hidden extra groups */

.dict-extra {
  display: none;
}

/* Show-more button */

.dict-more-btn {
  display: block;
  width: 100%;
  max-width: 704px;
  margin-top: 10px;
  padding: 8px 16px;
  background: var(--bg-hover, rgba(128, 128, 128, 0.08));
  border: 1px solid var(--border-light, rgba(128, 128, 128, 0.2));
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease;
}

.dict-more-btn:hover {
  background: var(--bg-active, rgba(128, 128, 128, 0.16));
}

.dict-more-arrow {
  font-size: 0.7rem;
  vertical-align: middle;
  display: inline-block;
  transition: transform 0.2s ease;
}

.dict-more-btn[aria-expanded="true"] .dict-more-arrow {
  transform: rotate(180deg);
}

/* Footer attribution */

.dict-footer {
  margin-top: 10px;
}

.dict-source-link {
  font-size: 0.72rem;
  color: var(--text-secondary);
  opacity: 0.65;
  text-decoration: none;
}

.dict-source-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.qr-result .qr-label {
  word-break: break-all;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.qr-result .qr-image {
  display: block;
  border-radius: 8px;
}

.gh-slot-result {
  padding: 0;
  max-width: 100%;
  width: 100%;
  color: var(--text-primary);
  min-width: 0;
}

.gh-slot-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gh-slot-section {
  margin-bottom: 0;
  min-width: 0;
}

.gh-slot-heading {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.gh-slot-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
  min-width: 0;
}

.gh-slot-grid::-webkit-scrollbar {
  display: none;
}

.gh-slot-grid::-webkit-scrollbar-track {
  background: var(--bg-hover);
  border-radius: 3px;
}

.gh-slot-grid::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  opacity: 0.4;
  border-radius: 3px;
}

.gh-slot-card {
  display: block;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
  min-width: 220px;
  max-width: 280px;
  transition: background 0.15s ease;
}

.results-slot-panel-body a:hover {
  text-decoration: none;
}

.gh-slot-card {
  background: var(--bg-hover);
}

.gh-slot-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gh-slot-avatar--user {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
}

.gh-slot-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gh-slot-avatar-placeholder {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.gh-slot-repo-head,
.gh-slot-user-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.gh-slot-repo-meta,
.gh-slot-user-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.gh-slot-repo-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary, #0969da);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gh-slot-repo-lang {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gh-slot-stars {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
}

.gh-slot-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gh-slot-user-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.gh-slot-user-login {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gh-slot-user-stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
