/**
 * ShaunSocial Ultra-Modern 3-Column Social Feed Layout & Design System
 * Mokita Sosyal / White Rabbit
 */

/* ==========================================================================
   1. Theme Variables & Base Color Palette (ShaunSocial Design Tokens)
   ========================================================================== */
:root {
  --shaun-bg-body: #f8fafc;
  --shaun-surface: #ffffff;
  --shaun-surface-hover: #f1f5f9;
  --shaun-surface-subtle: #f8fafc;
  --shaun-border: #e2e8f0;
  --shaun-border-subtle: rgba(226, 232, 240, 0.7);
  --shaun-border-focus: #6366f1;
  --shaun-text-primary: #0f172a;
  --shaun-text-secondary: #475569;
  --shaun-text-muted: #94a3b8;
  --shaun-primary: #6366f1;
  --shaun-primary-hover: #4f46e5;
  --shaun-primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --shaun-accent-gradient: linear-gradient(135deg, #f59e0b 0%, #ec4899 50%, #8b5cf6 100%);
  --shaun-card-radius: 1.25rem; /* 20px */
  --shaun-card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --shaun-card-shadow-hover: 0 12px 32px -4px rgba(15, 23, 42, 0.09), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

/* Dark Mode Tokens (ShaunSocial Deep Dark Aesthetic) */
html.dark, body.dark {
  --shaun-bg-body: #0b0e14;
  --shaun-surface: #111624;
  --shaun-surface-hover: #182032;
  --shaun-surface-subtle: #141a29;
  --shaun-border: #1e293b;
  --shaun-border-subtle: rgba(255, 255, 255, 0.07);
  --shaun-border-focus: #818cf8;
  --shaun-text-primary: #f8fafc;
  --shaun-text-secondary: #cbd5e1;
  --shaun-text-muted: #64748b;
  --shaun-primary: #6366f1;
  --shaun-primary-hover: #4f46e5;
  --shaun-card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shaun-card-shadow-hover: 0 16px 40px -10px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   2. 3-Column Desktop Grid Layout Container (100% Edge-to-Edge ShaunSocial)
   ========================================================================== */
/* Outer full-width container reset */
body > div.w-full.flex.flex-col,
.w-full.flex.flex-col.md\:p-4,
.w-full.flex.flex-col.md\:px-4 {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* Header full-width edge-to-edge */
header.max-w-screen-3xl,
#white-rabbit-main ~ header,
header {
  max-width: 100% !important;
  width: 100% !important;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--shaun-border) !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  margin: 0 !important;
}

@media (min-width: 1024px) {
  #white-rabbit-main {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 0 !important; /* Zero margin & zero gap between edges */
    column-gap: 0 !important;
    row-gap: 0 !important;
  }

  /* Reset any Tailwind space-x-4 on #white-rabbit-main */
  #white-rabbit-main > * + *,
  #white-rabbit-main > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 1. Sol Sütun (Left Navigation - SIFIR SOL BOŞLUK / DOCKED TO LEFT EDGE) */
  #left-navbar {
    width: 270px !important;
    flex: 0 0 270px !important;
    position: sticky !important;
    top: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 40 !important;
  }

  #left-navbar .left-navbar-inner {
    border-radius: 0 !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: 1px solid var(--shaun-border) !important;
    box-shadow: none !important;
    background-color: var(--shaun-surface) !important;
    padding: 1rem 1.25rem 2rem 1.5rem !important;
    height: calc(100vh - 65px) !important;
    max-height: calc(100vh - 65px) !important;
    top: 0 !important;
    box-sizing: border-box !important;
  }

  /* 2. Orta Sütun (Main Feed Stream - SIFIR BOŞLUK / FULL FLUID CENTER) */
  #honeycomb-main,
  #white-rabbit-main > .overflow-hidden,
  #white-rabbit-main > .w-full.overflow-hidden,
  .shaun-feed-center-col {
    flex: 1 1 0% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
    border-right: 1px solid var(--shaun-border) !important;
    padding: 1.5rem 2rem 4rem 2rem !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* Reset inner template flex gaps */
  #white-rabbit-main .col-span-2.flex,
  #white-rabbit-main .grid {
    gap: 0 !important;
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
  }
  #white-rabbit-main .col-span-2.flex > * + * {
    margin-left: 0 !important;
  }

  /* 3. Sağ Sütun (Widgets Aside - SIFIR SAĞ BOŞLUK / DOCKED TO RIGHT EDGE) */
  #sidebar-feed-right,
  .shaun-sidebar-right-col {
    width: 360px !important;
    flex: 0 0 360px !important;
    position: sticky !important;
    top: 0 !important;
    margin: 0 !important;
    max-height: calc(100vh - 65px) !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
    padding: 1.5rem 1.75rem 4rem 1.75rem !important;
    box-sizing: border-box !important;
  }
  #sidebar-feed-right::-webkit-scrollbar,
  .shaun-sidebar-right-col::-webkit-scrollbar {
    display: none !important;
  }
}

