/* ════════════════════════════════════════════════════════════
   feed.css — Phase 60.10 Vertical Scroll Feed (Premium)
   /feed — Light, scroll-snap, TikTok pattern, wellness aesthetic
   ════════════════════════════════════════════════════════════ */

body.feedv-page {
  --fv-ink: #1A1714;
  --fv-soft: #5C554A;
  --fv-muted: #9B9285;
  --fv-paper: #FFFFFF;
  --fv-bg: #FAF7F0;      /* cream base (kâğıt hissi) */
  --fv-accent: #8B6E4E;
  --fv-accent-dk: #6B4F35;
  --fv-divider: rgba(232, 223, 211, .55);
  --fv-shadow: 0 8px 32px rgba(26,23,20,.10);
  --fv-shadow-lg: 0 20px 60px rgba(26,23,20,.16);
  --fv-radius: 24px;
  background: var(--fv-bg);
  margin: 0;
  font-family: 'Outfit', system-ui, sans-serif;
  color: var(--fv-ink);
  overflow-x: hidden;
}

body.feedv-page main.main,
body.feedv-page .main {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

/* hide footer newsletter in feed (immersive) */
body.feedv-page .nl,
body.feedv-page .ftr-nl,
body.feedv-page .ftr {
  display: none !important;
}

/* ────────────────────────────────────────────────────────────
   App container
   ──────────────────────────────────────────────────────────── */

.feedv {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ────────────────────────────────────────────────────────────
   Top toolbar
   ──────────────────────────────────────────────────────────── */

.feedv-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(250, 247, 240, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--fv-divider);
}

.feedv-top-back,
.feedv-top-toggle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--fv-paper);
  color: var(--fv-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(26,23,20,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feedv-top-back:hover,
.feedv-top-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26,23,20,.12);
}

.feedv-top-title {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.feedv-top-eyebrow {
  font-family: 'Newsreader', 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 500;
  color: var(--fv-ink);
  letter-spacing: -.01em;
}
.feedv-top-cat {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(139,110,78,.10);
  color: var(--fv-accent-dk);
  letter-spacing: .02em;
}

/* ────────────────────────────────────────────────────────────
   Chips bar
   ──────────────────────────────────────────────────────────── */

.feedv-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 16px 14px;
  background: var(--fv-bg);
  position: sticky;
  top: 64px;
  z-index: 20;
}
.feedv-chips::-webkit-scrollbar { display: none; }

.feedv-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--fv-paper);
  color: var(--fv-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--fv-divider);
  transition: all .2s ease;
  white-space: nowrap;
}
.feedv-chip:hover {
  border-color: var(--fv-accent);
  color: var(--fv-accent-dk);
}
.feedv-chip.is-active {
  background: var(--fv-ink);
  color: var(--fv-paper);
  border-color: var(--fv-ink);
}

/* ────────────────────────────────────────────────────────────
   Scroll stream (scroll-snap container)
   ──────────────────────────────────────────────────────────── */

.feedv-stream {
  flex: 1;
  scroll-snap-type: y mandatory;
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 80px;
}
.feedv-stream:focus-visible { outline: none; }

/* Phase 60.11: PWA Share Target banner */
.feedv-share-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  margin: 10px 16px 14px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, #FDF8F0, #F7EFE2);
  border: 1.5px solid var(--fv-accent, #8B6E4E);
  border-radius: 14px;
  box-shadow: var(--fv-shadow);
  position: relative;
  animation: feedvSlideUp .4s cubic-bezier(.23,1,.32,1);
}
.feedv-share-icon {
  font-size: 28px;
  flex-shrink: 0;
  margin-top: -2px;
}
.feedv-share-content {
  flex: 1;
  min-width: 0;
}
.feedv-share-eyebrow {
  font-family: var(--fv-f-mono, monospace);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fv-accent-dk, #6B4F35);
  font-weight: 700;
  margin-bottom: 4px;
}
.feedv-share-title {
  font-family: 'Newsreader', serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--fv-ink);
  margin-bottom: 4px;
}
.feedv-share-text {
  font-size: 13.5px;
  color: var(--fv-soft);
  line-height: 1.45;
  margin-bottom: 8px;
}
.feedv-share-link {
  display: inline-block;
  font-size: 12.5px;
  color: var(--fv-accent-dk);
  text-decoration: underline;
  margin-bottom: 6px;
  word-break: break-all;
}
.feedv-share-hint {
  font-size: 12px;
  color: var(--fv-muted);
  margin: 6px 0 0;
  font-style: italic;
}
.feedv-share-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(0,0,0,.05);
  border: none;
  font-size: 13px;
  cursor: pointer;
  color: var(--fv-soft);
}
.feedv-share-x:hover { background: rgba(0,0,0,.10); }

