html, body { height: 100%;}
main { padding:10px; }

::-webkit-scrollbar { width: 0.5em;}
::-webkit-scrollbar-thumb {background-color: var(--bs-secondary-color) !important;}

a, .nav-link, .nav-link:hover, .nav-link:active, .nav-link:visited {
  color: var(--bs-body-color)
}

.w-300{
  max-width: 300px;
}

code{
    color: #84888b;
}

.fs-7 {
  font-size: clamp(0.75rem, 1.2cqw, 0.825rem);
}

.fa-2x {
    font-size: 1.8em;
}

html[data-bs-theme="light"] {
  .btn-primary {
    background-color: #e8e8e8f5;
    border-color: #dfdbdb;
    color: var(--bs-body-color);
  }
  .btn-primary i {
    filter: invert(80%);
  }
  .nostr-logo {
    filter: invert(80%);
  }
}

html[data-bs-theme="dark"] {
  .btn-primary {
    background-color:#2b3035;
    border-color: #343a40;
    color: var(--bs-body-color);
  } 
}

.btn-dark {
  background-color: #343a40 !important;
  border-color: #343a40 !important;
  color: var(--bs-body-color) !important;
}

.btn-dark i {
  color: #dfdbdb !important;
  filter: none !important;
}

.btn-primary:hover {
  background-color: #2e2f31;
  border-color: #212529;
}

.btn-primary:active {
  background-color: var(--bs-secondary) !important;
  border: 1px solid rgba(0, 0, 0, 0.096) !important;
}

.btn:disabled {
  border:none;
}

.form-control:focus {
  border: 1px solid transparent !important;
  box-shadow: 0px 0px 3px 0.1rem rgba(177, 13, 253, 0.25) !important

}

.nostr-logo {
  display: inline-block;
  width: 24px;  
  height: 24px; 
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwMCIgaGVpZ2h0PSIxMDAwIiB2aWV3Qm94PSIwIDAgMTAwMCAxMDAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPiA8cGF0aCBkPSJNODEwIDQ2MC4yMjdWNzg3LjY1NUM4MTAgNzk5Ljk2OCA4MDAuMDgxIDgwOS45NjEgNzg3Ljg1OSA4MDkuOTYxSDUyMi4xNjFDNTA5LjkzOCA4MDkuOTYxIDUwMC4wMiA3OTkuOT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yLjQxOSAzOTMuNzgyQzU3Mi40MTkgMzY3LjQyNCA1NTEuMjE0IDM0Ni4wNjIgNTI1LjA1MSAzNDYuMDYyQzQ5OC44ODcgMzQ2LjA2MiA0NzcuNjgzIDM2Ny40MjQgNDc3LjY4MyAzOTMuNzgyQzQ3Ny42ODMgNDIwLjE0IDQ5OC44ODcgNDQxLjUwMSA1MjUuMDUxIDQ0MS41MDFDNTUxLjIxNCA0NDEuNTAxIDU3Mi40MTkgNDIwLjE0IDU3Mi40MTkgMzkzLjc4MloiIGZpbGw9IndoaXRlIi8+IDwvc3ZnPg==');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
  margin-bottom: 2;
}

.nostr-logo-40 {
  width: 40px;
  height: 40px;
}

