/**
 * newx/app/static/css/style.css
 * 
 * Purpose: Custom styles to enhance the basic Bootstrap look for the Twitter-like social media app.
 * Description: Provides specific styling for tweet cards, navigation elements, buttons, 
 * and layout spacing to create a polished user interface.
 */

/* Global Styles & Layout Utilities */
body {
  background-color: #f5f8fa; /* Light gray background similar to Twitter */
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

/* Navbar Overrides */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Main Container Spacing */
.container.main-content {
  max-width: 600px; /* Mimic the narrow feed width */
  padding-top: 2rem;
}

/* Post / Tweet Form Styling */
.card.create-post {
  border: 1px solid #e1e8ed;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.card.create-post .card-header {
  background-color: #fff;
  border-bottom: 1px solid #f0f0f0;
  font-weight: 600;
  border-radius: 0.75rem 0.75rem 0 0;
}

.create-post textarea {
  border: none;
  resize: none;
  box-shadow: none;
  font-size: 1.1rem;
  padding: 1rem;
}

.create-post textarea:focus {
  background-color: #fff;
  border-color: transparent;
  box-shadow: none;
}

/* Post / Tweet Card Styling */
.card.tweet-card {
  border: none;
  border-bottom: 1px solid #e1e8ed;
  border-radius: 0;
  padding: 1rem 0;
  margin-bottom: 0;
  transition: background-color 0.2s ease;
  overflow: hidden;
  max-width: 100%;
}

.card.tweet-card:hover {
  background-color: #f7f9fa;
}

.card.tweet-card .card-body {
  padding: 0;
  padding-left: 1rem;
  min-width: 0;
}

/* Global card containment — the ONLY overflow:hidden boundary.
   Inner containers use min-width:0 + overflow-wrap to fit content. */
.card {
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.card-body {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.tweet-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e1e8ed;
}

.tweet-header {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.tweet-username {
  font-weight: 700;
  color: #14171a;
  margin-right: 0.5rem;
  text-decoration: none;
}

.tweet-username:hover {
  text-decoration: underline;
}

.tweet-handle {
  color: #657786;
  font-size: 0.95rem;
}

.tweet-timestamp {
  color: #657786;
  font-size: 0.9rem;
  margin-left: auto;
}

.tweet-content,
.card-text {
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap; /* Preserve line breaks */
  word-wrap: break-word;
}

.ai-post-content {
  font-size: 1rem;
  line-height: 1.5;
  white-space: normal; /* AI sends HTML, so let browser handle spacing */
  word-wrap: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Text alignment - force left for all card content */
.card-text,
.ai-post-content {
  text-align: left !important;
}

/* Bootstrap text-start support */
.text-start {
  text-align: left !important;
}

/* Post detail view - force left alignment */
.card-body .card-text,
.card-body .ai-post-content {
  text-align: left !important;
}

/* Specific override for post detail content - higher specificity */
.card-body > .d-flex > div > .card-text,
.card-body > .d-flex > div > .ai-post-content,
.card-body .w-100 > .card-text,
.card-body .w-100 > .ai-post-content {
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* AI-Post Formatting */
.ai-post-content {
  color: #1a1a1b;
  line-height: 1.6;
}

.ai-post-content h1,
.ai-post-content h2,
.ai-post-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.ai-post-content ul,
.ai-post-content ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.ai-post-content li {
  margin-bottom: 0.25rem;
}

.ai-post-content p {
  margin-bottom: 1rem;
}

.ai-post-content blockquote {
  border-left: 4px solid #1da1f2;
  padding-left: 1rem;
  color: #657786;
  margin-bottom: 1rem;
}

.ai-post-content pre {
  background-color: #f6f8fa;
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 85%;
  line-height: 1.45;
  margin-bottom: 16px;
  border: 1px solid #e1e4e8;
  max-width: 100%;
  box-sizing: border-box;
}

.ai-post-content code {
  background-color: rgba(27,31,35,0.05);
  border-radius: 3px;
  font-size: 85%;
  margin: 0;
  padding: 0.2em 0.4em;
  font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
}

.ai-post-content pre code {
  background-color: transparent;
  padding: 0;
  border: 0;
  display: inline;
  line-height: inherit;
  margin: 0;
  overflow: visible;
  word-wrap: normal;
  font-size: 100%;
}
/* Dark theme text colors */
body.dark-theme .card-text,
body.dark-theme .ai-post-content {
  color: #e1e8ed;
}

/* Light theme text colors */
.card-text,
.ai-post-content {
  color: #14171a;
}

/* Action Buttons (Like, Reply etc placeholders) */
.tweet-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  max-width: 300px;
}

.action-btn {
  background: none;
  border: none;
  color: #657786;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}

.action-btn:hover {
  color: #1da1f2;
}

/* Button Overrides */
.btn-primary {
  background-color: #1da1f2;
  border-color: #1da1f2;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
}

.btn-primary:hover {
  background-color: #0d8ddb;
  border-color: #0c7cd5;
}

/* Flash Messages */
.alert {
  border-radius: 0.25rem;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

/* Auth Forms */
.auth-container {
  max-width: 400px;
  margin: 3rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.auth-title {
  text-align: center;
  margin-bottom: 2rem;
  color: #1da1f2;
}

/* Profile Page Styles */
.profile-header {
  background: white;
  padding: 1.5rem;
  border-bottom: 1px solid #e1e8ed;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.profile-avatar-lg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px #e1e8ed;
}

.profile-info h2 {
  margin: 0;
  font-weight: 700;
}

.profile-info p {
  margin: 0.25rem 0 0;
  color: #657786;
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin: 2rem 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .container.main-content {
    padding: 1rem 0;
  }

  .card.create-post {
    border-radius: 0;
  }

  /* Mobile Navbar - Ensure hamburger is visible */
  .navbar-toggler {
    display: block !important;
    border: 2px solid rgba(0, 0, 0, 0.4) !important;
    padding: 0.4rem 0.6rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0.375rem;
  }

  /* Dark theme hamburger button - light border and background */
  body.dark-theme .navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
    background-color: rgba(255, 255, 255, 0.15);
  }

  .navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
  }

  /* Dark theme hamburger icon - WHITE lines */
  body.dark-theme .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  }

  /* Light theme collapsed menu - SOLID white background */
  .navbar-collapse {
    background-color: #ffffff !important;
    z-index: 1000;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 0 0 0.5rem 0.5rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  }

  /* Dark theme collapsed menu - SOLID dark background */
  body.dark-theme .navbar-collapse {
    background-color: #192734 !important;
    border: 2px solid #38444d;
  }

  .navbar-collapse.show {
    display: block !important;
  }

  /* Dark theme menu background */
  body.dark-theme .navbar-collapse {
    background-color: #192734 !important;
    border-color: #38444d;
  }

  /* Mobile nav items spacing */
  .navbar-nav .nav-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.25rem 0;
  }

  .navbar-nav .nav-item:last-child {
    border-bottom: none;
  }

  body.dark-theme .navbar-nav .nav-item {
    border-color: #38444d;
  }

  /* Mobile nav links - ensure visibility */
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 500;
    color: #212529 !important; /* Dark text for light mode */
  }

  /* Dark theme mobile nav links - WHITE text */
  body.dark-theme .navbar-nav .nav-link {
    color: #ffffff !important;
  }

  /* Active/hover states for mobile nav */
  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link:active {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.375rem;
  }

  body.dark-theme .navbar-nav .nav-link:hover,
  body.dark-theme .navbar-nav .nav-link:active {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* ============================================
   DARK THEME STYLES
   ============================================ */

/* Dark Theme - Body and Background */
body.dark-theme {
  background-color: #15202b;
  color: #e1e8ed;
}

/* Dark Theme - Navbar */
body.dark-theme .navbar {
  background-color: #192734 !important;
  border-bottom: 1px solid #38444d;
}

body.dark-theme .navbar-brand,
body.dark-theme .nav-link {
  color: #e1e8ed !important;
}

body.dark-theme .nav-link:hover {
  color: #1da1f2 !important;
}

body.dark-theme .navbar-toggler-icon {
  filter: invert(1);
}

/* Dark Theme - Cards */
body.dark-theme .card {
  background-color: #192734;
  border-color: #38444d;
  color: #e1e8ed;
}

body.dark-theme .card-header {
  background-color: #1e2f3e;
  border-color: #38444d;
  color: #e1e8ed;
}

body.dark-theme .card-header.bg-primary {
  background-color: #1da1f2 !important;
  color: #fff;
}

body.dark-theme .card-body {
  color: #e1e8ed;
}

body.dark-theme .card.tweet-card:hover {
  background-color: #1e2f3e;
}

/* Dark Theme - Form Elements */
body.dark-theme .form-control,
body.dark-theme .form-select,
body.dark-theme textarea {
  background-color: #253341;
  border-color: #38444d;
  color: #e1e8ed;
}

body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus,
body.dark-theme textarea:focus {
  background-color: #253341;
  border-color: #1da1f2;
  color: #e1e8ed;
  box-shadow: 0 0 0 0.2rem rgba(29, 161, 242, 0.25);
}

body.dark-theme .form-label {
  color: #e1e8ed;
}

body.dark-theme .form-check-label {
  color: #e1e8ed;
}

body.dark-theme .form-check-input {
  background-color: #253341;
  border-color: #38444d;
}

body.dark-theme .form-check-input:checked {
  background-color: #1da1f2;
  border-color: #1da1f2;
}

/* Dark Theme - Text */
body.dark-theme .text-dark {
  color: #e1e8ed !important;
}

body.dark-theme .text-muted {
  color: #8899a6 !important;
}

body.dark-theme .text-primary {
  color: #1da1f2 !important;
}

/* Dark Theme - Links */
body.dark-theme a {
  color: #1da1f2;
}

body.dark-theme a:hover {
  color: #0d8ddb;
}

body.dark-theme a.text-decoration-none {
  color: inherit;
}

body.dark-theme .tweet-username {
  color: #e1e8ed;
}

body.dark-theme .tweet-content {
  color: #e1e8ed;
}

/* Dark Theme - Buttons */
body.dark-theme .btn-outline-secondary {
  color: #e1e8ed;
  border-color: #38444d;
}

body.dark-theme .btn-outline-secondary:hover {
  background-color: #253341;
  border-color: #1da1f2;
  color: #e1e8ed;
}

body.dark-theme .btn-link {
  color: #e1e8ed;
}

body.dark-theme .btn-close {
  filter: invert(1);
}

/* Dark Theme - Alerts */
body.dark-theme .alert {
  background-color: #192734;
  border-color: #38444d;
  color: #e1e8ed;
}

body.dark-theme .alert-info {
  background-color: #1e3a4c;
  border-color: #1da1f2;
  color: #e1e8ed;
}

body.dark-theme .alert-success {
  background-color: #1e3a2e;
  border-color: #17bf63;
  color: #e1e8ed;
}

body.dark-theme .alert-danger {
  background-color: #3a1e1e;
  border-color: #e0245e;
  color: #e1e8ed;
}

body.dark-theme .alert-warning {
  background-color: #3a321e;
  border-color: #ffad1f;
  color: #e1e8ed;
}

body.dark-theme .alert-light {
  background-color: #253341;
  border-color: #38444d;
  color: #e1e8ed;
}

/* Dark Theme - Accordion (Settings Page) */
body.dark-theme .accordion-item {
  background-color: #192734;
  border-color: #38444d;
}

body.dark-theme .accordion-button {
  background-color: #192734;
  color: #e1e8ed;
}

body.dark-theme .accordion-button:not(.collapsed) {
  background-color: #1e2f3e;
  color: #e1e8ed;
}

body.dark-theme .accordion-button::after {
  filter: invert(1);
}

body.dark-theme .accordion-body {
  background-color: #192734;
  color: #e1e8ed;
}

/* Dark Theme - Pagination */
body.dark-theme .pagination .page-link {
  background-color: #192734;
  border-color: #38444d;
  color: #e1e8ed;
}

body.dark-theme .pagination .page-link:hover {
  background-color: #253341;
  border-color: #1da1f2;
  color: #e1e8ed;
}

body.dark-theme .pagination .page-item.active .page-link {
  background-color: #1da1f2;
  border-color: #1da1f2;
  color: #fff;
}

body.dark-theme .pagination .page-item.disabled .page-link {
  background-color: #192734;
  border-color: #38444d;
  color: #657786;
}

/* Dark Theme - Footer */
body.dark-theme #mainFooter {
  background-color: #192734 !important;
  border-top: 1px solid #38444d;
  color: #8899a6 !important;
}

/* Dark Theme - Dropdown */
body.dark-theme .dropdown-menu {
  background-color: #192734;
  border-color: #38444d;
}

body.dark-theme .dropdown-item {
  color: #e1e8ed;
}

body.dark-theme .dropdown-item:hover {
  background-color: #253341;
  color: #e1e8ed;
}

body.dark-theme .dropdown-divider {
  border-top-color: #38444d;
}

/* Dark Theme - Modals */
body.dark-theme .modal-content {
  background-color: #192734;
  border-color: #38444d;
  color: #e1e8ed;
}

body.dark-theme .modal-header {
  border-color: #38444d;
}

body.dark-theme .modal-footer {
  border-color: #38444d;
}

/* Dark Theme - Inputs Placeholder */
body.dark-theme ::placeholder {
  color: #657786;
  opacity: 1;
}

body.dark-theme :-ms-input-placeholder {
  color: #657786;
}

body.dark-theme ::-ms-input-placeholder {
  color: #657786;
}

/* Dark Theme - Borders */
body.dark-theme .border-light {
  border-color: #38444d !important;
}

body.dark-theme .border-primary {
  border-color: #1da1f2 !important;
}

/* Dark Theme - Background Utilities */
body.dark-theme .bg-light {
  background-color: #253341 !important;
}

/* Dark Theme - Badges */
body.dark-theme .badge.bg-secondary {
  background-color: #657786 !important;
  color: #192734;
}

/* ============================================
   VIDEO STYLING - Desktop Feed
   ============================================ */

/* Video container for consistent sizing */
.video-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  background-color: #000;
  border-radius: 0.5rem;
  overflow: hidden;
}

/* Video element styling — fill card width, adapt height to aspect ratio */
.video-container video {
  width: 100%;
  max-height: 600px;
  display: block;
  border-radius: 0.5rem;
  object-fit: cover; /* Fill width, crop overflow */
}

/* Responsive video sizing */
@media (max-width: 768px) {
  .video-container video {
    max-height: 400px;
  }
}

/* Post media images — fill card width, extend height naturally */
.post-media-img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  display: block;
}

/* Dark theme video container */
body.dark-theme .video-container {
  background-color: #000;
}

/* Video fallback message styling */
.video-fallback {
  background-color: rgba(0, 0, 0, 0.8);
  margin: 0;
  font-size: 0.9rem;
}

.video-fallback a {
  color: #000;
  text-decoration: none;
}

/* Video fallback message */
.video-fallback {
  background-color: #333;
  margin: 0;
  border-radius: 0.5rem;
}

.video-fallback a {
  color: #000;
  text-decoration: none;
}

.video-fallback a:hover {
  background-color: #f0f0f0;
}

/* ============================================
   URL PREVIEW CARD STYLING
   ============================================ */

/* URL Preview card - ensure consistent sizing */
.url-preview-card {
  max-width: 100%;
  overflow: hidden;
}

.url-preview-card .card-body {
  padding: 0.75rem;
}

/* Preview image container */
.url-preview-image-container {
  height: 100%;
  min-height: 100px;
  max-height: 150px;
  overflow: hidden;
}

.url-preview-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive preview adjustments */
@media (max-width: 576px) {
  .url-preview-card .row {
    flex-direction: column;
  }

  .url-preview-card .col-md-4,
  .url-preview-card .col-md-8 {
    width: 100%;
    max-width: 100%;

  }

  .url-preview-image-container {
    max-height: 180px;
    min-height: 180px;
  }
}
/* Defensive fix for center-justified text issue reported by user */
.container .card .card-body .card-text,
.container .card .card-body .ai-post-content,
.tweet-card .card-text,
.reply-card .card-text,
.quote-preview-card .card-text,
.ai-post-content {
  text-align: left !important;
  justify-content: flex-start !important;
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* Feed Content Truncation */
.tweet-card .card-body .feed-content {
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    word-break: break-word;
}

/* Quote Retweet Preview — truncate embedded content to 4 lines */
.tweet-card .quote-preview-card .card-text {
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    word-break: break-word;
}

/* ============================================
   REPLY CARD & CONTENT CONTAINMENT
   Ensure all content stays within card boundaries
   on desktop, tablet, and phone
   ============================================ */

/* Reply card container — fluid boundaries */
.reply-card {
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

/* Flex containers inside cards: children must shrink.
   Flex items default to min-width:auto which prevents shrinking below
   content width. min-width:0 fixes this. */
.card .d-flex > * {
  min-width: 0;
}

/* The .w-100 content area inside d-flex must not exceed card width. */
.reply-card .w-100,
.tweet-card .w-100,
.card .w-100 {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

/* Code-block-wrapper created by JS — must respect parent width */
.code-block-wrapper {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* All block children inside cards must respect boundaries */
.card-text pre,
.card-text code,
.card-text img,
.card-text table,
.ai-post-content pre,
.ai-post-content code,
.ai-post-content img,
.ai-post-content table {
  max-width: 100%;
  box-sizing: border-box;
}

/* Code blocks scroll horizontally inside card — never expand beyond */
.card-text pre,
.ai-post-content pre {
  overflow-x: auto;
  overflow-y: hidden;
}

/* Inline code that's too long — allow wrapping */
.card-text code,
.ai-post-content code {
  word-break: break-all;
}

/* Images inside posts/replies must fit */
.card-text img,
.ai-post-content img {
  height: auto;
}

/* ============================================
   BOOTSTRAP NAV-TABS (Friends Tab, etc.)
   ============================================ */

/* Light theme (default) - Bootstrap handles most of this */
.nav-tabs .nav-link {
  color: #495057;
  border-color: #dee2e6 #dee2e6 #dee2e6;
}

.nav-tabs .nav-link:hover {
  border-color: #e9ecef #e9ecef #dee2e6;
  color: #495057;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  color: #495057;
  background-color: #fff;
  border-color: #dee2e6 #dee2e6 #fff;
}

/* Dark theme - Nav tabs */
body.dark-theme .nav-tabs .nav-link {
  color: #e1e8ed;
  border-color: #38444d;
}

body.dark-theme .nav-tabs .nav-link:hover {
  border-color: #495057 #495057 #38444d;
  color: #e1e8ed;
  background-color: #1e2f3e;
}

body.dark-theme .nav-tabs .nav-link.active,
body.dark-theme .nav-item.show .nav-link {
  color: #e1e8ed;
  background-color: #192734;
  border-color: #38444d #38444d #192734;
}

body.dark-theme .nav-tabs {
  border-bottom-color: #38444d;
}

body.dark-theme .badge.bg-secondary {
  background-color: #657786 !important;
  color: #192734;
}

/* ============================================
   BOOTSTRAP LIST-GROUP (Notifications, Friends lists)
   ============================================ */

/* Light theme (default) - Bootstrap handles most of this */
.list-group-item {
  background-color: #fff;
  border-color: rgba(0, 0, 0, 0.125);
  color: #212529;
}

.list-group-item-action {
  color: #495057;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
  background-color: #f8f9fa;
  color: #495057;
}

.list-group-item-primary {
  background-color: #cfe2ff;
  color: #084298;
}

/* Dark theme - List group */
body.dark-theme .list-group-item {
  background-color: #192734;
  border-color: #38444d;
  color: #e1e8ed;
}

body.dark-theme .list-group-item-action {
  color: #e1e8ed;
}

body.dark-theme .list-group-item-action:hover,
body.dark-theme .list-group-item-action:focus {
  background-color: #1e2f3e;
  color: #e1e8ed;
}

/* Dark theme - List group item with primary state (unread notifications) */
body.dark-theme .list-group-item-primary {
  background-color: #1e3a4c;
  color: #a9cce8;
}

body.dark-theme .list-group-item-primary:hover,
body.dark-theme .list-group-item-primary:focus {
  background-color: #244559;
}

/* ============================================
   FRIEND APPROVAL CARD (in notifications)
   ============================================ */

/* Friend approval card uses inline styles with CSS variables,
   but we add explicit dark theme overrides for consistency */
body.dark-theme .card.friend-request-card {
  background-color: #253341 !important;
  border-color: #38444d !important;
}

/* ============================================
   ANNOUNCEMENT POST STYLES
   ============================================ */

/* Announcement banner - gradient header with emoji and title */
.announcement-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  font-size: 1.3em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
}

/* Announcement bullet points */
.announcement-bullets {
  margin: 15px 0;
  padding-left: 25px;
}

.announcement-bullets li {
  margin-bottom: 10px;
  font-size: 1.05em;
}

/* Announcement footer */
.announcement-footer {
  color: #6c757d;
  font-size: 0.9em;
  margin-top: 15px;
  text-align: center;
}

/* Dark theme - Announcement styles */
body.dark-theme .announcement-banner {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  color: #ffffff;
}

body.dark-theme .announcement-bullets li {
  color: #e1e8ed;
}

body.dark-theme .announcement-footer {
  color: #8899a6;
}

/* ============================================
   ANNOUNCEMENT POST STYLES
   ============================================ */

/* Announcement banner - gradient header for platform announcements */
.announcement-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 15px 20px;
  border-radius: 10px;
  font-size: 1.3em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Announcement post card styling */
.announcement-post .card {
  border: 2px solid #667eea;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.announcement-post .card-body {
  padding: 1.25rem;
}

/* Announcement bullet points */
.announcement-post ul {
  margin: 15px 0;
  padding-left: 25px;
}

.announcement-post li {
  margin-bottom: 10px;
  font-size: 1.05em;
  line-height: 1.5;
}

/* Announcement footer */
.announcement-footer {
  color: #6c757d;
  font-size: 0.9em;
  margin-top: 15px;
  text-align: center;
}

/* Dark theme - Announcement styles */
body.dark-theme .announcement-banner {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  box-shadow: 0 4px 12px rgba(90, 103, 216, 0.4);
}

body.dark-theme .announcement-post .card {
  border-color: #5a67d8;
  box-shadow: 0 4px 20px rgba(90, 103, 216, 0.25);
}

body.dark-theme .announcement-footer {
  color: #a0aec0;
}

body.dark-theme .card.friend-request-card .text-muted {
  color: #8899a6 !important;
}
