/* attach: member.php,usercp.php,usercp2.php,private.php,memberlist.php,search.php,online.php,misc.php,contact.php,about.php */
/* pb-account.css: profile, login, register, UCP, PMs, members, search, premium, about. Builds on pb-base.css tokens.
   MyBB's own tables on the other account pages are themed by global.css; this file only adds the redesigned pages. */

/* ---------- Shared bits (not in pb-base) ---------- */
.fmeta { color: var(--muted); font-size: 13px; }
.fmeta .fa { color: var(--link); }
.role { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); font-weight: 500; white-space: nowrap; }
.stat { background: var(--surface); padding: 12px 16px; }
.stat b { display: block; font-size: 20px; line-height: 1.3; color: var(--ink); }
.stat span { font-size: 12px; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--chip); border-radius: 10px; padding: 3px; gap: 2px; }
.seg .tab, .seg a.tab:link, .seg a.tab:visited { display: inline-flex; align-items: center; font-size: 13px; color: var(--muted); padding: 0 12px; min-height: 40px; border-radius: 8px; }
.seg .tab[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.empty { text-align: center; padding: 28px 18px; color: var(--muted); font-size: 14px; }
.stats { padding: 12px 16px; font-size: 14px; color: var(--muted); line-height: 2; }
.stats a { overflow-wrap: anywhere; }
.pb-pages { margin: 4px 0 14px; }
/* Key/value tables keep MyBB's <tr> rows (plugins add rows), shown as a two-column list */
.kv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv-table td { padding: 8px 16px; border-bottom: 1px solid var(--line); vertical-align: top; background: none; }
.kv-table tr:last-child td { border-bottom: 0; }
.kv-table td:first-child { color: var(--muted); width: 38%; }
.kv-table td:first-child strong { font-weight: 400; }
.thusert { display: none; } /* old theme heading cells inside custom profile-field rows */

/* ---------- Profile ---------- */
.pro-cover { height: 120px; background: var(--bar-solid) url(/images/pb/img/cat-songbirds.jpg) center / cover; }
.pro-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 0 20px 16px; margin-top: -40px; }
.pro-avatar img, .pro-avatar .avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--surface); background: var(--chip); display: block; }
.pro-name { padding-top: 44px; min-width: 0; }
.pro-top h1 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.pro-top .fmeta { margin-bottom: 4px; }
.pro-top .fmeta img { display: inline-block; vertical-align: middle; }
.pro-top .fmeta br { display: none; } /* member_profile_groupimage ends in <br /> */
.pro-top .acts-inline { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.acts-inline a.button:link, .acts-inline a.button:visited { display: inline-flex; align-items: center; min-height: 44px; background: transparent; color: var(--ink); border-color: var(--line); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.tiles .stat { text-align: center; }
.pro-away { padding: 0 20px 14px; }
.pro-sig { padding: 14px 16px; overflow-wrap: anywhere; }
.pro-side .tborder { margin-bottom: 18px; }
.pro-side > br { display: none; }

/* ---------- Login and register ---------- */
.login { max-width: 424px; margin: 16px auto 32px; }
.login.wide { max-width: 640px; }
.login .card { padding: 22px; }
.login h1 { margin: 0 0 4px; font-size: 22px; text-align: center; }
.login .sub { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 16px; gap: 8px; }
.divider { text-align: center; color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.login input.button { width: 100%; }
/* Register keeps MyBB's <tr> rows (password, captcha, question, custom fields) and lays them out as stacked fields */
.form-rows, .form-rows tbody, .form-rows tr, .form-rows td,
.reg fieldset table, .reg fieldset tbody, .reg fieldset tr, .reg fieldset td { display: block; width: 100% !important; padding: 0; border: 0; background: none; }
.form-rows tr, .reg fieldset tr { margin-bottom: 10px; }
.form-rows td + td { margin-top: 6px; }
.form-rows input.textbox, .form-rows select, .reg fieldset input.textbox, .reg fieldset select { width: 100% !important; }
.form-rows .smalltext, .form-rows label { font-size: 14px; font-weight: 700; }
.form-rows .smalltext label { font-weight: 700; }
.form-rows .thead, .form-rows .tcat { background: none; color: var(--ink); font-weight: 700; padding: 8px 0 4px; }
.reg fieldset { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 0; margin: 14px 0 0; }
.reg legend { font-family: var(--head-font); font-size: 16px; padding: 0 0 0 8px; }
.prefs .check { width: 100%; font-size: 14px; }
.reg #regimage, .reg img { max-width: 100%; }

/* ---------- User control panel ---------- */
.ucp-layout { width: 100%; border-collapse: collapse; }
td.ucp-side, td.ucp-side ~ td { vertical-align: top; }
td.ucp-side { width: 236px; padding: 0 0 0 16px; }
.ucp-nav { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.ucp-nav a, .ucp-nav a:link, .ucp-nav a:visited { display: flex; align-items: center; gap: 10px; padding: 8px 12px; min-height: 44px; border-radius: 8px; color: var(--ink); font-size: 14px; }
.ucp-nav a .fa { color: var(--link); }
.ucp-nav a.current, .ucp-nav a[aria-current="page"] { background: var(--link-soft); color: var(--link); font-weight: 700; }
.ucp-nav .grp { margin: 10px 12px 2px; font-size: 12px; color: var(--muted); font-weight: 700; }
.ucp-nav .sep { height: 1px; background: var(--line); margin: 6px 8px; }
.ucp-nav .folders-sub a { padding-inline-start: 38px; min-height: 40px; font-size: 13px; }
@media (hover: hover) and (pointer: fine) { .ucp-nav a:hover { background: var(--bg); text-decoration: none; } }
td.ucp-side ~ td > .tborder, td.ucp-side ~ td > form > .tborder, td.ucp-side ~ td > br + .tborder { margin-bottom: 18px; }
.avatar-row { padding: 12px; }
.avatar-row td { vertical-align: middle; padding: 4px; }
.kv-list { border-top: 1px solid var(--line); padding: 10px 16px; font-size: 14px; }
.kv-list > div { padding: 4px 0; }
.kv-list span, .kv-list strong { color: var(--muted); font-weight: 400; margin-inline-end: 6px; }
.avatar-row img, .avatar-row .avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.avatar-row h1 { margin: 0; font-size: 22px; }
.avatar-row td.trow1 { width: 84px; padding: 4px; border: 0; background: none; } /* usercp_currentavatar is a <td> */

/* ---------- Messages ---------- */
.folders { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.folders a.chip { min-height: 36px; }
.pm { display: grid; grid-template-columns: 24px 1fr auto 32px; gap: 10px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.pm:last-child { border-bottom: 0; }
.pm .ic img { width: 20px; height: auto; display: block; }
.pm .subj { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm .pm-t { color: var(--ink); }
.pm .from { display: block; font-size: 12px; color: var(--muted); }
.pm[data-icon^="new"] .pm-t { font-weight: 700; }
.pm[data-icon^="new"] .pm-t::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-start: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.pm time, .pm .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pm .pick { display: grid; place-items: center; min-width: 32px; min-height: 44px; }
.pm .pick input { width: 20px; height: 20px; }
.pm-sep { height: 6px; background: var(--bg); border-bottom: 1px solid var(--line); }
.pm-head, .pm-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.pm-foot { border-top: 1px solid var(--line); border-bottom: 0; background: var(--bg); }
.pm-head .grow { flex: 1 1 200px; font-weight: 700; font-size: 15px; }
.pm-head input.textbox { flex: 1 1 180px; min-width: 0; }
.pmspace { display: inline-block; margin-inline-end: 8px; }
@media (hover: hover) and (pointer: fine) { .pm:hover { background: var(--bg); } }

/* ---------- Search ---------- */
.searchbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.searchbar input.textbox { flex: 1 1 220px; min-width: 0; min-height: 46px; background: var(--surface); }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; padding: 16px; }
.opts .field select, .opts .field input.textbox { width: 100%; }
.opts .field select[multiple] { min-height: 180px; padding: 6px; }
.opts .radios { display: flex; flex-wrap: wrap; gap: 0 14px; font-size: 14px; }
.opts .radios label { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; cursor: pointer; }
.opts .inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.opts .inline input.textbox { width: 80px; }

/* ---------- Members ---------- */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; color: var(--ink); min-width: 0; }
.member .m-av { display: block; width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden; background: var(--chip); }
.member .m-av img { width: 56px; height: 56px; object-fit: cover; display: block; }
.member .m-name { display: block; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.member .m-name a { display: inline-block; padding: 4px 0; }
.member .role { display: inline-block; margin: 2px 0 4px; }
.member .role img { display: none; }
.member small { display: block; color: var(--muted); font-size: 12px; }
@media (hover: hover) and (pointer: fine) { .member:hover { border-color: var(--link); } }
.letters { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 16px; direction: ltr; justify-content: flex-end; }
.letters a { display: grid; place-items: center; min-width: 32px; min-height: 36px; border-radius: 6px; font-size: 13px; }
.letters a:hover { background: var(--link-soft); text-decoration: none; }

/* ---------- Premium (hamianmali) ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.donate { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; padding: 16px; align-items: end; }
.donate input[type=text] { width: 100%; min-height: 46px; }
.perks { list-style: none; margin: 0; padding: 8px 16px 14px; }
.perks li { display: flex; gap: 10px; padding: 8px 0; font-size: 14px; border-bottom: 1px dashed var(--line); }
.perks li:last-child { border: 0; }
.perks .fa { color: var(--link); margin-top: 6px; }

/* ---------- About ---------- */
.about-hero { padding: 22px; }
.about-hero h1 { margin: 0 0 6px; font-size: 26px; }
.about-hero .slogan { margin: 0; font-size: 16px; line-height: 2; color: var(--link); font-weight: 500; }
.about-text { padding: 6px 22px 20px; }
.about-text h2 { font-size: 19px; margin: 18px 0 6px; }
.about-text p { margin: 0; font-size: 16px; line-height: 2.1; }
.about-text .perks { padding: 0; }
.about-text .perks .fa { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.founder-card { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; padding: 20px; }
.founder-card .avatar { width: 96px; height: 96px; font-size: 34px; }
.founder-card h2 { margin: 0; font-size: 20px; }
.founder-card .en { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.founder-card p { margin: 8px 0 12px; line-height: 2; }
.founder-links { display: flex; flex-wrap: wrap; gap: 8px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.facts .stat { text-align: center; }

/* ---------- Phone ---------- */
@media (max-width: 760px) {
	.tiles { grid-template-columns: repeat(2, 1fr); }
	.pro-top { padding: 0 14px 14px; }
	.pro-top .acts-inline { margin-inline-start: 0; width: 100%; }
	.pro-top .acts-inline > * { flex: 1 1 auto; justify-content: center; }
	.kv-table td { display: block; width: auto !important; border: 0; padding: 2px 16px; }
	.kv-table tr { display: block; padding: 6px 0; border-bottom: 1px solid var(--line); }
	/* UCP: every usercp/private page puts {$usercpnav} in a layout <tr>; the cells stack and the nav scrolls sideways */
	.ucp-layout, table:has(> tbody > tr > td.ucp-side), table:has(> tbody > tr > td.ucp-side) > tbody, table:has(> tbody > tr > td.ucp-side) > tbody > tr { display: block; width: 100%; }
	td.ucp-side, td.ucp-side ~ td { display: block; width: auto !important; max-width: calc(100vw - 24px); padding: 0 !important; }
	td.ucp-side { margin-bottom: 12px; }
	td.ucp-side ~ td { overflow-x: auto; }
	.ucp-nav { display: flex; overflow-x: auto; gap: 4px; -webkit-overflow-scrolling: touch; }
	.ucp-nav a { white-space: nowrap; flex: none; }
	.ucp-nav .sep, .ucp-nav .grp, .ucp-nav .folders-sub { display: none; }
	.pm { grid-template-columns: 20px 1fr 32px; }
	.pm .when { grid-column: 2; grid-row: 2; }
	.opts { grid-template-columns: 1fr; }
	.donate { grid-template-columns: 1fr; }
	.founder-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
	.founder-links { justify-content: center; }
}

/* About: the Parandeban titles, each with its meaning */
.titles { margin: 8px 0 0; display: grid; gap: 4px 0; }
.titles dt { font-weight: 700; color: var(--link); margin-top: 10px; }
.titles dd { margin: 2px 0 0; line-height: 2; }
