/* ==========================================================
   T10T TV — profile (cinematic dark / blue). Mobile-first, RTL-safe.
   Everything is scoped under .tp so it cannot leak into the theme.
   ========================================================== */

.tp {
    --bg: #07090f;
    --s1: #0d121c;
    --s2: #131a28;
    --s3: #1a2336;
    --bd: rgba(122, 162, 255, .16);
    --tx: #eef2ff;
    --mu: #9aa6c0;
    --ac: #2d8cff;
    --ac2: #5ab0ff;
    --gold: #f5c04a;
    --rd: #ff5468;
    --ok: #2ecc8f;

    max-width: 760px;
    margin: 0 auto;
    padding: 0 0 56px;
    color: var(--tx);
    font-family: "Cairo", "Segoe UI", system-ui, -apple-system, Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
}
.tp *, .tp *::before, .tp *::after { box-sizing: border-box; }
.tp [hidden] { display: none !important; }
.tp.tp-narrow { max-width: 620px; }

/* defeat theme typography (kept low-specificity so the classes below can still colour things) */
.tp.tp :is(h1, h2, h3, h4) { color: inherit; font-family: inherit; }
.tp :where(h1, h2, h3, h4, p, ul) { margin: 0; padding: 0; }
.tp :is(p, li, span, small, b, label) { color: inherit; font-family: inherit; }
.tp.tp ul { list-style: none; }
.tp.tp a { color: inherit; text-decoration: none; }
.tp.tp img { max-width: 100%; height: auto; }
.tp .tp-ic { flex: none; display: inline-block; vertical-align: middle; }

/* ---------- page wrapper overrides (current Astra theme) ---------- */
body.t10t-profile-page,
body.t10t-profile-page #page,
body.t10t-profile-page .site-content,
body.t10t-profile-page .ast-container,
body.t10t-profile-page #primary,
body.t10t-profile-page .site-main,
body.t10t-profile-page .entry-content,
body.t10t-profile-page article.page {
    background: #07090f !important;
}
body.t10t-profile-page .entry-header,
body.t10t-profile-page .ast-breadcrumbs-wrapper { display: none !important; }
body.t10t-profile-page .site-content > .ast-container { max-width: 100% !important; padding: 0 12px !important; display: block !important; }
body.t10t-profile-page #primary { margin: 0 !important; padding: 0 !important; width: 100% !important; }
body.t10t-profile-page .ast-separate-container .ast-article-post,
body.t10t-profile-page .ast-separate-container .ast-article-single { background: transparent !important; padding: 0 !important; border: 0 !important; }
body.t10t-profile-page .ast-separate-container #primary { padding: 0 !important; }

/* ---------- hero ---------- */
.tp-hero {
    position: relative;
    margin-top: 14px;
    background: var(--s1);
    border: 1px solid var(--bd);
    border-radius: 22px;
    overflow: hidden;
    padding-bottom: 18px;
}
.tp-cover {
    height: 118px;
    background:
        radial-gradient(1.6px 1.6px at 14% 32%, rgba(255,255,255,.7), transparent),
        radial-gradient(1.2px 1.2px at 31% 66%, rgba(255,255,255,.5), transparent),
        radial-gradient(1.6px 1.6px at 58% 24%, rgba(255,255,255,.6), transparent),
        radial-gradient(1.2px 1.2px at 79% 58%, rgba(255,255,255,.5), transparent),
        radial-gradient(1.6px 1.6px at 90% 22%, rgba(255,255,255,.65), transparent),
        radial-gradient(130% 160% at 50% -30%, #2468d6 0%, #0e2a63 42%, #07090f 100%);
}
.tp-id {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    padding: 0 18px;
    margin-top: -46px;
}
.tp-avatar {
    flex: none;
    width: 96px; height: 96px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(140deg, var(--ac2), #1c4fb8 55%, var(--gold));
    box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.tp-avatar img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--s1);
    background: var(--s2);
}
.tp-id-text { min-width: 0; padding-bottom: 6px; }
.tp .tp-name {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    overflow-wrap: anywhere;
}
.tp .tp-since { color: var(--mu); font-size: 13px; }
.tp .tp-bio { padding: 14px 18px 0; color: #cdd6ee; font-size: 15px; overflow-wrap: anywhere; }
.tp-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 18px 0; }
.tp-hero-actions:empty { display: none; padding: 0; }

/* ---------- stats ---------- */
.tp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 12px 0 0;
}
.tp-stats[data-n="2"] { grid-template-columns: repeat(2, 1fr); }
.tp-stats li {
    background: var(--s1);
    border: 1px solid var(--bd);
    border-radius: 16px;
    padding: 12px 4px;
    text-align: center;
    min-width: 0;
}
.tp-stats b {
    display: block;
    font-size: clamp(17px, 5.2vw, 23px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--tx);
    white-space: nowrap;
}
.tp-stats span { display: block; margin-top: 2px; color: var(--mu); font-size: 12px; }