/* ────────────────────────────────────────────────────────────
   Card
   ──────────────────────────────────────────────────────────── */

.feedv-card {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: var(--fv-paper);
  border-radius: var(--fv-radius);
  box-shadow: var(--fv-shadow);
  overflow: hidden;
  margin: 0 auto 20px;
  max-width: 560px;
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  transition: box-shadow .3s ease, transform .3s ease;
}
.feedv-card:hover {
  box-shadow: var(--fv-shadow-lg);
}

/* Image */
.feedv-card-img-link {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #E8DFD3, #C4A882);
}
.feedv-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s ease;
}
.feedv-card-img-link:hover .feedv-card-img {
  transform: scale(1.04);
}
.feedv-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.08) 100%);
  pointer-events: none;
}

/* Content */
.feedv-card-content {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.feedv-card-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fv-soft);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.feedv-card-cat-ic { font-size: 14px; }
.feedv-card-dot { color: var(--fv-muted); }

.feedv-card-title {
  font-family: 'Newsreader', 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(22px, 5vw, 30px);
  line-height: 1.18;
  letter-spacing: -.015em;
  color: var(--fv-ink);
  margin: 0;
  font-weight: 500;
}

.feedv-card-excerpt {
  font-size: 16px;
  line-height: 1.55;
  color: var(--fv-soft);
  margin: 0;
}

.feedv-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px dashed var(--fv-divider);
  margin-top: 4px;
}
.feedv-card-author-img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}
.feedv-card-author-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fv-soft);
}

/* ────────────────────────────────────────────────────────────
   Action buttons (Phase 60.x)
   ──────────────────────────────────────────────────────────── */

.feedv-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.feedv-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 14px;
  background: rgba(139,110,78,.06);
  color: var(--fv-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}
.feedv-act:hover {
  background: rgba(139,110,78,.12);
  border-color: rgba(139,110,78,.3);
  transform: translateY(-1px);
}
.feedv-act:active {
  transform: translateY(0);
}
.feedv-act-icon {
  font-size: 16px;
  line-height: 1;
}
.feedv-act-lbl {
  font-size: 13px;
}

.feedv-act-save.is-active {
  background: rgba(193,127,94,.12);
  border-color: var(--accent, #8B6E4E);
  color: var(--fv-accent-dk);
}
.feedv-act-rate.is-active {
  background: rgba(255,193,7,.16);
  border-color: #F5B324;
  color: #B07E0B;
}
.feedv-act-rate.is-active .feedv-act-icon { color: #F5B324; }

.feedv-act-read {
  background: var(--fv-ink);
  color: var(--fv-paper);
}
.feedv-act-read:hover {
  background: var(--fv-accent-dk);
  border-color: transparent;
  color: var(--fv-paper);
}

/* Animation for new action state */
@keyframes feedvActPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.feedv-act.is-active .feedv-act-icon {
  animation: feedvActPop .4s ease;
}

/* ────────────────────────────────────────────────────────────
   Empty / sentinel / end
   ──────────────────────────────────────────────────────────── */

.feedv-empty-card {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  scroll-snap-align: start;
}
.feedv-empty-inner {
  padding: 40px 32px;
  max-width: 360px;
}
.feedv-empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: .6;
}
.feedv-empty-inner h2 {
  font-family: 'Newsreader', serif;
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--fv-ink);
}
.feedv-empty-inner h2 em {
  font-style: italic;
  color: var(--fv-accent-dk);
}
.feedv-empty-inner p {
  font-size: 15px;
  color: var(--fv-soft);
  margin: 0;
}
.feedv-empty-inner a {
  color: var(--fv-accent-dk);
  font-weight: 600;
  text-decoration: underline;
}

.feedv-sentinel {
  padding: 24px 16px;
  display: flex;
  justify-content: center;
}
.feedv-loader {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fv-muted);
  font-size: 14px;
}
.feedv-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(139,110,78,.20);
  border-top-color: var(--fv-accent);
  animation: feedvSpin .9s linear infinite;
}
@keyframes feedvSpin { to { transform: rotate(360deg); } }

.feedv-end {
  padding: 48px 24px 80px;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
  scroll-snap-align: start;
}
.feedv-end-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.feedv-end h3 {
  font-family: 'Newsreader', serif;
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--fv-ink);
}
.feedv-end p {
  font-size: 15px;
  color: var(--fv-soft);
  margin: 0;
}
.feedv-end a {
  color: var(--fv-accent-dk);
  font-weight: 600;
  text-decoration: underline;
}

