/* Regional Nostr news shared by the China and Russia undernames. */
#regional-nostr-sidebar:not(.expanded):not(.minimized) {
  visibility: hidden;
}

#regional-nostr-sidebar {
  position: fixed;
  top: 180px;
  right: 25px;
  z-index: 1900;
  width: 258px;
  max-height: 62vh;
  padding: 17px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  color: #f2f2f2;
  background: linear-gradient(145deg, #1c1c1c, #3a3a3a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 0 18px rgba(136, 136, 136, 0.72);
  box-sizing: border-box;
  transition: width 0.25s ease, height 0.25s ease, border-radius 0.25s ease;
}

#regional-nostr-sidebar-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ccc;
  background: transparent;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

#regional-nostr-sidebar-toggle:hover { color: #fff; }
#regional-nostr-sidebar-toggle:focus-visible,
#regional-nostr-sidebar a:focus-visible {
  outline: 3px solid #80d4ff;
  outline-offset: 2px;
}

.regional-nostr-sidebar-title {
  align-self: center;
  margin: 2px 42px 14px;
  color: #5aa9ff;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.regional-nostr-sidebar-region {
  display: block;
  margin-top: 6px;
  color: #d7d7d7;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

#regional-nostr-sidebar-feed {
  min-height: 0;
  overflow-y: auto;
}

.regional-nostr-sidebar-post {
  padding: 13px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: #f2f2f2;
  background: #2e2e2e;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(85, 85, 85, 0.7);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.55;
}

.regional-nostr-sidebar-post a {
  color: #80d4ff;
  text-decoration: underline;
}

.regional-nostr-sidebar-post time {
  display: block;
  margin-top: 8px;
  color: #aaa;
  font-size: 0.65rem;
  text-align: right;
}

#regional-nostr-sidebar-empty {
  margin: 0;
  padding: 12px;
  color: #bbb;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

#regional-nostr-sidebar.minimized {
  width: 58px;
  height: 58px;
  max-height: 58px;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 0 10px #222;
}

#regional-nostr-sidebar.minimized > *:not(#regional-nostr-sidebar-toggle) {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
}

#regional-nostr-sidebar.minimized #regional-nostr-sidebar-toggle {
  position: static;
  width: 58px;
  height: 58px;
  color: #5aa9ff;
  font-size: 0.7rem;
  font-weight: 800;
}

#regional-nostr-sidebar.minimized #regional-nostr-sidebar-toggle:hover {
  color: #80d4ff;
}

@media (max-width: 600px) {
  #regional-nostr-sidebar {
    top: auto;
    right: 14px;
    bottom: 20px;
  }

  #regional-nostr-sidebar.expanded {
    top: 92px;
    right: 14px;
    bottom: auto;
    width: 82vw;
    max-width: 460px;
    max-height: 58vh;
    overflow-y: auto;
  }

  .regional-nostr-sidebar-post { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  #regional-nostr-sidebar { transition: none; }
}