@media (min-width: 1536px) {
  #left-navbar {
    width: 290px !important;
    flex: 0 0 290px !important;
  }
  #left-navbar .left-navbar-inner {
    padding: 1.25rem 1.5rem 2rem 2rem !important;
  }
  #honeycomb-main,
  #white-rabbit-main > .overflow-hidden,
  #white-rabbit-main > .w-full.overflow-hidden,
  .shaun-feed-center-col {
    padding: 1.75rem 3rem 4rem 3rem !important;
  }
  #sidebar-feed-right,
  .shaun-sidebar-right-col {
    width: 390px !important;
    flex: 0 0 390px !important;
    padding: 1.75rem 2rem 4rem 2rem !important;
  }
}

/* ==========================================================================
   3. Left Navigation (ShaunSocial Fixed Sidebar)
   ========================================================================== */
#left-navbar {
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#left-navbar.is-closed {
  width: 250px !important;
}

#left-navbar .left-navbar-inner {
  border-radius: var(--shaun-card-radius) !important;
  background-color: var(--shaun-surface) !important;
  border: 1px solid var(--shaun-border) !important;
  box-shadow: var(--shaun-card-shadow) !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Nav Item Links */
#left-navbar a,
#left-navbar .dark-mode-trigger {
  border-radius: 0.875rem !important; /* 14px */
  padding: 0.65rem 0.85rem !important;
  margin-bottom: 0.25rem !important;
  font-weight: 500 !important;
  color: var(--shaun-text-secondary) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

#left-navbar a:hover,
#left-navbar .dark-mode-trigger:hover {
  background-color: var(--shaun-surface-hover) !important;
  color: var(--shaun-text-primary) !important;
  transform: translateX(3px);
}

#left-navbar a svg,
#left-navbar .dark-mode-trigger svg {
  color: var(--shaun-text-muted) !important;
  transition: color 0.2s ease, transform 0.2s ease;
}

#left-navbar a:hover svg,
#left-navbar .dark-mode-trigger:hover svg {
  color: var(--shaun-primary) !important;
  transform: scale(1.08);
}

/* Active Nav Item */
#left-navbar a.bg-primary,
#left-navbar a[class*="!text-primary"] {
  background: var(--shaun-primary-gradient) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.35) !important;
}

#left-navbar a.bg-primary svg,
#left-navbar a[class*="!text-primary"] svg {
  color: #ffffff !important;
}

/* Left Navbar Action CTA Button (ShaunSocial Post Button) */
.shaun-navbar-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 9999px;
  background: var(--shaun-primary-gradient);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: 0 6px 20px -2px rgba(99, 102, 241, 0.45);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none !important;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.shaun-navbar-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -2px rgba(99, 102, 241, 0.6);
  filter: brightness(1.08);
  color: #ffffff !important;
}

.shaun-navbar-cta-btn:active {
  transform: translateY(0);
}

