@import url('/assets/social/uikit.css');

/* ------------------------------------------------------------------
   THEME TOKENS – calm, product-y dark theme
   ------------------------------------------------------------------ */
:root {
  --s-bg: #020617;
  --s-surface: #020617;
  --s-card: #020617;
  --s-card-alt: #0b1120;
  --s-border-subtle: #1e293b;
  --s-border-strong: #334155;
  --s-accent: #3b82f6;
  --s-accent-soft: rgba(59,130,246,0.12);
  --s-accent-strong: rgba(59,130,246,0.55);
  --s-text: #e5e7eb;
  --s-text-soft: #9ca3af;
  --s-text-muted: #6b7280;
}

/* ------------------------------------------------------------------
   PAGE BACKGROUND
   ------------------------------------------------------------------ */

body {
  background:
    radial-gradient(circle at top left, rgba(15,23,42,0.85), transparent 55%),
    radial-gradient(circle at top right, rgba(30,64,175,0.55), transparent 45%),
    #020617;
  color: var(--s-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

/* ------------------------------------------------------------------
   MAIN LAYOUT
   ------------------------------------------------------------------ */

.social-layout {
  /* let the whole layout breathe more horizontally */
  max-width: 1600px;          /* was 1400px */
  margin: 32px auto 72px;
  padding: 0 24px;            /* was 0 32px; smaller side padding */

  display: grid;

  /* MUCH wider center column vs sidebars */
  grid-template-columns: 190px minmax(0, 5fr) minmax(0, 1.2fr);
  /*   left      center (wide)            right (narrow) */

  gap: 20px;                  /* was 28px; less empty space between columns */
}

.sidebar,
.rightbar {
  position: sticky;
  top: 96px;
  align-self: flex-start;
}

.content {
  min-height: 460px;
  width: 100%;      /* fill the whole grid column */
  max-width: none;  /* cancel any global theme max-width on .content */
}

/* Make hero + composer + posts use full width of the content column */
.content > .card {
  width: 100%;
}


/* ------------------------------------------------------------------
   SIDEBAR NAV (left column)
   ------------------------------------------------------------------ */

.sb-header {
  font-size: 13px;
  color: var(--s-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
}

.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sb-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--s-text-soft);
  background: rgba(15,23,42,0.9);
  border: 1px solid transparent;
  transition:
    background 140ms ease-out,
    border-color 140ms ease-out,
    color 140ms ease-out,
    transform 100ms ease-out;
}

.sb-nav a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148,163,184,0.7);
}

.sb-nav a:hover {
  color: var(--s-text);
  background: #020617;
  border-color: var(--s-border-subtle);
  transform: translateY(-1px);
}

.sb-nav a.active {
  color: #f9fafb;
  background: #020617;
  border-color: var(--s-accent);
}

.sb-nav a.active::before {
  background: var(--s-accent);
}

/* ------------------------------------------------------------------
   GENERIC CARD
   ------------------------------------------------------------------ */

.card {
  border-radius: 18px;
  padding: 16px 18px;
  background: var(--s-card-alt);
  border: 1px solid var(--s-border-subtle);
  box-shadow: 0 18px 40px rgba(15,23,42,0.85);
}

/* ------------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--s-accent);
  background: var(--s-accent);
  color: #f9fafb;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 140ms ease-out,
    border-color 140ms ease-out,
    transform 100ms ease-out,
    box-shadow 140ms ease-out;
}

.btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 16px 40px rgba(37,99,235,0.5);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  border-color: var(--s-border-subtle);
  background: rgba(15,23,42,1);
  color: var(--s-text-soft);
}

.btn-secondary:hover {
  background: #020617;
  color: var(--s-text);
}

/* ------------------------------------------------------------------
   INPUTS / TEXTAREA / SELECT
   ------------------------------------------------------------------ */

.input,
textarea.input {
  width: 100%;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--s-border-subtle);
  background: #020617;
  color: var(--s-text);
  font-size: 14px;
  resize: vertical;
}

.input::placeholder,
textarea.input::placeholder {
  color: rgba(148,163,184,0.7);
}

.input:focus,
textarea.input:focus,
select.input:focus {
  outline: none;
  border-color: var(--s-accent);
  box-shadow: 0 0 0 1px rgba(59,130,246,0.5);
}

/* composer visibility select */
#compose-visibility {
  border-radius: 999px;
  padding: 7px 13px;
  border: 1px solid var(--s-border-subtle);
  background: #020617;
  color: var(--s-text-soft);
  font-size: 13px;
}

/* ------------------------------------------------------------------
   PROFILE HERO HEADER (Facebook-style)
   ------------------------------------------------------------------ */

