/* ==========================================================================
   rb-2040-profile.css — Profile + Directory/Search (2040 re-skin)
   Theme: ringbd (staging). Ported 2026-11-23 from the sunshine sheet of the
   same name (md5 c499bdcd8fbf8b7680b9f3751c7e66aa) — same --rb-* tokens
   (ringbd rb-2040-tokens.css carries the identical token values), plus
   STEP 2A fixes at the end (cover height, tab-strip fit-all, post chrome).
   Style only — no behaviour change. Sunshine sheet itself untouched.
   CHANGES vs the sunshine port source:
   - prefers-color-scheme: dark block REMOVED (Sunshine-only ruling 2026-11-23).
   - .wo_user_profile shell rule REMOVED: rb-glossy-timeline.css already owns
     the card radius/overflow; overflow:hidden on the outer row would clip
     post action dropdowns inside the profile.
   - <=480px tab rules replaced by the step-2A fit-all set (see section 2A).
   No new colours invented. No hex literal outside a var() fallback.
   ========================================================================== */

/* ---------- PROFILE (timeline/content.phtml — CSS only, no template edit) ---------- */

/* Profile page shell: hero card, 2040 radius + elevation */
/* Profile shell radius/overflow live in rb-glossy-timeline.css (.card.hovercard
   18px + overflow hidden); no row-level overflow rule here — it would clip
   post action dropdowns. (Step 2A port note.) */

