/* NDS LinkedIn Preview — LinkedIn-feel + NDS orange accents */

* { box-sizing: border-box; }

:root {
  --li-bg: #f4f2ee;
  --li-card: #ffffff;
  --li-text: rgba(0,0,0,0.9);
  --li-text-secondary: rgba(0,0,0,0.6);
  --li-text-muted: rgba(0,0,0,0.45);
  --li-border: rgba(0,0,0,0.08);
  --li-link: #0a66c2;
  --li-link-hover: #004182;
  --nds-orange: #F26A1B;
  --nds-orange-hover: #d75a10;
  --nds-slate: #0F172A;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--li-bg);
  color: var(--li-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--nds-slate);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-logo {
  height: 36px;
  width: auto;
  background: #fff;
  border-radius: 4px;
  padding: 4px 8px;
}
.site-title {
  flex: 1;
  min-width: 0;
}
.site-title h1 {
  margin: 0 0 2px 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.site-title p {
  margin: 0;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
}

/* ===== FEED ===== */
.feed {
  max-width: 552px;       /* LinkedIn organic post column width */
  margin: 24px auto;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== POST CARD ===== */
.post-card {
  background: var(--li-card);
  border: 1px solid var(--li-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
}

/* head */
.post-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px 8px;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--li-border);
  padding: 4px;
  flex-shrink: 0;
}
.head-meta {
  flex: 1;
  min-width: 0;
}
.head-meta .name {
  font-weight: 600;
  color: var(--li-text);
  font-size: 14px;
}
.head-meta .subname {
  color: var(--li-text-secondary);
  font-size: 12px;
}
.head-meta .timestamp {
  color: var(--li-text-muted);
  font-size: 12px;
}
.more {
  color: var(--li-text-muted);
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  cursor: default;
  user-select: none;
}

/* caption */
.post-caption {
  padding: 0 16px 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 14px;
  color: var(--li-text);
}
.post-caption .tags {
  color: var(--li-link);
  font-weight: 600;
}

/* media — single */
.post-media.single {
  background: #000;
  display: flex;
  justify-content: center;
}
.post-media.single img {
  width: 100%;
  height: auto;
  display: block;
}

/* media — carousel (horizontal swipe, LinkedIn-native 2026) */
.post-media.carousel {
  position: relative;
  background: #000;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  display: block;
  scroll-snap-align: start;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}
.post-media.carousel:hover .carousel-btn {
  opacity: 1;
}
.carousel-btn:hover {
  background: rgba(0,0,0,0.8);
}
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.carousel-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  z-index: 2;
  pointer-events: none;
}

/* LinkedIn-style action bar (visual only) */
.li-actions {
  display: flex;
  justify-content: space-around;
  padding: 8px 4px;
  border-top: 1px solid var(--li-border);
  color: var(--li-text-secondary);
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}
.li-actions span {
  padding: 6px 12px;
  border-radius: 4px;
  cursor: default;
}

/* NDS action row (functional) */
.card-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px 12px;
  background: #fafafa;
  border-top: 1px solid var(--li-border);
}
.btn-orange {
  background: #fff;
  color: var(--nds-orange);
  border: 1.5px solid var(--nds-orange);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  font-family: inherit;
}
.btn-orange:hover {
  background: var(--nds-orange);
  color: #fff;
}
.btn-orange:active {
  background: var(--nds-orange-hover);
  border-color: var(--nds-orange-hover);
  color: #fff;
}
.btn-download-all {
  white-space: nowrap;
  font-size: 12px;
  padding: 7px 12px;
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-download-all:hover {
  background: var(--nds-orange);
  border-color: var(--nds-orange);
  color: #fff;
}

/* footer */
footer {
  max-width: 720px;
  margin: 16px auto 40px;
  padding: 12px 20px;
  text-align: center;
  color: var(--li-text-muted);
  font-size: 12px;
}
footer .small {
  font-size: 11px;
  margin-top: 4px;
}

/* toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--nds-slate);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* mobile tweaks */
@media (max-width: 480px) {
  .header-inner {
    padding: 10px 12px;
    gap: 10px;
  }
  .site-logo { height: 28px; }
  .site-title h1 { font-size: 14px; }
  .site-title p { font-size: 11px; }
  .btn-download-all { font-size: 11px; padding: 6px 10px; }
  .feed { padding: 0 8px; gap: 12px; margin: 16px auto; }
  .post-head { padding: 10px 12px 6px; }
  .post-caption { padding: 0 12px 10px; font-size: 13px; }
  .card-actions { padding: 8px; }
  .btn-orange { font-size: 12px; padding: 7px 11px; }
  .carousel-btn { opacity: 1; } /* always visible on mobile, no hover */
}