/* User Card at bottom of Left Nav */
.shaun-navbar-user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem;
  border-radius: 1rem;
  background-color: var(--shaun-surface-subtle);
  border: 1px solid var(--shaun-border-subtle);
  margin-top: auto;
  width: 100%;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.shaun-navbar-user-card:hover {
  background-color: var(--shaun-surface-hover);
  border-color: var(--shaun-border);
}

/* ==========================================================================
   4. ShaunSocial Feed Cards, Stories & Posting Box
   ========================================================================== */

/* Universal ShaunSocial Card Style */
.shaun-card,
#rabbit-story-slider,
#content-insert-system,
#content-filter-bar,
article.main-content {
  border-radius: var(--shaun-card-radius) !important;
  background-color: var(--shaun-surface) !important;
  border: 1px solid var(--shaun-border) !important;
  box-shadow: var(--shaun-card-shadow) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
}

article.main-content:hover {
  border-color: var(--shaun-border-subtle) !important;
  box-shadow: var(--shaun-card-shadow-hover) !important;
}

/* Stories Bar */
#rabbit-story-slider {
  padding: 1rem 1.25rem !important;
  overflow: hidden !important;
}

.shaun-story-avatar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  background: var(--shaun-accent-gradient);
  padding: 2.5px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.shaun-story-avatar-wrap:hover {
  transform: scale(1.06);
}

.shaun-story-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9999px;
  border: 2px solid var(--shaun-surface);
  background-color: var(--shaun-surface);
}

/* New Content / Share Box */
#content-insert-system {
  padding: 1.125rem 1.25rem !important;
}

.shaun-post-input-trigger {
  background-color: var(--shaun-surface-subtle);
  border: 1px solid var(--shaun-border-subtle);
  border-radius: 9999px;
  padding: 0.65rem 1.15rem;
  color: var(--shaun-text-muted);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.shaun-post-input-trigger:hover {
  background-color: var(--shaun-surface-hover);
  border-color: var(--shaun-border);
  color: var(--shaun-text-secondary);
}

/* Action Quick Pills in Share Box */
.shaun-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  background-color: var(--shaun-surface-subtle);
  border: 1px solid var(--shaun-border-subtle);
  color: var(--shaun-text-secondary);
  user-select: none;
}

.shaun-action-pill:hover {
  background-color: var(--shaun-surface-hover);
  border-color: var(--shaun-border);
  color: var(--shaun-text-primary);
  transform: translateY(-1px);
}

.shaun-action-pill.is-story {
  color: #8b5cf6;
  background-color: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
}
.shaun-action-pill.is-story:hover {
  background-color: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.35);
}

.shaun-action-pill.is-quote {
  color: #0284c7;
  background-color: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.2);
}
.shaun-action-pill.is-quote:hover {
  background-color: rgba(2, 132, 199, 0.16);
  border-color: rgba(2, 132, 199, 0.35);
}

.shaun-action-pill.is-reading {
  color: #10b981;
  background-color: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}
.shaun-action-pill.is-reading:hover {
  background-color: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.35);
}

.shaun-action-pill.is-review {
  color: #f43f5e;
  background-color: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.2);
}
.shaun-action-pill.is-review:hover {
  background-color: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.35);
}

/* ==========================================================================
   5. Right Sidebar (ShaunSocial Trending & Discovery Widgets)
   ========================================================================== */
.shaun-widget {
  border-radius: var(--shaun-card-radius);
  background-color: var(--shaun-surface);
  border: 1px solid var(--shaun-border);
  box-shadow: var(--shaun-card-shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: all 0.2s ease;
}

.shaun-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--shaun-border-subtle);
}

.shaun-widget-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--shaun-text-primary);
  letter-spacing: -0.01em;
}

.shaun-widget-action-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--shaun-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.shaun-widget-action-link:hover {
  color: var(--shaun-primary-hover);
  text-decoration: underline;
}

/* Trend Story Row Item */
.shaun-trend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem;
  border-radius: 0.875rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
}

.shaun-trend-item:hover {
  background-color: var(--shaun-surface-hover);
  transform: translateX(3px);
}

