/* NewsDesk Pro — red/white theme matching reference app */
:root{
  --ndp-red:#e02020;
  --ndp-red-dark:#c41818;
  --ndp-red-light:#fde8e8;
  --ndp-pink:#fce4e4;
  --ndp-grey:#6b7280;
  --ndp-border:#e7e7ea;
  --ndp-bg:#f3f4f6;
  --ndp-green:#1a8a4a;
  --ndp-green-bg:#e3f6ea;
}

.ndp-wrap, .ndp-app{
  max-width:720px;
  margin:0 auto;
  background:var(--ndp-bg);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:#1a1a1a;
  padding-bottom:80px;
}

/* Top bar */
.ndp-topbar{ background:var(--ndp-red); padding:8px 16px; }
.ndp-topbar-inner{ display:flex; align-items:center; justify-content:space-between; }
.ndp-brand{ background:#fff; color:var(--ndp-red); font-weight:800; padding:4px 14px; border-radius:20px; font-size:16px; }
.ndp-brand span{ color:var(--ndp-red); }
.ndp-topbar-right{ display:flex; gap:8px; }
.ndp-chip{ background:rgba(255,255,255,.18); color:#fff; padding:5px 12px; border-radius:20px; font-size:12px; }
.ndp-icon-chip{ border:none; cursor:pointer; display:inline-flex; align-items:center; gap:4px; font-weight:700; }
.ndp-lang-wrap{ position:relative; }
.ndp-lang-menu{
  position:absolute; top:calc(100% + 8px); right:0; background:#fff; border-radius:10px;
  box-shadow:0 4px 16px rgba(0,0,0,.18); overflow:hidden; z-index:60; min-width:170px;
}
.ndp-lang-menu button{ display:block; width:100%; text-align:left; padding:11px 16px; background:none; border:none; font-size:13.5px; color:#333; cursor:pointer; }
.ndp-lang-menu button:hover{ background:#f4f4f6; }
.ndp-lang-menu button + button{ border-top:1px solid var(--ndp-border); }

/* Profile chip + menu */
.ndp-profile-wrap{ position:relative; }
.ndp-profile-btn{ width:32px; height:32px; padding:0; justify-content:center; border-radius:50%; }
.ndp-profile-avatar{ width:32px; height:32px; border-radius:50%; object-fit:cover; }
.ndp-profile-name{ padding:11px 16px 4px; font-weight:700; font-size:13.5px; color:#222; }
#ndp-profile-menu button{ display:block; width:100%; text-align:left; padding:11px 16px; background:none; border:none; font-size:13.5px; color:#333; cursor:pointer; }
#ndp-profile-menu button:hover{ background:#f4f4f6; }

/* Auth modal (reuses the same sheet chrome as the share sheet) */
.ndp-auth-modal{
  position:fixed; left:0; right:0; bottom:0; max-width:720px; margin:0 auto;
  background:#fff; border-radius:20px 20px 0 0; z-index:201; padding:24px 20px 28px;
  box-shadow:0 -6px 24px rgba(0,0,0,.15);
  transform:translateY(100%); transition:transform .25s ease;
}
.ndp-auth-modal.ndp-sheet-open{ transform:translateY(0); }
.ndp-auth-tabs{ display:flex; gap:8px; margin-bottom:18px; }
.ndp-auth-tab{ flex:1; padding:10px; border-radius:10px; border:1px solid var(--ndp-border); background:#f7f7f9; font-weight:700; font-size:14px; color:#666; cursor:pointer; }
.ndp-auth-tab.active{ background:var(--ndp-red); color:#fff; border-color:var(--ndp-red); }
.ndp-auth-form input{ width:100%; padding:12px 14px; border:1px solid var(--ndp-border); border-radius:10px; font-size:14px; box-sizing:border-box; background:#fafafa; margin-bottom:12px; }
.ndp-auth-error{ background:#fdeaea; color:var(--ndp-red); padding:10px 14px; border-radius:8px; font-size:13px; margin-bottom:14px; }
.ndp-auth-divider{ text-align:center; color:var(--ndp-grey); font-size:12px; margin:16px 0 12px; position:relative; }
.ndp-auth-divider::before, .ndp-auth-divider::after{ content:''; position:absolute; top:50%; width:40%; height:1px; background:var(--ndp-border); }
.ndp-auth-divider::before{ left:0; }
.ndp-auth-divider::after{ right:0; }
#ndp-google-btn{ display:flex; justify-content:center; }

/* Hide Google's own translate banner/highlighting so only our chip shows */
.goog-te-banner-frame, .skiptranslate > iframe { display:none !important; }
body{ top:0 !important; }
.goog-text-highlight{ background:none !important; box-shadow:none !important; }

/* Font-size scaling (cycled by the "Aa" chip) */
.ndp-fs-sm .ndp-excerpt-text, .ndp-fs-sm .ndp-full-text, .ndp-fs-sm .ndp-story-body h3 { font-size:12.5px; }
.ndp-fs-sm .ndp-story-body h3{ font-size:16px; }
.ndp-fs-md .ndp-excerpt-text, .ndp-fs-md .ndp-full-text { font-size:14px; }
.ndp-fs-md .ndp-story-body h3{ font-size:18px; }
.ndp-fs-lg .ndp-excerpt-text, .ndp-fs-lg .ndp-full-text { font-size:17px; }
.ndp-fs-lg .ndp-story-body h3{ font-size:21px; }

/* Admin desk header */
.ndp-header{ background:linear-gradient(180deg,var(--ndp-red),var(--ndp-red-dark)); color:#fff; padding:18px 16px 22px; display:flex; align-items:center; gap:14px; position:relative; }
.ndp-header-icon{ background:#f5b400; width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:20px; }
.ndp-header h1{ margin:0; font-size:20px; }
.ndp-header p{ margin:2px 0 0; opacity:.9; font-size:13px; }
.ndp-logout{ position:absolute; right:16px; top:18px; color:#fff; font-size:20px; text-decoration:none; }
.ndp-header-red{ background:linear-gradient(180deg,var(--ndp-red),var(--ndp-red-dark)); color:#fff; padding:18px 16px; }
.ndp-header-red p{ opacity:.9; font-size:13px; margin:4px 0 0; }
.ndp-app-header{ background:linear-gradient(180deg,var(--ndp-red),var(--ndp-red-dark)); color:#fff; padding:18px 16px; }
.ndp-app-header h2{ margin:0; font-size:19px; }
.ndp-app-header p{ margin:6px 0 0; font-size:13px; opacity:.92; }

/* Tabs (Admin Desk top nav) */
.ndp-tabs{ display:flex; background:#fff; border-bottom:1px solid var(--ndp-border); overflow-x:auto; white-space:nowrap; }
.ndp-tabs a{ padding:14px 16px; color:var(--ndp-red); text-decoration:none; font-weight:600; font-size:14.5px; border-bottom:3px solid transparent; }
.ndp-tabs a.active{ border-bottom-color:var(--ndp-red); color:var(--ndp-red); }
.ndp-tabs a:not(.active){ color:#8b8b90; }

.ndp-content{ padding:18px 16px; }
.ndp-section-title{ font-size:19px; margin:6px 0 16px; }

/* Cards */
.ndp-card{ background:#fff; border-radius:14px; padding:18px; margin-bottom:16px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.ndp-card h3{ margin:0 0 8px; font-size:16px; }
.ndp-card h4{ margin:8px 0 4px; font-size:15.5px; }
.ndp-card label{ display:block; font-size:13px; color:#444; margin:12px 0 6px; font-weight:600; }
.ndp-card input[type=text], .ndp-card input[type=email], .ndp-card select, .ndp-card textarea{
  width:100%; padding:12px 14px; border:1px solid var(--ndp-border); border-radius:10px; font-size:14px; box-sizing:border-box; background:#fafafa;
}
.ndp-card textarea{ resize:vertical; }
.ndp-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ndp-hidden{ display:none; }

/* Stat cards on Overview */
.ndp-stat{ display:flex; flex-direction:column; gap:6px; }
.ndp-stat span{ color:var(--ndp-grey); font-size:13px; }
.ndp-stat strong{ font-size:26px; }

/* Buttons */
.ndp-btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:13px 18px; border-radius:10px; font-weight:700; font-size:14.5px; text-decoration:none; border:none; cursor:pointer; }
.ndp-btn-primary{ background:var(--ndp-red); color:#fff; }
.ndp-btn-primary:hover{ background:var(--ndp-red-dark); color:#fff; }
.ndp-btn-outline{ background:#fff; color:var(--ndp-red); border:1px solid var(--ndp-border); }
.ndp-btn-block{ display:flex; width:100%; margin-top:10px; box-sizing:border-box; }
.ndp-danger{ color:var(--ndp-red); text-decoration:none; font-weight:600; }

/* AI box */
.ndp-ai-box{ background:var(--ndp-red-light); border:1px solid #f6c8c8; }
.ndp-ai-box h3{ color:var(--ndp-red); }
.ndp-ai-box textarea{ width:100%; margin:10px 0; padding:12px; border-radius:10px; border:1px solid #f0b8b8; background:#fff; box-sizing:border-box; }

/* Badges */
.ndp-badge{ display:inline-block; padding:4px 10px; border-radius:6px; font-size:11px; font-weight:700; }
.ndp-badge-green{ background:var(--ndp-green-bg); color:var(--ndp-green); }
.ndp-badge-grey{ background:#eee; color:#666; }
.ndp-badge-red{ background:var(--ndp-red); color:#fff; }
.ndp-badge-dark{ background:rgba(0,0,0,.65); color:#fff; }
.ndp-badge-pink{ background:var(--ndp-pink); color:var(--ndp-red); }
.ndp-badge-sm{ font-size:10px; padding:3px 8px; }

.ndp-row-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ndp-row-actions{ display:flex; gap:18px; margin-top:12px; font-size:13.5px; }
.ndp-row-actions a{ text-decoration:none; color:#333; font-weight:600; }
.ndp-muted{ color:var(--ndp-grey); font-size:13px; }
.ndp-notice{ background:#e3f6ea; color:var(--ndp-green); padding:12px 16px; border-radius:10px; margin-bottom:14px; font-size:14px; }
.ndp-info-box ul{ margin:8px 0 0 18px; padding:0; font-size:13.5px; }
.ndp-info-box strong{ font-size:14px; }

/* Bottom nav (both admin + front-end) */
.ndp-bottom-nav{
  position:fixed; bottom:0; left:0; right:0; max-width:720px; margin:0 auto;
  background:#fdeaea; display:flex; border-top:1px solid #f4cccc; z-index:50;
}
.ndp-bottom-nav a{ flex:1; text-align:center; padding:8px 2px 10px; text-decoration:none; color:#8a6a6a; font-size:11px; }
.ndp-bottom-nav a span{ display:block; font-size:18px; margin-bottom:2px; }
.ndp-bottom-nav a.active{ color:var(--ndp-red); font-weight:700; }

/* Story card (Headlines view) */
.ndp-story-card{
  /* No overflow:hidden here — that would break position:sticky on the
     action bar below. Rounding is applied to the media element (top
     corners) and via box-shadow/border for the card's own visual edge. */
  background:#fff; margin:14px 16px 22px; border-radius:18px;
  box-shadow:0 2px 12px rgba(0,0,0,.08); border:1px solid #f0f0f2;
}
.ndp-story-media{
  position:relative; display:flex; align-items:flex-start; gap:8px; padding:14px;
  background:#222; aspect-ratio:16/10; overflow:hidden;
  border-radius:18px 18px 0 0;
}
.ndp-story-media-img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
.ndp-story-media .ndp-badge{ position:relative; z-index:1; }
.ndp-audio-btn{
  position:absolute; right:14px; bottom:14px; z-index:1; display:flex; align-items:center; gap:6px;
  background:rgba(0,0,0,.65); color:#fff; border:none; border-radius:20px; padding:7px 14px;
  font-size:12.5px; font-weight:600; cursor:pointer;
}
.ndp-audio-btn:hover{ background:rgba(0,0,0,.8); }
.ndp-audio-btn.ndp-audio-playing{ background:var(--ndp-red); }
.ndp-audio-icon{ display:flex; }
.ndp-story-body{ padding:16px; }
.ndp-story-body h3{ margin:4px 0 8px; font-size:18px; line-height:1.35; }
.ndp-story-body p{ font-size:14px; line-height:1.55; color:#333; }
.ndp-byline{ color:var(--ndp-grey); font-size:12.5px; }
.ndp-story-actions{
  display:flex; align-items:center; gap:8px; font-size:13.5px; color:#444;
  flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch;
  position:sticky; bottom:68px; z-index:5; background:#fff;
  margin:14px -16px 0; padding:10px 16px; border-top:1px solid var(--ndp-border);
  scrollbar-width:none;
}
.ndp-story-actions::-webkit-scrollbar{ display:none; }
.ndp-pill-btn{ flex:0 0 auto; }
.ndp-svg-icon{ display:block; }

/* Pill-style action buttons (like/dislike/save/share) */
.ndp-pill-btn{
  display:inline-flex; align-items:center; gap:6px;
  background:#f4f4f6; border:1px solid #eceef1; color:#555;
  padding:7px 12px; border-radius:20px; cursor:pointer;
  font-size:13px; font-weight:600; line-height:1;
  transition:background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.ndp-pill-btn:hover{ background:#eceef1; }
.ndp-pill-btn:active{ transform:scale(.96); }
.ndp-pill-btn .ndp-count{ min-width:10px; text-align:left; }

.ndp-like-btn.ndp-reacted-like{ background:var(--ndp-red-light); border-color:#f3b9b9; color:var(--ndp-red); }
.ndp-dislike-btn.ndp-reacted-dislike{ background:#e8f0ff; border-color:#bcd2fb; color:#2563eb; }
.ndp-save-btn.ndp-reacted-save{ background:#fff4d6; border-color:#f3d98b; color:#a5720a; }

.ndp-next-story-btn{
  display:flex; align-items:center; justify-content:center; gap:6px;
  padding:12px; margin:4px 16px 16px; border-top:1px solid var(--ndp-border);
  color:var(--ndp-red); font-weight:700; font-size:13.5px; text-decoration:none;
}

.ndp-share-primary{ margin-left:auto; background:var(--ndp-red); border-color:var(--ndp-red); color:#fff; }
.ndp-share-primary:hover{ background:var(--ndp-red-dark); }
.ndp-index-label{ font-size:12.5px; color:#999; }

/* Read full news */
.ndp-excerpt-text, .ndp-full-text{ font-size:14px; line-height:1.6; color:#333; }
.ndp-full-text p{ margin:0 0 10px; }
.ndp-readmore-btn{ background:none; border:none; color:var(--ndp-red); font-weight:700; font-size:13.5px; padding:0; margin-top:4px; cursor:pointer; }

/* Share bottom sheet */
.ndp-share-overlay{ position:fixed; inset:0; background:rgba(15,15,20,.45); z-index:200; }
.ndp-share-sheet{
  position:fixed; left:0; right:0; bottom:0; max-width:720px; margin:0 auto;
  background:#fff; border-radius:20px 20px 0 0; z-index:201; padding:10px 20px 24px;
  box-shadow:0 -6px 24px rgba(0,0,0,.15);
  transform:translateY(100%); transition:transform .25s ease;
}
.ndp-share-sheet.ndp-sheet-open{ transform:translateY(0); }
.ndp-share-sheet-handle{ width:40px; height:4px; background:#ddd; border-radius:4px; margin:6px auto 14px; }
.ndp-share-close{ position:absolute; top:14px; right:16px; background:#f4f4f6; border:none; border-radius:50%; width:30px; height:30px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:#666; }
.ndp-share-preview{ text-align:center; margin-bottom:12px; min-height:60px; }
.ndp-share-preview img{ max-width:100%; max-height:220px; border-radius:12px; border:1px solid var(--ndp-border); }
.ndp-share-loading{ color:var(--ndp-grey); font-size:13px; padding:20px 0; }
.ndp-share-title{ font-weight:700; font-size:15px; text-align:center; margin-bottom:16px; color:#222; }
.ndp-share-actions{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.ndp-share-action{
  display:flex; flex-direction:column; align-items:center; gap:6px;
  background:#f7f7f9; border:1px solid #eceef1; border-radius:14px; padding:12px 4px;
  font-size:11.5px; font-weight:600; color:#333; cursor:pointer;
}
.ndp-share-action:hover{ background:#eef0f3; }
.ndp-share-action-icon{ width:36px; height:36px; border-radius:50%; background:#fff; display:flex; align-items:center; justify-content:center; color:var(--ndp-red); box-shadow:0 1px 3px rgba(0,0,0,.08); }
.ndp-share-action-icon.ndp-whatsapp-green{ color:#25D366; }
#ndp-share-native .ndp-share-action-icon{ background:var(--ndp-red); color:#fff; }
.ndp-category-tabs{ display:flex; gap:10px; padding:14px 16px 8px; overflow-x:auto; white-space:nowrap; }
.ndp-category-tabs .ndp-cat-tab{ padding:8px 14px; border-radius:20px; font-size:13px; background:#fff; border:1px solid var(--ndp-border); color:#555; text-decoration:none; display:inline-block; }
.ndp-category-tabs .ndp-cat-tab.active{ background:var(--ndp-red); color:#fff; border-color:var(--ndp-red); }
.ndp-category-tabs .ndp-cat-tab:hover:not(.active){ background:#f7f7f9; }
.ndp-flash-bar{ display:block; background:var(--ndp-red); color:#fff; padding:10px 16px; font-size:13.5px; margin:0 16px 12px; border-radius:8px; text-decoration:none; transition:opacity .3s ease; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ndp-share-tip{ font-size:12px; color:var(--ndp-grey); text-align:center; margin:14px 4px 0; line-height:1.5; }

/* Feed rows */
.ndp-search-box{ background:#fff; margin:14px 16px 0; padding:12px 14px; border-radius:10px; border:1px solid var(--ndp-border); color:#999; font-size:14px; }
.ndp-search-box input{ border:none; background:none; outline:none; width:85%; }
.ndp-feed-row{ display:flex; gap:12px; background:#fff; margin:0 16px 14px; padding:14px; border-radius:12px; }
.ndp-feed-thumb{ width:96px; height:96px; flex:0 0 96px; border-radius:10px; background:#222 center/cover no-repeat; position:relative; }
.ndp-feed-info h4{ margin:4px 0 2px; font-size:14.5px; line-height:1.35; }
.ndp-feed-cat{ color:var(--ndp-red); font-size:11.5px; font-weight:600; margin:0; }
.ndp-feed-actions{ display:flex; gap:8px; margin-top:8px; font-size:14px; align-items:center; }
.ndp-feed-actions .ndp-pill-btn{ padding:6px 10px; }
.ndp-feed-actions .ndp-share-btn{ margin-left:auto; }

/* Admin image picker */
.ndp-image-picker{ margin-bottom:8px; }
.ndp-image-picker .ndp-btn{ margin-right:8px; margin-top:6px; }

/* Polls */
.ndp-poll-card .ndp-poll-option{ display:flex; justify-content:space-between; width:100%; background:#f4f4f5; border:1px solid var(--ndp-border); border-radius:10px; padding:14px; margin-top:10px; font-size:14px; cursor:pointer; }
.ndp-poll-card .ndp-poll-option.ndp-voted-for{ background:var(--ndp-red-light); border-color:var(--ndp-red); color:var(--ndp-red); }
.ndp-voted{ color:var(--ndp-green); font-weight:600; }

/* Empty state */
.ndp-empty-state{ text-align:center; padding:80px 30px; color:var(--ndp-grey); }
.ndp-empty-icon{ font-size:44px; margin-bottom:16px; }
.ndp-empty-state h3{ color:#333; margin:0 0 6px; }
.ndp-saved-list .ndp-feed-row{ }

@media (max-width:480px){
  .ndp-grid-2{ grid-template-columns:1fr; }
}