/* ---------- notes, notices, empty ---------- */
.tp-note, .tp-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--bd);
    background: var(--s1);
    color: #cdd6ee;
    font-size: 14px;
}
.tp-note .tp-ic { color: var(--ac2); margin-top: 3px; }
.tp-notice { margin-top: 14px; }
.tp-notice .tp-ic { margin-top: 3px; }
.tp-notice.ok  { background: rgba(46,204,143,.10); border-color: rgba(46,204,143,.4); color: #8af0c5; }
.tp-notice.err { background: rgba(255,84,104,.10); border-color: rgba(255,84,104,.4); color: #ffa3ae; }

.tp-empty {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    margin-top: 14px;
    padding: 34px 20px;
    text-align: center;
    color: var(--mu);
    background: var(--s1);
    border: 1px dashed rgba(122,162,255,.28);
    border-radius: 20px;
}
.tp-empty .tp-ic { color: var(--ac2); opacity: .9; }

/* ---------- tabs ---------- */
.tp-tabs {
    display: flex;
    gap: 6px;
    margin: 16px 0 14px;
    padding: 5px;
    background: var(--s1);
    border: 1px solid var(--bd);
    border-radius: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tp-tabs::-webkit-scrollbar { display: none; }
.tp-tab {
    flex: 1 0 auto;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    color: var(--mu);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.tp-tab:hover { color: var(--tx); }
.tp-tab.is-active { background: var(--ac); color: #fff; }
.tp-tab:focus-visible, .tp-btn:focus-visible, .tp-page:focus-visible, .tp-back:focus-visible {
    outline: 2px solid var(--ac2);
    outline-offset: 2px;
}

.tp-panel { margin-top: 4px; }
.tp-panel-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.tp .tp-h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; }
.tp .tp-h2 small { color: var(--mu); font-weight: 600; font-size: 14px; }
.tp .tp-h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 17px; font-weight: 800; }
.tp .tp-h3 .tp-ic { color: var(--ac2); }
.tp-section { margin-top: 20px; }
.tp-section .tp-h2 { margin-bottom: 12px; }

/* ---------- buttons ---------- */
.tp .tp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: var(--ac);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, transform .05s, border-color .15s;
    -webkit-tap-highlight-color: transparent;
}
.tp .tp-btn:hover { background: #4098ff; color: #fff; }
.tp .tp-btn:active { transform: translateY(1px); }
.tp .tp-btn.ghost { background: var(--s3); border-color: var(--bd); color: var(--tx); }
.tp .tp-btn.ghost:hover { background: #222d45; color: var(--tx); }
.tp .tp-btn.danger { background: rgba(255,84,104,.12); border-color: rgba(255,84,104,.38); color: #ff93a0; }
.tp .tp-btn.danger:hover { background: rgba(255,84,104,.22); color: #ffb0ba; }
.tp .tp-btn.danger-solid { background: #e5384d; color: #fff; }
.tp .tp-btn.danger-solid:hover { background: #f04a5e; color: #fff; }
.tp .tp-btn.sm { min-height: 38px; padding: 0 13px; font-size: 13.5px; border-radius: 11px; }
.tp .tp-btn.block { width: 100%; }
.tp .tp-btn.is-busy { opacity: .65; pointer-events: none; }

/* ---------- owner video rows ---------- */
.tp-list { display: flex; flex-direction: column; gap: 10px; }
.tp-row {
    display: grid;
    grid-template-columns: 136px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    background: var(--s1);
    border: 1px solid var(--bd);
    border-radius: 18px;
}
.tp-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #000 linear-gradient(135deg, #10203f, #07090f);
    border-radius: 12px;
    overflow: hidden;
    align-self: start;
}
.tp-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-dur {
    position: absolute; inset-inline-end: 6px; bottom: 6px;
    padding: 1px 7px;
    border-radius: 8px;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    direction: ltr;
}
.tp-play {
    position: absolute; top: 50%; left: 50%;
    width: 44px; height: 44px;
    margin: -22px 0 0 -22px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(7, 9, 15, .62);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    backdrop-filter: blur(3px);
    transition: background .15s, transform .15s;
}
.tp-vcard:hover .tp-play, .tp-thumb:hover .tp-play { background: var(--ac); transform: scale(1.06); }
.tp-row-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tp .tp-vtitle {
    font-size: 15px; font-weight: 700; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    overflow-wrap: anywhere;
}
.tp .tp-vtitle a:hover { color: var(--ac2); }
.tp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--mu); font-size: 12.5px; }
.tp-meta span { display: inline-flex; align-items: center; gap: 5px; }
.tp-meta .tp-ic { color: var(--ac2); }
.tp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tp-inline-form { margin: 0; display: inline-flex; }

/* ---------- public grid ---------- */
.tp-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.tp-vcard { background: var(--s1); border: 1px solid var(--bd); border-radius: 18px; overflow: hidden; transition: transform .15s, border-color .15s; }
.tp-vcard:hover { transform: translateY(-3px); border-color: rgba(90,176,255,.45); }
.tp-vcard .tp-thumb { border-radius: 0; }
.tp-vbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; }
.tp-ago::before { content: "•"; margin-inline-end: 8px; opacity: .6; }

.tp-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.tp .tp-page {
    min-width: 42px; height: 42px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; background: var(--s1); border: 1px solid var(--bd);
    font-weight: 700;
}
.tp .tp-page.is-active { background: var(--ac); border-color: var(--ac); color: #fff; }

/* ---------- forms ---------- */
.tp-card {
    margin-top: 14px;
    padding: 18px 16px;
    background: var(--s1);
    border: 1px solid var(--bd);
    border-radius: 20px;
}
.tp-field { margin-bottom: 14px; }
.tp .tp-field > label:not(.tp-btn) { display: block; margin-bottom: 6px; color: var(--mu); font-size: 13.5px; font-weight: 700; }
.tp .tp-input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    background: #090d15;
    border: 1px solid rgba(122,162,255,.24);
    border-radius: 13px;
    color: var(--tx);
    font: inherit;
    font-size: 16px; /* stops iOS zoom on focus */
    line-height: 1.5;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
.tp textarea.tp-input { min-height: 110px; resize: vertical; }
.tp .tp-input:focus { outline: none; border-color: var(--ac); box-shadow: 0 0 0 3px rgba(45,140,255,.25); }
.tp .tp-input::placeholder { color: #5f6b86; }
.tp select.tp-input { appearance: auto; }
.tp .tp-hint { display: block; margin-top: 6px; color: var(--mu); font-size: 12.5px; }
.tp .tp-count { text-align: end; }
.tp .tp-file-err { display: block; margin-top: 6px; color: #ffa3ae; font-size: 12.5px; }

.tp-pick { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.tp-pick-img {
    flex: none; width: 76px; height: 76px; border-radius: 50%;
    padding: 2px; background: linear-gradient(140deg, var(--ac2), #1c4fb8);
}
.tp-pick-img img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; border: 2px solid var(--s1); }
.tp-pick-side { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.tp .tp-file { position: relative; overflow: hidden; cursor: pointer; }
.tp .tp-file input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.tp .tp-file:focus-within { outline: 2px solid var(--ac2); outline-offset: 2px; }

.tp-cover-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tp-thumb.static { width: 168px; max-width: 100%; }
.tp-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.tp-form-actions .tp-btn { flex: 1 1 140px; }
.tp-back { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--ac2); font-weight: 700; }
html[dir="rtl"] .tp-back .tp-ic, .tp[dir="rtl"] .tp-back .tp-ic { transform: scaleX(-1); }

/* ---------- badges ---------- */
.tp .tp-badge {
    display: inline-flex; align-items: center;
    padding: 1px 10px;
    border-radius: 999px;
    font-size: 11.5px; font-weight: 800; line-height: 1.7;
    letter-spacing: .01em;
}
.tp .tp-badge.gold { background: rgba(245,192,74,.14); color: var(--gold); border: 1px solid rgba(245,192,74,.42); }

/* ---------- danger zone ---------- */
.tp-danger {
    margin-top: 14px;
    padding: 4px 16px;
    background: rgba(255,84,104,.06);
    border: 1px solid rgba(255,84,104,.34);
    border-radius: 18px;
}
.tp-danger summary {
    display: flex; align-items: center; gap: 8px;
    min-height: 52px;
    color: #ff93a0; font-weight: 800; cursor: pointer; list-style: none;
}
.tp-danger summary::-webkit-details-marker { display: none; }
.tp-danger[open] summary { border-bottom: 1px solid rgba(255,84,104,.25); margin-bottom: 14px; }
.tp .tp-danger p { color: #d3b0b6; font-size: 14px; margin-bottom: 14px; }
.tp .tp-danger .tp-del-err { color: #ffa3ae; font-weight: 700; }
.tp-danger .tp-btn { margin-bottom: 14px; }

/* ---------- wider screens ---------- */
@media (min-width: 560px) {
    .tp-grid { grid-template-columns: repeat(2, 1fr); }
    .tp-row { grid-template-columns: 190px minmax(0, 1fr); }
    .tp .tp-name { font-size: 24px; }
    .tp-card { padding: 22px 22px; }
}
@media (max-width: 380px) {
    .tp-row { grid-template-columns: 108px minmax(0, 1fr); gap: 10px; }
    .tp-avatar { width: 84px; height: 84px; }
    .tp-id { margin-top: -40px; padding: 0 14px; gap: 10px; }
    .tp .tp-name { font-size: 19px; }
    .tp-stats[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .tp *, .tp *::before, .tp *::after { transition: none !important; }
}