.profile-hero {
  padding: 0;
  margin-bottom: 20px;
  overflow: hidden;
  background: #020617;
}

.hero-cover {
  position: relative;
  z-index: 1;            /* banner sits behind */
  height: 190px;
  overflow: hidden;
  background-color: #020617;
}

/* Banner image inside the hero; automatically crops to fit */
.hero-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-main {
  position: relative;
  z-index: 2;            /* header + avatar above banner */
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px 22px 18px;
  margin-top: -46px;     /* overlap amount, adjust if you want */
}

.hero-ident {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 3px solid #020617;
  overflow: hidden;
  background: var(--s-card-alt);
  box-shadow: 0 12px 30px rgba(15,23,42,0.8);
}

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

.hero-text {
  padding-bottom: 8px;
}

.hero-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-sub {
  margin-top: 3px;
  font-size: 13px;
  color: var(--s-text-soft);
}

.hero-actions {
  padding-bottom: 10px;
}

.hero-profile-btn {
  font-size: 13px;
}

/* ------------------------------------------------------------------
   COMPOSER (center column top)
   ------------------------------------------------------------------ */

.composer {
  margin-bottom: 22px;
}

.composer-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--s-text-soft);
}

#compose-body {
  min-height: 120px;           /* <<< big, normal status box */
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.composer-row {
  justify-content: space-between;
}

.composer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.composer-right {
  display: flex;
  align-items: center;
}

/* ------------------------------------------------------------------
   FEED & POSTS
   ------------------------------------------------------------------ */

.feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* each post card */
.post {
  border-radius: 16px;
  padding: 14px 16px;
  background: #020617;
  border: 1px solid var(--s-border-subtle);
}

.post .meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--s-text-soft);
  margin-bottom: 5px;
}

.post .meta span {
  color: var(--s-text-muted);
}

.post-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--s-text);
  white-space: pre-wrap;
  margin-bottom: 4px;
}

/* future like/comment row */
.actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
}

/* ------------------------------------------------------------------
   RIGHT COLUMN (who to follow / stats)
   ------------------------------------------------------------------ */

.rightbar .card + .card {
  margin-top: 16px;
}

.rb-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

#suggestions,
#mystats {
  font-size: 13px;
  color: var(--s-text-soft);
}

/* ------------------------------------------------------------------
   OTHER PAGES: PROFILE / DIRECTORY / MESSAGES / FORUM
   ------------------------------------------------------------------ */

.profile-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.profile-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
  background: #020617;
  border: 1px solid var(--s-border-subtle);
}

.profile-card .name {
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-card .bio {
  font-size: 13px;
  color: var(--s-text-soft);
}

/* Profile settings layout */
.profile-settings-card .card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

.profile-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.profile-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--s-text-soft);
}

.profile-field input[type="text"],
.profile-field textarea {
  width: 100%;
}

.profile-upload-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-upload {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.profile-upload label {
  font-size: 13px;
  font-weight: 500;
  color: var(--s-text-soft);
  min-width: 72px;
}

.profile-upload-input {
  flex: 1;
  font-size: 13px;
  color: var(--s-text-soft);
}

.profile-upload-input input[type="file"] {
  width: 100%;
  font-size: 13px;
}

.profile-upload-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--s-text-muted);
}

.profile-avatar-preview {
  border-radius: 999px;
  overflow: hidden;
  background: #020617;
  border: 1px solid var(--s-border-subtle);
}

.profile-avatar-preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: block;
}

.profile-banner-preview {
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  max-width: 260px;
  background: #020617;
  border: 1px solid var(--s-border-subtle);
}

.profile-banner-preview img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}

.profile-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
}

.dir-row {
  padding: 10px 2px;
  border-bottom: 1px solid var(--s-border-subtle);
  font-size: 14px;
}

/* messages */
.messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.messages-tabs {
  display: flex;
  gap: 6px;
}

.messages-tab {
  border-radius: 999px;
  border: 1px solid var(--s-border-subtle);
  padding: 6px 12px;
  font-size: 12px;
  background: #020617;
  color: var(--s-text-soft);
  cursor: pointer;
}

.messages-tab.active {
  background: var(--s-accent);
  color: #020617;
  border-color: var(--s-accent);
}

.messages-layout {
  margin-top: 8px;
  align-items: flex-start;
}

.messages-pane {
  min-height: 260px;
}

.msg-list {
  margin-top: 8px;
  max-height: 420px;
  overflow-y: auto;
}

/* rows in the left conversation list */
.msg-row {
  width: 100%;
  border: 0;
  background: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--s-border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.msg-row:last-child {
  border-bottom: none;
}

.msg-row-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
}