.purple-text {color: #a575ff; }
.cursor-zoom-in { cursor: zoom-in; }

.gradient-text {
  background: linear-gradient(to right, #007BFF, #FF66B2, #FF9933);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}    

.default-bg {
    border: 1px solid rgba(0, 0, 0, 0.096);
    background-color: rgba(0, 0, 0, .075);
}

.display-5{
  line-height: 1.3;
}

.text-white a {
  color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important;
  text-decoration-color: rgba(255, 255, 255, 0.704) !important;

}

.text-white td, .text-white th{
  color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important;
}

.img-thumbnail {
  padding: 0;
  border-width: 2px;
}

.color-pulse {
  animation: color-pulse 5s ease-in-out infinite;
  will-change: color; 
}

@keyframes color-pulse {
  0%   { opacity: 1;   color: #7c3aed; } 
  25%  { opacity: 0.8; color: #22c55e; } 
  50%  { opacity: 0.6; color: #ec4899; } 
  75%  { opacity: 0.8; color: #22c55e; } 
  100% { opacity: 1;   color: #7c3aed; } 
}

/* Hr with text */
.hr-text {
  display: flex;
  align-items: center;
  text-align: center;
  color:#b0afaf;
}
.hr-text::before, .hr-text::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #b0afaf;
  padding-bottom: 3px;
}
.hr-text::before {
  margin-right: .25em;
}
.hr-text::after {
  margin-left: .25em;
}

/* Message engine */
.message-container {
  position: fixed;
  top: 87;
  right: 10;
  width: 450px;
  z-index: 9999; 
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  word-wrap: break-word;
}

@media (max-width: 994.98px) {
  .message-container {
    width: 95%;
    right: 0;
    bottom: 100;
    margin: 0px 10px;
    height: min-content;
  }

  .message-container .alert {
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }
}

.nav-tabs {
  flex-wrap: nowrap;  
  overflow-x: auto;   
  overflow-y: hidden; 
  white-space: nowrap; 
  display: flex;
  -webkit-overflow-scrolling: touch; 
  scrollbar-width: thin; 
} 
/* Unified search box (hero + navbar). */
.search-box { position: relative; }
.search-box .input-group-text { background: #fff; color: #333; border-color: #fff; }
.search-box .form-control { background: #fff; color: #333; box-shadow: none; }
.search-box .form-control:focus { background: #fff; color: #333; box-shadow: none; }
.search-box .form-control::placeholder { color: #999; }
.search-box-results { position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; background: #fff; color: #333; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.25); max-height: 60vh; overflow-y: auto; z-index: 1050; min-width: 280px; }
.search-box-section { padding: 6px 0; }
.search-box-section + .search-box-section { border-top: 1px solid #eee; }
.search-box-section-title { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: #888; padding: 4px 12px; }
.search-box-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; }
.search-box-item:hover { background: #f3f0fb; }
.search-box-item-thumb { width: 36px; height: 36px; border-radius: 6px; background: #1d1f23; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; overflow: hidden; }
.search-box-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-box-item-main { flex: 1; min-width: 0; }
.search-box-item-title { font-weight: 500; }
.search-box-item-sub { font-size: 0.8rem; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-box-empty { padding: 12px; text-align: center; color: #888; font-size: 0.9rem; }


/* Navbar variant lives inside a Bootstrap dropdown menu; let it fill the dropdown width. */
.search-box-navbar { width: 100%; }
.search-box-navbar .input-group-text, .search-box-navbar .form-control { background: #fff; }
.search-box-navbar .search-box-results { box-shadow: none; border: 1px solid #eee; }


/* ============================================================
 * Note card (shared between /relay feed and home Recent notes)
 * ============================================================ */
.relay-note {
  background: var(--bs-body-bg, #fff);
  border: 1px solid rgba(128, 128, 128, 0.18);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
  animation: relay-card-in 0.4s ease both;
}
/* Spacing between stacked notes lives on the note itself, not on a container's
   `gap`, so wherever you drop a .relay-note (relay feed, home recent notes, any
   future view) the rhythm stays identical. Adjacent-sibling selector means the
   first card sits flush against whatever is above it. */
.relay-note + .relay-note { margin-top: 14px; }
@keyframes relay-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
[data-bs-theme="dark"] .relay-note {
  background: #1c1f24;
  border-color: rgba(255, 255, 255, 0.08);
}
.relay-note:hover {
  border-color: rgba(165, 117, 255, 0.55);
  box-shadow: 0 8px 24px rgba(165, 117, 255, 0.12);
  transform: translateY(-2px);
}
.relay-note-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.relay-note-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a575ff, #6f4eaa);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(165, 117, 255, 0.25);
}
.relay-note-avatar img { width: 100%; height: 100%; object-fit: cover; }
.relay-note-avatar-fallback { font-size: 1rem; letter-spacing: 0.5px; }
.relay-note-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.relay-note-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.95rem; }
.relay-note-name code { font-size: 0.85rem; }
.relay-note-time { font-size: 0.75rem; }
.relay-note-action {
  color: var(--bs-secondary-color, #6c757d);
  padding: 6px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}
.relay-note-action:hover { color: #a575ff; background: rgba(165, 117, 255, 0.12); }
.relay-note-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  margin: 0;
  font-size: 0.95rem;
}
.relay-note-content .relay-hashtag {
  color: #a575ff;
  font-weight: 500;
  text-decoration: none;
}
[data-bs-theme="light"] .relay-note-content .relay-hashtag { color: #7a4ed8; }
.min-w-0 { min-width: 0; }
