/* Urbiax Community v6 — feed polish, premium modal and stronger local marketplace.
   Safe override file. Community only. No database changes. */

/* --- Feed section spacing: posts come first, controls stay compact --- */
body.ubx-community-page .ubx-feed{
  display:flex !important;
  flex-direction:column !important;
  gap:14px !important;
  margin-top:4px !important;
}

/* --- Premium card base --- */
body.ubx-community-page .ubx-post-card.ubx-community-card{
  position:relative !important;
  border:1px solid rgba(15,23,42,.075) !important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.99),rgba(248,250,252,.985)) !important;
  box-shadow:
    0 16px 36px rgba(15,23,42,.075),
    inset 0 1px 0 rgba(255,255,255,.95) !important;
  overflow:hidden !important;
}

body.ubx-community-page .ubx-post-card.ubx-community-card::before{
  content:'' !important;
  position:absolute !important;
  inset:0 auto 0 0 !important;
  width:5px !important;
  background:linear-gradient(180deg,#8b5cf6,#2563eb) !important;
  opacity:.86 !important;
  z-index:3 !important;
}

body.ubx-community-page .ubx-community-card.ubx-cat-market::before{background:linear-gradient(180deg,#f59e0b,#d97706) !important;}
body.ubx-community-page .ubx-community-card.ubx-cat-free::before{background:linear-gradient(180deg,#38bdf8,#2563eb) !important;}
body.ubx-community-page .ubx-community-card.ubx-cat-issue::before{background:linear-gradient(180deg,#fb7185,#e11d48) !important;}
body.ubx-community-page .ubx-community-card.ubx-cat-question::before{background:linear-gradient(180deg,#a855f7,#6d28d9) !important;}
body.ubx-community-page .ubx-community-card.ubx-cat-recommend::before{background:linear-gradient(180deg,#22c55e,#15803d) !important;}
body.ubx-community-page .ubx-community-card.ubx-cat-lost::before{background:linear-gradient(180deg,#f472b6,#db2777) !important;}

body.ubx-community-page .ubx-community-card .ubx-post-body{
  position:relative !important;
  z-index:2 !important;
}

body.ubx-community-page .ubx-community-card .ubx-social-head{
  gap:9px !important;
  align-items:center !important;
}

body.ubx-community-page .ubx-community-card .ubx-avatar{
  box-shadow:0 8px 18px rgba(15,23,42,.10) !important;
  border:1px solid rgba(255,255,255,.72) !important;
}

body.ubx-community-page .ubx-community-card .ubx-social-meta strong{
  color:#0f172a !important;
  font-weight:1000 !important;
  letter-spacing:-.025em !important;
}

body.ubx-community-page .ubx-community-card .ubx-social-meta span{
  color:#64748b !important;
  font-weight:800 !important;
}

body.ubx-community-page .ubx-community-card .ubx-post-kicker{
  gap:7px !important;
  margin-top:9px !important;
  margin-bottom:8px !important;
}

body.ubx-community-page .ubx-community-card .ubx-badge.community{
  border:1px solid rgba(109,40,217,.14) !important;
  color:#5b21b6 !important;
  background:linear-gradient(135deg,#f5f3ff,#ffffff) !important;
  box-shadow:0 6px 14px rgba(109,40,217,.08) !important;
}

body.ubx-community-page .ubx-community-card.ubx-cat-market .ubx-badge.community,
body.ubx-community-page .ubx-community-card.ubx-cat-free .ubx-badge.community{
  color:#92400e !important;
  background:linear-gradient(135deg,#fffbeb,#fff7ed) !important;
  border-color:rgba(217,119,6,.18) !important;
  box-shadow:0 6px 14px rgba(217,119,6,.09) !important;
}

body.ubx-community-page .ubx-community-card.ubx-cat-issue .ubx-badge.community{
  color:#be123c !important;
  background:linear-gradient(135deg,#fff1f2,#ffffff) !important;
  border-color:rgba(225,29,72,.18) !important;
}

body.ubx-community-page .ubx-community-card.ubx-cat-recommend .ubx-badge.community{
  color:#166534 !important;
  background:linear-gradient(135deg,#ecfdf5,#ffffff) !important;
  border-color:rgba(22,163,74,.18) !important;
}

body.ubx-community-page .ubx-community-card h2{
  color:#0f172a !important;
  font-weight:1000 !important;
  letter-spacing:-.045em !important;
}

body.ubx-community-page .ubx-community-card .ubx-post-text{
  color:#334155 !important;
  font-weight:720 !important;
}

/* --- Buy/Sell and Free items feel more like a mini marketplace --- */
body.ubx-community-page .ubx-community-card.ubx-cat-market,
body.ubx-community-page .ubx-community-card.ubx-cat-free{
  background:
    radial-gradient(180px 120px at 0% 0%,rgba(251,191,36,.14),rgba(251,191,36,0) 72%),
    linear-gradient(180deg,#ffffff,#fffaf3) !important;
  border-color:rgba(217,119,6,.18) !important;
}

body.ubx-community-page .ubx-community-card .ubx-buy-price-pill,
body.ubx-community-page .ubx-community-card .ubx-sold-status-pill{
  min-height:25px !important;
  padding:0 10px !important;
  border-radius:999px !important;
  font-size:12px !important;
  font-weight:1000 !important;
  letter-spacing:-.01em !important;
  box-shadow:0 8px 16px rgba(15,23,42,.10) !important;
}

body.ubx-community-page .ubx-community-card .ubx-buy-price-pill{
  color:#78350f !important;
  background:linear-gradient(135deg,#fef3c7,#ffffff) !important;
  border:1px solid rgba(217,119,6,.22) !important;
}

body.ubx-community-page .ubx-community-card .ubx-sold-status-pill{
  color:#991b1b !important;
  background:linear-gradient(135deg,#fee2e2,#ffffff) !important;
  border:1px solid rgba(220,38,38,.20) !important;
}

body.ubx-community-page .ubx-photo-price-ribbon{
  background:linear-gradient(135deg,rgba(15,23,42,.88),rgba(120,53,15,.88)) !important;
  border:1px solid rgba(255,255,255,.28) !important;
  box-shadow:0 12px 24px rgba(15,23,42,.18) !important;
}

/* --- Photos and placeholders --- */
body.ubx-community-page .ubx-community-card .ubx-media-carousel{
  background:#f8fafc !important;
}

body.ubx-community-page .ubx-community-card .ubx-media-slide img,
body.ubx-community-page .ubx-community-card .ubx-media-slide video{
  filter:saturate(1.03) contrast(1.02) !important;
}

body.ubx-community-page .ubx-community-card .ubx-media-placeholder{
  background:
    radial-gradient(120px 90px at 18% 10%,rgba(139,92,246,.16),rgba(139,92,246,0) 74%),
    linear-gradient(145deg,#f8fafc,#ffffff) !important;
}

body.ubx-community-page .ubx-community-card.ubx-cat-market .ubx-media-placeholder,
body.ubx-community-page .ubx-community-card.ubx-cat-free .ubx-media-placeholder{
  background:
    radial-gradient(120px 90px at 18% 10%,rgba(251,191,36,.24),rgba(251,191,36,0) 74%),
    linear-gradient(145deg,#fff7ed,#ffffff) !important;
}

/* --- Bottom actions, replies and share buttons --- */
body.ubx-community-page .ubx-community-card .ubx-actions-bottom{
  border-top:1px solid rgba(15,23,42,.055) !important;
  background:rgba(255,255,255,.78) !important;
  -webkit-backdrop-filter:blur(6px) !important;
  backdrop-filter:blur(6px) !important;
}

body.ubx-community-page .ubx-community-card .board-btn,
body.ubx-community-page .ubx-community-card .ubx-reply-open,
body.ubx-community-page .ubx-community-card .ubx-thread-open,
body.ubx-community-page .ubx-community-card .ubx-share-btn{
  border-radius:999px !important;
  border:1px solid rgba(15,23,42,.08) !important;
  background:#ffffff !important;
  color:#0f172a !important;
  box-shadow:0 6px 14px rgba(15,23,42,.06) !important;
}

body.ubx-community-page .ubx-community-card .ubx-reply-open,
body.ubx-community-page .ubx-community-card .ubx-thread-open{
  color:#5b21b6 !important;
  background:linear-gradient(135deg,#f5f3ff,#ffffff) !important;
  border-color:rgba(109,40,217,.14) !important;
}

body.ubx-community-page .ubx-community-card.ubx-cat-market .ubx-reply-open,
body.ubx-community-page .ubx-community-card.ubx-cat-market .ubx-thread-open,
body.ubx-community-page .ubx-community-card.ubx-cat-free .ubx-reply-open,
body.ubx-community-page .ubx-community-card.ubx-cat-free .ubx-thread-open{
  color:#92400e !important;
  background:linear-gradient(135deg,#fffbeb,#ffffff) !important;
  border-color:rgba(217,119,6,.16) !important;
}

body.ubx-community-page .ubx-thread{
  border-top:1px solid rgba(15,23,42,.055) !important;
  background:linear-gradient(180deg,rgba(248,250,252,.68),rgba(255,255,255,.96)) !important;
}

body.ubx-community-page .ubx-reply-count-pill{
  background:#f5f3ff !important;
  color:#5b21b6 !important;
  border:1px solid rgba(109,40,217,.14) !important;
}

/* --- Details modal: cleaner, app-like, better photos and readable content --- */
body.ubx-community-page .ubx-post-modal{
  background:rgba(15,23,42,.48) !important;
  -webkit-backdrop-filter:blur(7px) !important;
  backdrop-filter:blur(7px) !important;
}

body.ubx-community-page .ubx-post-modal-panel{
  max-width:920px !important;
  border-radius:30px !important;
  background:#ffffff !important;
  box-shadow:0 34px 90px rgba(15,23,42,.34) !important;
  border:1px solid rgba(255,255,255,.48) !important;
  overflow:hidden !important;
}

body.ubx-community-page .ubx-post-modal-head{
  background:
    radial-gradient(240px 120px at 10% 0%,rgba(139,92,246,.17),rgba(139,92,246,0) 68%),
    linear-gradient(135deg,#ffffff,#f8fafc) !important;
  border-bottom:1px solid rgba(15,23,42,.07) !important;
}

body.ubx-community-page .ubx-post-modal-head h2{
  color:#0f172a !important;
  font-weight:1000 !important;
  letter-spacing:-.05em !important;
}

body.ubx-community-page .ubx-post-modal-body{
  background:#f8fafc !important;
}

body.ubx-community-page .ubx-post-modal-body .ubx-post-card{
  display:block !important;
  width:100% !important;
  max-width:760px !important;
  margin:0 auto !important;
  border-radius:24px !important;
  box-shadow:0 16px 38px rgba(15,23,42,.11) !important;
}

body.ubx-community-page .ubx-post-modal-body .ubx-post-card::before{
  width:100% !important;
  height:5px !important;
  inset:0 0 auto 0 !important;
}

body.ubx-community-page .ubx-post-modal-body .ubx-post-card .ubx-media-carousel{
  width:100% !important;
  min-height:280px !important;
  max-height:430px !important;
  border-radius:0 !important;
}

body.ubx-community-page .ubx-post-modal-body .ubx-post-card .ubx-media-slide{
  min-height:280px !important;
}

body.ubx-community-page .ubx-post-modal-body .ubx-post-card .ubx-media-slide img,
body.ubx-community-page .ubx-post-modal-body .ubx-post-card .ubx-media-slide video{
  object-fit:contain !important;
  background:#0f172a !important;
}

body.ubx-community-page .ubx-post-modal-body .ubx-post-card .ubx-post-body{
  padding:20px 20px 16px !important;
}

body.ubx-community-page .ubx-post-modal-body .ubx-post-card h2{
  font-size:28px !important;
  line-height:1.08 !important;
  margin-top:8px !important;
  margin-bottom:10px !important;
}

body.ubx-community-page .ubx-post-modal-body .ubx-post-card .ubx-post-text{
  font-size:16px !important;
  line-height:1.48 !important;
  display:block !important;
  -webkit-line-clamp:unset !important;
  overflow:visible !important;
}

/* --- Better mobile feed without stretching page again --- */
@media (max-width:700px){
  body.ubx-community-page .ubx-feed{
    gap:10px !important;
    margin-top:2px !important;
  }

  body.ubx-community-page .ubx-post-card.ubx-community-card{
    border-radius:19px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-post-card.ubx-community-card{
    grid-template-columns:112px minmax(0,1fr) !important;
    min-height:128px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-media-carousel{
    width:112px !important;
    min-height:128px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-media-slide{
    min-height:128px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-post-body{
    padding:11px 10px 8px 12px !important;
  }

  body.ubx-community-page .ubx-post-card.ubx-community-card::before{
    width:4px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-social-head{
    margin-bottom:5px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-avatar{
    width:30px !important;
    height:30px !important;
    min-width:30px !important;
    font-size:11px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-social-meta strong{
    font-size:14.2px !important;
    line-height:1.05 !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-social-meta span{
    font-size:12px !important;
    line-height:1.15 !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-post-kicker{
    margin-top:6px !important;
    margin-bottom:6px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-badge.community{
    font-size:11px !important;
    padding:4px 8px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-buy-price-pill,
  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-sold-status-pill{
    min-height:23px !important;
    font-size:11px !important;
    padding:0 8px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card h2{
    font-size:16.5px !important;
    line-height:1.13 !important;
    margin:0 0 5px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-post-text{
    font-size:13.2px !important;
    line-height:1.3 !important;
    -webkit-line-clamp:2 !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-actions-bottom{
    padding:7px 9px !important;
    gap:6px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .board-btn,
  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-reply-open,
  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-thread-open,
  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-share-btn{
    min-height:32px !important;
    font-size:12px !important;
    padding:0 10px !important;
  }

  body.ubx-community-page .ubx-post-modal-panel{
    width:calc(100vw - 16px) !important;
    height:calc(100dvh - 18px) !important;
    max-height:calc(100dvh - 18px) !important;
    border-radius:22px !important;
  }

  body.ubx-community-page .ubx-post-modal-head{
    padding:13px 62px 12px 14px !important;
  }

  body.ubx-community-page .ubx-post-modal-head h2{
    font-size:20px !important;
  }

  body.ubx-community-page .ubx-post-modal-head p{
    font-size:12px !important;
    line-height:1.24 !important;
  }

  body.ubx-community-page .ubx-post-modal-body{
    padding:10px !important;
  }

  body.ubx-community-page .ubx-post-modal-body .ubx-post-card{
    max-width:none !important;
    border-radius:20px !important;
  }

  body.ubx-community-page .ubx-post-modal-body .ubx-post-card .ubx-media-carousel{
    min-height:230px !important;
    max-height:310px !important;
  }

  body.ubx-community-page .ubx-post-modal-body .ubx-post-card .ubx-media-slide{
    min-height:230px !important;
  }

  body.ubx-community-page .ubx-post-modal-body .ubx-post-card .ubx-post-body{
    padding:15px 14px 12px !important;
  }

  body.ubx-community-page .ubx-post-modal-body .ubx-post-card h2{
    font-size:22px !important;
    line-height:1.1 !important;
  }

  body.ubx-community-page .ubx-post-modal-body .ubx-post-card .ubx-post-text{
    font-size:15.5px !important;
    line-height:1.45 !important;
  }
}

/* Ultra-small phones: keep the feed tight but readable. */
@media (max-width:390px){
  body.ubx-community-page.ubx-view-list .ubx-post-card.ubx-community-card{
    grid-template-columns:104px minmax(0,1fr) !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-media-carousel{
    width:104px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card h2{
    font-size:15.8px !important;
  }

  body.ubx-community-page.ubx-view-list .ubx-community-card .ubx-post-text{
    font-size:12.8px !important;
  }
}