.msg-row-main {
  flex: 1;
}

.msg-row-name {
  font-size: 14px;
  margin-bottom: 2px;
}

.msg-row-snippet {
  font-size: 12px;
  color: var(--s-text-soft);
}

.msg-row-time {
  font-size: 11px;
  color: var(--s-text-soft);
}

/* thread view on the right */
#thread-view {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding-top: 4px;
  padding-bottom: 8px;
  max-height: 360px;
  overflow-y: auto;
}

.msg {
  max-width: 72%;
  padding: 8px 11px;
  border-radius: 14px;
  margin: 6px 0;
  background: #020617;
  border: 1px solid var(--s-border-subtle);
  font-size: 13px;
}

.msg-me {
  align-self: flex-end;
  background: #0f172a;
}

.msg-them {
  align-self: flex-start;
}

.msg-body {
  font-size: 14px;
}

.msg-meta {
  font-size: 11px;
  margin-top: 2px;
  color: var(--s-text-soft);
}

/* composer */
.msg-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg-recipient-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-form-actions {
  display: flex;
  justify-content: flex-end;
}


#thread-view {
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

/* small pill badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #020617;
  border: 1px solid var(--s-border-subtle);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--s-text-soft);
}

/* forum table */
.forum-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.forum-table th,
.forum-table td {
  padding: 10px;
  border-bottom: 1px solid var(--s-border-subtle);
}

.thread-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--s-border-subtle);
}

/* comments */
.comment {
  padding: 8px 0;
  border-bottom: 1px solid var(--s-border-subtle);
  font-size: 14px;
}

/* ------------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------------ */

@media (max-width: 1100px) {
  .social-layout {
    grid-template-columns: 220px minmax(0, 2fr);
    grid-template-rows: auto auto;
    grid-template-areas:
      "sidebar content"
      "sidebar rightbar";
    gap: 20px;
  }

  .sidebar {
    grid-area: sidebar;
  }
  .content {
    grid-area: content;
  }
  .rightbar {
    grid-area: rightbar;
    position: static;
    top: auto;
  }
}

@media (max-width: 840px) {
  .social-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "content"
      "sidebar"
      "rightbar";
    padding-inline: 20px;
    gap: 18px;
  }

  .sidebar,
  .rightbar {
    position: static;
    top: auto;
  }

  .sidebar {
    order: -1;
  }

  .sb-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .sb-nav::-webkit-scrollbar {
    display: none;
  }

  .sb-nav a {
    white-space: nowrap;
  }

  .hero-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .hero-actions {
    padding-bottom: 0;
  }
}

@media (max-width: 640px) {
  .social-layout {
    margin-top: 20px;
    padding-inline: 14px;
  }

  .card {
    border-radius: 16px;
  }

  .post {
    padding-inline: 11px;
  }

  .hero-cover {
    height: 150px;
  }

  .hero-avatar {
    width: 78px;
    height: 78px;
  }

  #compose-body {
    min-height: 90px;
  }
}

/* ------------------------------------------------------------------
   FRIENDS – sidebar list & friends page
   ------------------------------------------------------------------ */

#my-friends-list {
  font-size: 13px;
  color: var(--s-text-soft);
}

.friend-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.friend-mini + .friend-mini {
  border-top: 1px solid var(--s-border-subtle);
}

.friend-mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.friend-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-mini-name {
  font-size: 13px;
  color: var(--s-text);
}

/* Friends page */

.friends-card {
  margin-top: 16px;
}

.friends-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.friends-tabs {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px;
  background: #020617;
  border: 1px solid var(--s-border-subtle);
}

.friends-tab {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--s-text-soft);
  cursor: pointer;
}

.friends-tab.active {
  background: var(--s-accent-soft);
  color: var(--s-text);
}

.friend-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.friend-list {
  border-top: 1px solid var(--s-border-subtle);
}

.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--s-border-subtle);
  gap: 12px;
}

.friend-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.friend-row-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.friend-row-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-row-name {
  font-size: 14px;
}

.friend-row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.friends-requests-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .friends-requests-columns {
    grid-template-columns: 1fr 1fr;
  }
}

.friends-requests-col .sub-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--s-text-soft);
}

/* Small utilities */

.text-soft {
  color: var(--s-text-soft);
}

.small {
  font-size: 12px;
}

/* Compact buttons + friend pill */

.btn.btn-xs,
.btn-xs {
  padding: 4px 8px;
  font-size: 12px;
}

.friend-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--s-border-subtle);
  font-size: 12px;
  color: var(--s-text-soft);
}

.hidden {
  display: none !important;
}

