/* modules/posts/style.css */
/* Styles specific to Post Feed and Cards */

/* --- FEED SURFACE (Container) --- */
.feed-surface {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  max-width: 100%;
  /* Fills the grid column exactly */
  margin: 0 auto;
}

.feed {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Reduced from 16px for tighter, more professional look */
  padding-bottom: 80px;
}

/* --- CARD (Separate Post) --- */
.post {
  background: #fff;
  border: 1px solid #E2E8F0;
  /* Light, professional gray */
  border-radius: 12px;
  padding: 20px 24px;
  /* More comfortable spacing */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  /* Very subtle shadow */
  cursor: pointer;
  transition: border-color 0.2s ease;
  /* Smooth, no transform */
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, sans-serif;
  margin-bottom: 0;
  /* Remove since we use gap */
}

.posts-media {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.posts-media--in-card {
  margin: 0 16px 12px 16px;
}

.posts-media--in-detail {
  margin-bottom: 16px;
}

.posts-media--feed {
  aspect-ratio: 16 / 9;
  max-height: 420px;
}

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

.posts-media--detail {
  background: #fff;
}

.posts-media--detail img {
  object-fit: contain;
  background: #fff;
}

.posts-share-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
}

.posts-share-btn:hover {
  background: #F1F5F9;
  color: var(--text);
}

.posts-image-preview {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.posts-image-preview[data-hidden="true"] {
  display: none;
}

.posts-image-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.post[data-hidden="true"] {
  display: none;
}

.post:last-child {
  margin-bottom: 0;
}

.post:hover {
  border-color: #CBD5E1;
  /* Slightly darker on hover */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  /* Minimal lift effect */
}

.post:hover .title {
  color: #0a0f1a;
}

/* --- 1. USER HEADER --- */
.p-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.p-user {
  display: flex;
  align-items: flex-start;
  /* Align top of avatar with name */
  gap: 12px;
  min-width: 0;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  overflow: hidden;
  flex: 0 0 auto;
}

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

.who {
  min-width: 0;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.who .name {
  font-size: 16px;
  /* Slightly larger for better hierarchy */
  font-weight: 600;
  /* Professional weight */
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-top: 2px;
}

.who .handle {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

/* Compact Meta Line (Handle + Time + Location) */
.meta-line {
  font-size: 13px;
  color: #64748B;
  /* Consistent professional gray */
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
  /* Allow wrapping on small screens */
  line-height: 1.4;
}

.meta-line .handle-text {
  color: #64748B;
  font-weight: 500;
}

.meta-line .meta-sep {
  color: #94A3B8;
  opacity: 0.7;
}

.meta-line .loc-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Responsive: Better wrapping on mobile */
@media (max-width: 720px) {
  .meta-line {
    gap: 5px;
    line-height: 1.5;
  }
}

.ptime {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
}

/* --- 2. LOCATION TAG (Matches Eye Icon Style) --- */
.loc-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.loc-tag svg {
  opacity: 0.8;
}

/* --- 2. META CONTEXT (Time • Location) --- */
.meta-context {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: -8px;
  margin-bottom: 12px;
  padding: 0 16px;
  font-size: 13px;
  color: #64748B;
  font-weight: 500;
}

/* --- 3. TITLE (Bold, Clickable) --- */
.title {
  font-size: 18px;
  /* Slightly larger for impact */
  font-weight: 700;
  color: #1E293B;
  margin: 0 0 10px 0;
  /* Adjusted margins */
  line-height: 1.4;
  letter-spacing: -0.02em;
  transition: color .12s ease;

  /* CSS Line Clamp */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clickable-title:hover {
  text-decoration: underline;
  color: var(--brand-dark);
}

/* --- 4. DESCRIPTION (Regular, Max 3 Lines) --- */
.desc {
  font-size: 15px;
  font-weight: 400 !important;
  color: #475569;
  /* Slightly lighter for better readability */
  margin: 0 0 16px 0;
  /* Adjusted margins */
  line-height: 1.6;
  white-space: pre-line;

  /* CSS Line Clamp */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- 5. FOOTER (Views) --- */
.post-foot {
  margin-top: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  padding-left: 24px;
  padding-right: 24px;
  margin-left: -24px;
  margin-right: -24px;
  margin-bottom: -20px;
  border-top: 1px solid #F1F5F9;
  /* Subtle separator */
  border-radius: 0 0 12px 12px;
  /* Match card radius */
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6b7280;
  font-size: 12px;
  font-weight: 400;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1;
}

.meta-item svg {
  width: 14px;
  height: 14px;
}

/* Post Management Buttons (Edit/Delete) */
.post-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.action-btn {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .1s;
}

.action-btn.edit {
  background: #F1F5F9;
  color: #334155;
}

.action-btn.edit:hover {
  background: #E2E8F0;
}

.action-btn.delete {
  background: #FEF2F2;
  color: #DC2626;
}

.action-btn.delete:hover {
  background: #FEE2E2;
}

.action-btn.restore {
  background: #F0FDFA;
  color: #0D9488;
}

.action-btn.restore:hover {
  background: #CCFBF1;
}

/* Trash Tag */
.trash-tag {
  display: inline-block;
  background: #FEE2E2;
  color: #DC2626;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* =========================
   Post Detail View
   ========================= */
.post-detail-container {
  max-width: 700px;
  margin: 0 auto;
}

.back-nav {
  margin-bottom: 20px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 14px;
  padding: 0;
}

.back-btn:hover {
  color: var(--text);
}

.post-full-view {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.pd-header {
  margin-bottom: 20px;
}

.pd-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.pd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  align-items: center;
}

.pd-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
}

.pd-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
}

.pd-body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  margin-top: 24px;
}

.pd-stats {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 5px;
  color: var(--muted);
  font-size: 14px;
}

.pd-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================
   Dashboard Manage Toolbar
   ========================= */
.dash-head {
  margin-bottom: 24px;
}

.h-big {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.dash-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid #F1F5F9;
  flex: 1;
}

.dash-tab {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 0 0 10px 0;
  position: relative;
  transition: color .15s ease;
}

.dash-tab:hover {
  color: var(--text);
}

.dash-tab.active {
  color: var(--brand-dark);
}

.dash-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-dark);
}

.dash-tools {
  display: flex;
  gap: 12px;
}

.dash-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.dash-search-wrap svg {
  position: absolute;
  left: 10px;
  color: var(--muted);
  pointer-events: none;
}

.dash-search {
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  width: 200px;
  transition: all 0.2s;
  outline: none;
}

.dash-search:focus {
  border-color: var(--brand-dark);
  width: 240px;
}

.dash-sort {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  outline: none;
  color: var(--text);
}

.dash-sort:focus {
  border-color: var(--brand-dark);
}

/* =========================
   Like Button Styles
   ========================= */
.like-btn,
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  border: 1px solid transparent;
  background: transparent;
  color: #64748B;
  transition: all 0.2s ease;
  line-height: normal;
}

.like-btn {
  cursor: pointer;
}

.like-btn:hover {
  background: #FEF2F2;
  color: #EF4444;
  border-color: #FECACA;
}

.like-btn.active {
  color: #EF4444;
}

.like-btn.active svg {
  fill: #EF4444;
}

.view-btn {
  cursor: default;
}

.like-btn svg {
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-btn.active svg {
  transform: scale(1.1);
}

.like-btn:active svg {
  transform: scale(0.9);
}