.shaun-rank-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 800;
  flex-shrink: 0;
}

.shaun-rank-badge.rank-1 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.shaun-rank-badge.rank-2 {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.2), rgba(100, 116, 139, 0.3));
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.shaun-rank-badge.rank-3 {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.2), rgba(194, 65, 12, 0.3));
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.4);
}

.shaun-rank-badge.rank-other {
  background-color: var(--shaun-surface-subtle);
  color: var(--shaun-text-muted);
  border: 1px solid var(--shaun-border-subtle);
}

.shaun-trend-thumb {
  width: 42px;
  height: 56px;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.shaun-trend-meta {
  flex: 1;
  min-width: 0;
}

.shaun-trend-story-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--shaun-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.shaun-trend-story-author {
  font-size: 0.75rem;
  color: var(--shaun-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.shaun-trend-story-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  color: var(--shaun-text-muted);
  margin-top: 3px;
}

/* Suggested Author Item */
.shaun-author-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem;
  border-radius: 0.875rem;
  transition: all 0.2s ease;
}

.shaun-author-item:hover {
  background-color: var(--shaun-surface-hover);
}

.shaun-author-info {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  flex: 1;
  text-decoration: none !important;
}

.shaun-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.shaun-author-text {
  min-width: 0;
  flex: 1;
}

.shaun-author-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--shaun-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.shaun-author-handle {
  font-size: 0.75rem;
  color: var(--shaun-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Trending Tags Grid */
.shaun-tag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  border-radius: 0.75rem;
  background-color: var(--shaun-surface-subtle);
  border: 1px solid var(--shaun-border-subtle);
  color: var(--shaun-text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.shaun-tag-badge:hover {
  background-color: var(--shaun-surface-hover);
  border-color: var(--shaun-primary);
  color: var(--shaun-primary);
  transform: translateY(-1px);
}

.shaun-tag-count {
  font-size: 0.6875rem;
  color: var(--shaun-text-muted);
  margin-left: 0.35rem;
  padding: 1px 6px;
  border-radius: 9999px;
  background-color: rgba(0, 0, 0, 0.05);
}

html.dark .shaun-tag-count {
  background-color: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   6. Content Filter Bar & Feed Post Enhancements
   ========================================================================== */
#content-book-search-input {
  background-color: var(--shaun-surface-subtle) !important;
  border-color: var(--shaun-border-subtle) !important;
  color: var(--shaun-text-primary) !important;
  border-radius: 9999px !important;
}

#content-book-search-input:focus {
  border-color: var(--shaun-primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

#content-filter-dropdown-btn {
  background-color: var(--shaun-surface-subtle) !important;
  border: 1px solid var(--shaun-border-subtle) !important;
  color: var(--shaun-text-primary) !important;
  border-radius: 9999px !important;
  padding: 0.5rem 1.15rem !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

#content-filter-dropdown-btn:hover {
  background-color: var(--shaun-surface-hover) !important;
  border-color: var(--shaun-border) !important;
}

#content-filter-dropdown-menu {
  background-color: var(--shaun-surface) !important;
  border: 1px solid var(--shaun-border) !important;
  border-radius: 1rem !important;
  box-shadow: var(--shaun-card-shadow-hover) !important;
  overflow: hidden !important;
}

.content-filter-option {
  color: var(--shaun-text-secondary) !important;
  transition: all 0.15s ease !important;
}

.content-filter-option:hover {
  background-color: var(--shaun-surface-hover) !important;
  color: var(--shaun-text-primary) !important;
}

.content-filter-option.active {
  background-color: rgba(99, 102, 241, 0.08) !important;
  color: var(--shaun-primary) !important;
  font-weight: 600 !important;
}

/* Feed Post Action Bar Micro-interactions */
article.main-content button,
article.main-content .post-action-button {
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), color 0.18s ease !important;
}

article.main-content button:active,
article.main-content .post-action-button:active {
  transform: scale(0.92) !important;
}