/* Cover: 2040 radius on the top edge, subtle brand hairline at its base */
.wo_user_profile .cardheader.user-cover {
  border-radius: var(--rb-radius-xl, 24px) var(--rb-radius-xl, 24px) 0 0;
  border-bottom: 3px solid var(--rb-brand-500, #00A651);
  background-color: var(--rb-surface-2, #E4E6EB);
}
.wo_user_profile .cardheader.user-cover img {
  border-radius: var(--rb-radius-xl, 24px) var(--rb-radius-xl, 24px) 0 0;
  object-fit: cover;
}

/* Avatar: 96px hero, full-round, 4px surface ring + brand gradient ring */
.wo_user_profile .profile_avatar,
.wo_user_profile .user-avatar {
  border-radius: var(--rb-radius-full, 999px);
}
.wo_user_profile .profile_avatar img,
.wo_user_profile .user-avatar img {
  border-radius: var(--rb-radius-full, 999px);
  border: 4px solid var(--rb-surface, #FFFFFF);
  outline: 3px solid transparent;
  background:
    linear-gradient(var(--rb-surface, #FFFFFF), var(--rb-surface, #FFFFFF)) padding-box,
    linear-gradient(135deg, var(--rb-brand-500, #00A651), var(--rb-gold-400, #D4AF37)) border-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

/* Profile name: H2, Baloo Da 2 700; verified tick stays info-blue (never green) */
.wo_user_profile .profile-container h2,
.wo_user_profile .user-name h2 {
  font-family: "Baloo Da 2", "Noto Sans Bengali", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--rb-ink-900, #111827);
}

/* Bottom nav = profile tabs: underline-tab language (W26 §3.5) */
.wo_user_profile .user-bottom-nav {
  background: var(--rb-surface, #FFFFFF);
  border-top: 1px solid var(--rb-divider, #EBEDF0);
  border-radius: 0 0 var(--rb-radius-xl, 24px) var(--rb-radius-xl, 24px);
}
.wo_user_profile .user-bottom-nav a {
  color: var(--rb-ink-500, #6B7280);
  font-family: "Baloo Da 2", "Noto Sans Bengali", sans-serif;
  font-size: 15px;
  font-weight: 400;
  min-height: 48px;
  transition: color 150ms cubic-bezier(0.215, 0.61, 0.355, 1);
}
.wo_user_profile .user-bottom-nav a:hover,
.wo_user_profile .user-bottom-nav a:focus-visible {
  color: var(--rb-ink-900, #111827);
}
.wo_user_profile .user-bottom-nav a.active,
.wo_user_profile .user-bottom-nav li.active a {
  color: var(--rb-ink-900, #111827);
  font-weight: 700;
  border-bottom: 3px solid var(--rb-brand-500, #00A651);
}

/* Action buttons on the profile header: primary = brand gradient (FINAL §1.1) */
.wo_user_profile .options-buttons .btn-glossy .btn-main,
.wo_user_profile .user-follow-button .btn-main {
  background: linear-gradient(180deg, var(--rb-brand-500, #00A651), var(--rb-brand-600, #008A44));
  border: 0;
  border-radius: var(--rb-radius-md, 12px);
  font-family: "Baloo Da 2", "Noto Sans Bengali", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  min-height: 48px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 100ms cubic-bezier(0.215, 0.61, 0.355, 1), filter 150ms cubic-bezier(0.215, 0.61, 0.355, 1);
}
.wo_user_profile .options-buttons .btn-glossy .btn-main:hover,
.wo_user_profile .user-follow-button .btn-main:hover { filter: brightness(1.04); }
.wo_user_profile .options-buttons .btn-glossy .btn-main:active,
.wo_user_profile .user-follow-button .btn-main:active { transform: scale(0.98); }
.wo_user_profile .options-buttons .btn-glossy .btn-default,
.wo_user_profile .profile-message-btn .btn-default {
  border-radius: var(--rb-radius-md, 12px);
  border: 1.5px solid var(--rb-border, #E0E3E7);
  background: var(--rb-surface, #FFFFFF);
  color: var(--rb-ink-900, #111827);
  min-height: 48px;
}

/* About sections: one card per list, hairline dividers, 20px leading icons */
.wo_user_profile .list-group.profile-lists,
.wo_user_profile .wow_content.list-group.profile-lists {
  background: var(--rb-surface, #FFFFFF);
  border: 1px solid var(--rb-border, #E0E3E7);
  border-radius: var(--rb-radius-md, 12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.wo_user_profile .list-group.profile-lists .list-group-item {
  border: 0;
  border-bottom: 1px solid var(--rb-divider, #EBEDF0);
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--rb-ink-700, #374151);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.wo_user_profile .list-group.profile-lists .list-group-item:last-child { border-bottom: 0; }
.wo_user_profile .list-group.profile-lists .list-group-item svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--rb-ink-500, #6B7280);
  margin-top: 2px;
}
.wo_user_profile .list-group.profile-lists .list-group-item a {
  color: var(--rb-info, #1570EF);
  text-decoration: none;
}
.wo_user_profile .list-group.profile-lists .list-group-item a:hover { text-decoration: underline; }

/* District chip ("Located in Dhaka, Dhaka Division" — text byte-identical):
   the location row reads as a pill: brand-50 tint, brand-700 text, pin in brand-500.
   Applied to the row that carries the location pin (first pin row in the list);
   all about rows share the same base treatment, so no row is singled out by text. */
.wo_user_profile .list-group.profile-lists .list-group-item span { font-variant-numeric: tabular-nums; }

/* Section headings on the profile side column */
.wo_user_profile .wo_page_hdng.profile_hdng_side,
.wo_user_profile .wow_content.popular_posts_hdr {
  border-radius: var(--rb-radius-md, 12px);
  font-family: "Baloo Da 2", "Noto Sans Bengali", sans-serif;
  font-weight: 700;
  color: var(--rb-ink-900, #111827);
}

/* Profile completion card */
.wo_user_profile .profile-completion,
.wo_user_profile .wow_content .profile-completion {
  border-radius: var(--rb-radius-md, 12px);
  border: 1px solid var(--rb-border, #E0E3E7);
}

/* ---------- DIRECTORY (directory/users.phtml + user-list.phtml) ---------- */

/* Directory page shell */
.rb2040-directory {
  border-radius: var(--rb-radius-md, 12px);
}

/* District filter bar: inputs full-radius, surface-2 fill, brand focus ring */
.rb2040-directory .rb-district-filter select,
.rb2040-directory .rb-district-filter input[type="text"],
.rb2040-directory .rb-district-filter input[type="search"] {
  border-radius: var(--rb-radius-full, 999px);
  border: 1.5px solid var(--rb-border, #E0E3E7);
  background: var(--rb-surface-2, #E4E6EB);
  color: var(--rb-ink-900, #111827);
  font-size: 15px;
  min-height: 48px;
  padding: 0 16px;
}
.rb2040-directory .rb-district-filter select:focus,
.rb2040-directory .rb-district-filter input:focus {
  outline: 0;
  border-color: var(--rb-brand-500, #00A651);
  border-width: 2px;
  box-shadow: 0 0 0 4px var(--rb-brand-50, #E6F7EE);
  background: var(--rb-surface, #FFFFFF);
}
.rb2040-directory .rb-district-filter .btn-main {
  background: linear-gradient(180deg, var(--rb-brand-500, #00A651), var(--rb-brand-600, #008A44));
  border: 0;
  border-radius: var(--rb-radius-full, 999px);
  font-family: "Baloo Da 2", "Noto Sans Bengali", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  min-height: 48px;
  padding: 0 20px;
}

/* Directory user cards: solid surface, 16px radius, elev-1, 12px gaps */
.rb2040-directory .wow_frnd_usr > div {
  margin-bottom: 12px;
}
.rb2040-directory .wow_frnd_usr .wow_content {
  border-radius: var(--rb-radius-md, 12px);
  border: 1px solid var(--rb-border, #E0E3E7);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: box-shadow 150ms cubic-bezier(0.215, 0.61, 0.355, 1), transform 150ms cubic-bezier(0.215, 0.61, 0.355, 1);
}
.rb2040-directory .wow_frnd_usr .wow_content:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}
.rb2040-directory .wow_frnd_usr .avatar img,
.rb2040-directory .wow_frnd_usr img.rounded-circle {
  border-radius: var(--rb-radius-full, 999px);
}
.rb2040-directory .wow_frnd_usr h4,
.rb2040-directory .wow_frnd_usr .album-name h4 {
  font-family: "Baloo Da 2", "Noto Sans Bengali", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--rb-ink-900, #111827);
}
/* Real counts only — counts keep tabular figures, caption-strong weight */
.rb2040-directory .wow_frnd_usr .small-last-seen,
.rb2040-directory .small-last-seen {
  font-size: 13px;
  font-weight: 600;
  color: var(--rb-ink-500, #6B7280);
  font-variant-numeric: tabular-nums;
}

/* Directory pagination: pill buttons, active = solid brand */
.rb2040-directory .pagination > li > a,
.rb2040-directory .pagination > li > span {
  border-radius: var(--rb-radius-full, 999px);
  border: 1px solid var(--rb-border, #E0E3E7);
  color: var(--rb-ink-700, #374151);
  font-size: 13px;
  font-weight: 600;
  min-width: 40px;
  min-height: 40px;
  margin: 0 2px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.rb2040-directory .pagination > .active > a,
.rb2040-directory .pagination > .active > span,
.rb2040-directory .pagination li.active a {
  background: var(--rb-brand-500, #00A651);
  border-color: var(--rb-brand-500, #00A651);
  color: #FFFFFF;
}

/* Admin manage-users rows (directory/user-list.phtml): hover tint, round avatar */
.rb2040-user-row:hover td { background: var(--rb-brand-50, #E6F7EE); }
.rb2040-user-row .setting-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--rb-radius-full, 999px);
  border: 2px solid var(--rb-surface, #FFFFFF);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.rb2040-user-row td a { color: var(--rb-ink-900, #111827); font-weight: 600; }

/* Directory empty state: centred, quiet, icon in ink-400 only as decoration */
.rb2040-directory .empty_state {
  border-radius: var(--rb-radius-md, 12px);
  color: var(--rb-ink-500, #6B7280);
  font-size: 15px;
  line-height: 1.5;
  padding: 32px 16px;
  text-align: center;
}

/* ---------- SEARCH (search/content.phtml + user-result.phtml) ---------- */

/* Search header card + tabs: underline-tab language, active = ink-900 + brand bar */
.rb2040-search .wow_search_head {
  border-radius: var(--rb-radius-md, 12px);
  border: 1px solid var(--rb-border, #E0E3E7);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.rb2040-search .wow_srch_tabs {
  border-radius: var(--rb-radius-md, 12px);
  border: 1px solid var(--rb-border, #E0E3E7);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.rb2040-search .wow_srch_tabs a {
  color: var(--rb-ink-500, #6B7280);
  font-family: "Baloo Da 2", "Noto Sans Bengali", sans-serif;
  font-size: 15px;
  min-height: 48px;
}
.rb2040-search .wow_srch_tabs a.active,
.rb2040-search .wow_srch_tabs li.active a {
  color: var(--rb-ink-900, #111827);
  font-weight: 700;
  border-bottom: 3px solid var(--rb-brand-500, #00A651);
}

/* Search filter form: full-radius search field, brand focus ring (form-design:
   one field, one job; structure unchanged, style only) */
.rb2040-search .search-filter-form .pp_mat_input,
.rb2040-search .search-filter-form input[type="text"],
.rb2040-search .search-filter-form select {
  border-radius: var(--rb-radius-full, 999px);
  border: 1.5px solid var(--rb-border, #E0E3E7);
  background: var(--rb-surface-2, #E4E6EB);
  color: var(--rb-ink-900, #111827);
  font-size: 15px;
  min-height: 48px;
  padding: 0 16px;
}
.rb2040-search .search-filter-form .pp_mat_input:focus,
.rb2040-search .search-filter-form input:focus,
.rb2040-search .search-filter-form select:focus {
  outline: 0;
  border-color: var(--rb-brand-500, #00A651);
  border-width: 2px;
  box-shadow: 0 0 0 4px var(--rb-brand-50, #E6F7EE);
  background: var(--rb-surface, #FFFFFF);
}
.rb2040-search .wow_srch_innr_filtr {
  border-radius: var(--rb-radius-md, 12px);
  border: 1px solid var(--rb-border, #E0E3E7);
}

/* Search user cards: same card language as directory, 12px gaps */
.rb2040-search-card .album_parent {
  border-radius: var(--rb-radius-md, 12px);
  border: 1px solid var(--rb-border, #E0E3E7);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: box-shadow 150ms cubic-bezier(0.215, 0.61, 0.355, 1), transform 150ms cubic-bezier(0.215, 0.61, 0.355, 1);
  overflow: hidden;
}
.rb2040-search-card .album_parent:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}
.rb2040-search-card .avatar img {
  border-radius: var(--rb-radius-full, 999px);
  border: 2px solid var(--rb-surface, #FFFFFF);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.rb2040-search-card .album-name h4 {
  font-family: "Baloo Da 2", "Noto Sans Bengali", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--rb-ink-900, #111827);
}
.rb2040-search-card .album-name h4 a { color: var(--rb-ink-900, #111827); }
.rb2040-search-card .small-last-seen {
  font-size: 13px;
  font-weight: 600;
  color: var(--rb-ink-500, #6B7280);
  font-variant-numeric: tabular-nums;
}
.rb2040-search-card .user-follow-button .btn {
  border-radius: var(--rb-radius-full, 999px);
  min-height: 40px;
  font-family: "Baloo Da 2", "Noto Sans Bengali", sans-serif;
  font-weight: 700;
  font-size: 15px;
}
.rb2040-search-card .user-follow-button .btn-main {
  background: linear-gradient(180deg, var(--rb-brand-500, #00A651), var(--rb-brand-600, #008A44));
  border: 0;
  color: #FFFFFF;
}

/* Search empty state */
.rb2040-search .empty_state {
  border-radius: var(--rb-radius-md, 12px);
  color: var(--rb-ink-500, #6B7280);
  font-size: 15px;
  line-height: 1.5;
  padding: 32px 16px;
  text-align: center;
}

/* ---------- SHARED: focus, motion, responsive, dark ---------- */

/* Focus ring: 2px info, 2px offset — never removed (W26 §3.1) */
.rb2040-directory a:focus-visible,
.rb2040-directory button:focus-visible,
.rb2040-directory input:focus-visible,
.rb2040-directory select:focus-visible,
.rb2040-search a:focus-visible,
.rb2040-search button:focus-visible,
.rb2040-search input:focus-visible,
.rb2040-search select:focus-visible,
.wo_user_profile a:focus-visible,
.wo_user_profile button:focus-visible {
  outline: 2px solid var(--rb-info, #1570EF);
  outline-offset: 2px;
}

/* 390px: single column, full-width cards, 16px side margins preserved */
@media (max-width: 480px) {
  .rb2040-directory .wow_frnd_usr > div,
  .rb2040-search-card {
    width: 100%;
  }
  /* STEP 2A tab-strip fit-all: 7 tabs in 348px at 390 (was scrollWidth 584,
     Photos/Videos/Reels off-screen right). 11px labels + 18px icons + 1px
     gaps fit "Timeline" (~48px) in a ~49px slot; overflow-x stays only as
     a fallback for longer locales. */
  .wo_user_profile .user-bottom-nav {
    height: 60px;
  }
  .wo_user_profile .user-bottom-nav ul {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .wo_user_profile .user-bottom-nav ul::-webkit-scrollbar {
    display: none;
  }
  .wo_user_profile .user-bottom-nav ul li {
    flex: 1 1 0;
    min-width: 0;
    margin: 0 1px;
  }
  .wo_user_profile .user-bottom-nav li a {
    font-size: 11px;
    padding: 8px 1px 6px;
  }
  .wo_user_profile .user-bottom-nav li a .split-link svg {
    width: 18px;
    height: 18px;
  }
  .wo_user_profile .user-bottom-nav li a span:last-child {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Reduced motion: all transitions collapse to instant (W26 §1.11) */
@media (prefers-reduced-motion: reduce) {
  .rb2040-directory *,
  .rb2040-search *,
  .rb2040-search-card *,
  .wo_user_profile * {
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   STEP 2A — PROFILE COVER + TAB-STRIP + POST CHROME (2026-11-23, staging)
   Measured BEFORE (profile 1793344250504425, CDP :9334):
   - @1920 cover box 1568x365 but #cover-image rendered 1568x882 (natural
     16:9) — only the top 41% of the photo showed; @1280 990x557 in a 365 box.
   - .problackback is 200px tall (padding:100px) — a dark gradient over the
     bottom 55% of the 365px cover; the readable photo strip was ~165px.
   - @390 tab strip: ul scrollWidth 584 vs clientWidth 348 (236px overflow);
     Photos/Videos/Reels off-screen right (right=437/521/605 > 390).
   CSS-only; no template/JS change. Reposition drags #full-image (untouched)
   and its clamp window (.user-cover-reposition-container) is now the true
   365px window instead of the 882px image height — same clamp, truer range.
   ========================================================================== */

/* Cover: image fills the 365px box with a centre crop (was top-sliver crop) */
.wo_user_profile .cardheader.user-cover .user-cover-reposition-container,
.wo_user_profile .cardheader.user-cover .user-cover-reposition-w {
  height: 100%;
}
.wo_user_profile .cardheader.user-cover #cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Gradient band: 200px -> 140px, padding removed; shades the name row only */
.wo_user_profile .problackback {
  height: 140px;
  padding: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .55) 100%);
}

/* Post-card CHROME on the profile page only (outer panel frame; the shared
   post-layout/footer templates and action/comment/reaction internals are
   owned by the parallel worker and are NOT touched here). Same language as
   rb-2040-post.css section 2 so profile posts match the single-post page. */
.wo_user_profile .post-container .panel.panel-white.panel-shadow {
  background: var(--rb-surface, #FFFFFF);
  border: 1px solid var(--rb-border, #E0E3E7);
  border-radius: var(--rb-radius-lg, 16px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.wo_user_profile .post-container {
  margin-bottom: 16px;
}