/* ────────────────────────────────────────────────────────────
   Login modal (reused from post-v5 pattern)
   ──────────────────────────────────────────────────────────── */

body.feedv-page .feedv-login-modal[hidden] { display: none !important; }
.feedv-login-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(26,23,20,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: feedvFade .25s ease;
}
@keyframes feedvFade { from { opacity: 0; } to { opacity: 1; } }

.feedv-login-card {
  background: var(--fv-paper);
  border-radius: 24px;
  padding: 36px 32px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: var(--fv-shadow-lg);
  position: relative;
  animation: feedvSlideUp .35s cubic-bezier(.23,1,.32,1);
}
@keyframes feedvSlideUp {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.feedv-login-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(0,0,0,.05);
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--fv-soft);
}
.feedv-login-x:hover { background: rgba(0,0,0,.10); }

.feedv-login-icon {
  font-size: 44px;
  margin-bottom: 12px;
}
.feedv-login-card h3 {
  font-family: 'Newsreader', serif;
  font-size: 22px;
  margin: 0 0 8px;
}
.feedv-login-card p {
  font-size: 15px;
  color: var(--fv-soft);
  margin: 0 0 24px;
}
.feedv-login-acts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feedv-btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  border: 1.5px solid transparent;
}
.feedv-btn-primary {
  background: var(--fv-ink);
  color: var(--fv-paper);
}
.feedv-btn-primary:hover {
  background: var(--fv-accent-dk);
  transform: translateY(-1px);
}
.feedv-btn-secondary {
  background: var(--fv-paper);
  color: var(--fv-ink);
  border-color: var(--fv-divider);
}
.feedv-btn-secondary:hover {
  border-color: var(--fv-accent);
  color: var(--fv-accent-dk);
}

/* ────────────────────────────────────────────────────────────
   Toast (rating, etc.)
   ──────────────────────────────────────────────────────────── */

.feedv-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  background: var(--fv-ink);
  color: var(--fv-paper);
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--fv-shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: feedvToastIn .3s ease;
}
@keyframes feedvToastIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.feedv-toast.is-leaving {
  animation: feedvToastOut .3s ease forwards;
}
@keyframes feedvToastOut {
  to { opacity: 0; transform: translate(-50%, 20px); }
}

/* Rating mini-popover */
.feedv-rate-pop {
  position: fixed;
  z-index: 9997;
  background: var(--fv-paper);
  border-radius: 999px;
  padding: 8px 14px;
  display: flex;
  gap: 4px;
  box-shadow: var(--fv-shadow-lg);
  animation: feedvSlideUp .25s ease;
}
.feedv-rate-pop button {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 22px;
  color: rgba(0,0,0,.25);
  cursor: pointer;
  transition: all .15s ease;
}
.feedv-rate-pop button:hover,
.feedv-rate-pop button.is-hover {
  color: #F5B324;
  transform: scale(1.15);
}
.feedv-rate-pop button.is-selected {
  color: #F5B324;
}

/* ────────────────────────────────────────────────────────────
   Responsive
   ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .feedv-card {
    margin: 0 0 16px;
    max-width: none;
    border-radius: 20px;
  }
  .feedv-card-content {
    padding: 20px 22px 24px;
    gap: 12px;
  }
  .feedv-card-title {
    font-size: 24px;
  }
  .feedv-card-actions {
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 6px;
  }
  .feedv-act {
    padding: 11px 6px;
    font-size: 12px;
  }
  .feedv-act-lbl {
    font-size: 12px;
  }
  .feedv-stream {
    padding: 12px 12px 60px;
  }
}

@media (max-width: 380px) {
  .feedv-act-lbl { display: none; }
  .feedv-act-read .feedv-act-lbl { display: inline; }
  .feedv-card-actions {
    grid-template-columns: 56px 56px 1fr;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body.feedv-page:not(.force-light) {
    --fv-ink: #EDE7DD;
    --fv-soft: #B8B0A2;
    --fv-muted: #7A7468;
    --fv-paper: #1E1D1B;
    --fv-bg: #141312;
    --fv-divider: rgba(255,255,255,.08);
    --fv-accent: #C4A882;
    --fv-accent-dk: #E8DFD3;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .feedv-stream { scroll-behavior: auto; }
  .feedv-card-img, .feedv-act, .feedv-spinner, .feedv-login-modal, .feedv-login-card, .feedv-toast, .feedv-rate-pop {
    animation: none !important;
    transition: none !important;
  }
}
