/* DBTS V0.572 — friends, fuller player profile, public decks. */

/* ── Players Online menu: tabs + friends ── */
.online-menu { grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
.online-menu-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 30px 0; }
.online-menu-tabs .hub-btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.online-menu-tabs .hub-btn.active { background: linear-gradient(180deg, rgba(var(--cyan-rgb), .55), rgba(20, 70, 140, .9)); color: #fff; box-shadow: inset 0 0 0 1px var(--cyan); }
.online-tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(255, 255, 255, .16); color: #fff; font: 700 12px/1 var(--f-num); }
.online-tab-count.alert { background: var(--orange); color: #1c0c00; }
.online-tab-count[hidden] { display: none; }
.online-menu-pane { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.online-menu-pane[hidden] { display: none; }
.online-menu-pane[data-social-pane="online"], .online-menu-pane[data-social-pane="requests"] { grid-template-rows: minmax(0, 1fr); }
.online-menu-pane .online-menu-list { min-height: 160px; max-height: 46vh; }
.online-menu-status { margin: 0 30px; min-height: 20px; }
.online-menu-status:empty { display: none; }
.hub-online-chip { position: relative; }
.online-request-dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 8px var(--orange); animation: socialDot 1.6s ease-in-out infinite; }
.online-request-dot[hidden] { display: none; }
@keyframes socialDot { 50% { transform: scale(1.35); opacity: .7; } }

.social-add { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 18px 30px 0; }
.social-add[hidden] { display: none; }
.social-add input { min-width: 0; min-height: 44px; padding: 0 14px; border: 0; border-radius: 0; background: rgba(4, 8, 22, .8); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: var(--chamfer-s); color: #fff; font: 600 16px/1 var(--f-ui); letter-spacing: .03em; }
.social-add input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--cyan); }
.social-add .hub-btn { min-height: 44px; }
#socialFriendsList { grid-template-columns: 1fr; }
#socialFriendsList > .custom-sleeve-empty, .social-rows > .custom-sleeve-empty { grid-column: 1 / -1; }
.social-requests { padding: 6px 30px 18px; overflow-y: auto; max-height: 52vh; min-height: 160px; }
.social-rows { display: grid; gap: 8px; }
.social-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 14px; background: linear-gradient(180deg, rgba(26, 42, 88, .7), rgba(8, 14, 34, .9)); box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 #6d7791; clip-path: var(--chamfer-s); }
.social-row.online { box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--cyan); }
.social-row.request { grid-template-columns: minmax(0, 1fr) auto auto; }
.social-dot { width: 9px; height: 9px; border-radius: 50%; background: #8a94ad; }
.social-row.online .social-dot { background: #45e08a; box-shadow: 0 0 8px #45e08a; }
.social-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font: 700 18px/1.2 var(--f-ui); letter-spacing: .03em; }
.social-state { color: var(--text-mute); font: 700 12px/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; }
.social-row.online .social-state { color: #7ff0ad; }
.social-mini { min-height: 32px; padding: 0 12px; border: 0; border-radius: 0; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: var(--chamfer-s); color: var(--text); font: 800 12px/1 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.social-mini:hover, .social-mini:focus-visible { background: rgba(var(--cyan-rgb), .3); color: #fff; outline: none; filter: none; }
.social-mini.accept { background: rgba(69, 224, 138, .16); box-shadow: inset 0 0 0 1px rgba(69, 224, 138, .5); color: #9ff5c2; }
.social-mini.accept:hover { background: rgba(69, 224, 138, .34); color: #fff; }
.social-mini.danger { background: rgba(255, 70, 90, .09); box-shadow: inset 0 0 0 1px rgba(255, 70, 90, .28); color: #ff8996; }
.social-mini.danger:hover { background: rgba(255, 70, 90, .22); color: #fff; }
.social-mini:disabled { opacity: .5; cursor: default; }
.social-heading { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 10px; color: #fff; font: italic 800 17px/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; }
.social-heading::before { content: ''; width: 4px; height: 14px; background: var(--orange); transform: skewX(-14deg); }
.social-heading small { color: var(--text-mute); font: 700 13px/1 var(--f-num); letter-spacing: .06em; }

/* ── Profile popup: wider, scrolls, with collection + decks ── */
.player-profile-popup { width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; }
.player-profile-extra:empty { display: none; }
.social-friend-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.social-friend-bar .hub-btn { min-height: 40px; padding: 0 20px; }
.social-friend-tag { color: #9ff5c2; font: 800 13px/1 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; margin-right: auto; }
.social-friend-status { min-height: 0; margin-top: 8px; color: var(--text-dim); font: 600 13px/1.3 var(--f-ui); }
.social-friend-status:empty { display: none; }
.social-friend-status.error { color: #ff8996; }
.social-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.social-stats > div { display: grid; gap: 6px; align-content: start; padding: 11px 10px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px var(--line); }
.social-stats span { color: var(--text-mute); font: 800 10px/1.2 var(--f-ui); letter-spacing: .13em; text-transform: uppercase; }
.social-stats strong, .social-holo-row strong { color: #fff; font: 700 17px/1 var(--f-num); white-space: nowrap; }
.social-stats small, .social-holo-row small { color: var(--text-mute); font-size: .72em; }
.social-stats em { color: var(--gold); font: 700 11px/1.2 var(--f-ui); font-style: normal; letter-spacing: .06em; overflow-wrap: anywhere; }
.social-holo { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 16px; }
.social-holo-row { --hc: #9fb0d0; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.social-holo-row span { color: var(--hc); font: 800 12px/1 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; }
.social-holo-row i { height: 7px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.social-holo-row i b { display: block; height: 100%; background: var(--hc); }
.social-holo-row strong { font-size: 14px; }
.holo-red { --hc: #ff5a5a; } .holo-blue { --hc: #4aa8ff; } .holo-green { --hc: #4fd67a; }
.holo-yellow { --hc: #ffd24a; } .holo-black { --hc: #a58cff; } .holo-white { --hc: #e9eefb; }
.social-decks { display: grid; gap: 8px; }
.social-deck { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px var(--line); }
.social-deck-art { width: 44px; height: 60px; display: grid; place-items: center; overflow: hidden; background: rgba(10, 16, 40, .8); color: var(--text-mute); border-radius: 3px; }
.social-deck-art img { width: 100%; height: 100%; object-fit: cover; }
.social-deck-copy { display: grid; gap: 4px; min-width: 0; }
.social-deck-copy strong { color: #fff; font: 700 16px/1.2 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-deck-copy span { color: var(--text-mute); font: 600 12px/1.2 var(--f-ui); }
.social-deck .hub-btn { min-height: 36px; padding: 0 16px; }

/* ── Public deck viewer ── */
.social-deck-overlay { position: fixed; inset: 0; z-index: 100340; display: grid; place-items: center; padding: 3vh 3vw; background: rgba(2, 4, 12, .88); }
.social-deck-overlay[hidden] { display: none !important; }
.social-deck-viewer { display: grid; grid-template-rows: auto auto minmax(0, 1fr); width: min(1180px, 94vw); height: min(860px, 92vh); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 80px rgba(0, 0, 0, .6); clip-path: var(--chamfer-m); }
.social-deck-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 28px 16px; border-bottom: 1px solid var(--line); }
.social-deck-head h3 { margin: 4px 0; color: #fff; font: italic 900 32px/1.05 var(--f-ui); letter-spacing: .02em; overflow-wrap: anywhere; }
.social-deck-head-actions { display: flex; gap: 10px; flex: none; }
.social-deck-viewer > .hub-status { margin: 0 28px; }
.social-deck-viewer > .hub-status:empty { display: none; }
.social-deck-sections { padding: 14px 28px 24px; overflow-y: auto; align-content: start; }
body.social-deck-open #cardInspector { z-index: 100360; }

/* ── Confirm popup ── */
.social-confirm-overlay { position: fixed; inset: 0; z-index: 100380; display: grid; place-items: center; padding: 24px; background: rgba(2, 4, 12, .8); }
.social-confirm-overlay[hidden] { display: none !important; }
.social-confirm { position: relative; width: min(520px, calc(100vw - 32px)); padding: 26px 28px 24px; background: linear-gradient(145deg, rgba(18, 34, 72, .98), rgba(5, 10, 27, .99)); box-shadow: inset 0 0 0 1px rgba(100, 165, 255, .42), inset 0 4px 0 var(--orange), 0 24px 70px rgba(0, 0, 0, .55); clip-path: var(--chamfer-m); }
.social-confirm h3 { margin: 8px 0 12px; color: #fff; font: italic 900 28px/1.05 var(--f-ui); letter-spacing: .02em; }
.social-confirm-body { color: var(--text-dim); font: 600 16px/1.45 var(--f-ui); letter-spacing: .02em; }
.social-confirm-body p { margin: 0 0 10px; }
.social-confirm-body ul { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 8px; }
.social-confirm-body b { color: #fff; }
.social-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.social-confirm-actions .hub-btn { min-height: 44px; padding: 0 22px; }

/* ── Dragon Vault: Private / Public deck button ── */
.vault-deck-actions .vault-deck-visibility { grid-column: 1 / -1; }
.vault-deck-visibility::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #8a94ad; vertical-align: 1px; }
.vault-deck-visibility.is-public { background: rgba(69, 224, 138, .16) !important; box-shadow: inset 0 0 0 1px rgba(69, 224, 138, .5) !important; color: #9ff5c2 !important; }
.vault-deck-visibility.is-public::before { background: #45e08a; box-shadow: 0 0 8px #45e08a; }

body.fx-lite .online-request-dot { animation: none; }
.social-friend-bar .social-mini, .social-row .social-mini { width: auto; flex: none; }


/* ── V0.573: your own profile + what to show, in the Account menu ── */
.account-own-profile { display: grid; gap: 0; margin: 4px 0 14px; }
.account-profile-preview { padding: 20px 22px 22px; background: linear-gradient(145deg, rgba(18, 34, 72, .9), rgba(5, 10, 27, .95)); box-shadow: inset 0 0 0 1px rgba(100, 165, 255, .42), inset 4px 0 0 var(--cyan); clip-path: var(--chamfer-m); }
.account-preview-name { margin: 9px 0 5px; color: #fff; font: italic 900 34px/1 var(--f-ui); letter-spacing: .025em; overflow-wrap: anywhere; }
.player-profile-grid.single { grid-template-columns: 1fr; }
.player-profile-grid > div[hidden] { display: none; }
.social-stats { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.social-deck.preview { grid-template-columns: 44px minmax(0, 1fr); }
.profile-visibility { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-bottom: 10px; }
.profile-visibility label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; color: #fff; font: 700 15px/1.2 var(--f-ui); letter-spacing: .03em; }
.profile-visibility label:hover { box-shadow: inset 0 0 0 1px var(--cyan); }
.profile-visibility input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--cyan); cursor: pointer; }

/* ── V0.573: Zeni chip is a button; its notice popup ── */
.hub-zeni-chip { cursor: pointer; width: auto; margin: 0; appearance: none; -webkit-appearance: none; border: 0; border-radius: 0; text-align: left; text-transform: none; justify-items: start; color: inherit; }
.hub-zeni-chip:hover, .hub-zeni-chip:focus-visible { background: linear-gradient(180deg, rgba(120, 84, 20, .9), rgba(40, 26, 8, .95)); outline: none; filter: none; }
.social-confirm.wide { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; }
.social-confirm-body h4 { margin: 16px 0 8px; color: var(--gold); font: italic 800 16px/1 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; }
.social-confirm-body .social-fine { margin-top: 14px; color: var(--text-mute); font-size: 13px; line-height: 1.4; }
[data-confirm-cancel][hidden] { display: none; }


/* ── V0.565: notifications, Global Chat tab, friend request pop-up ── */
.online-menu-tabs .social-tab-wide { grid-column: 1 / -1; }
.online-menu-tabs .hub-btn { position: relative; }
.notify-bang {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: #ff2d3d; color: #fff; font: 900 14px/1 var(--f-ui); font-style: normal;
  box-shadow: 0 0 0 2px rgba(6, 10, 24, .95), 0 0 10px rgba(255, 45, 61, .8);
  animation: notifyPulse 1.6s ease-in-out infinite;
}
.notify-bang[hidden] { display: none !important; }
.online-menu-tabs .notify-bang { position: absolute; top: -8px; right: -6px; }
/* V0.565: in-match Global Chat button. Sits inline after the text so the button's slanted edge can't clip it; hidden while Global Chat is the view. */
#dbtsToggleGlobalChat .match-chat-bang { position: static; display: inline-grid; width: 17px; height: 17px; font-size: 12px; margin-left: 7px; vertical-align: -3px; box-shadow: 0 0 8px rgba(255, 45, 61, .8); }
#dbtsToggleGlobalChat.showing-global .match-chat-bang { display: none !important; }
.hub-online-chip .chip-bang { position: absolute; top: auto; bottom: 6px; right: 8px; width: 18px; height: 18px; font-size: 13px; box-shadow: 0 0 10px rgba(255, 45, 61, .8); }
@keyframes notifyPulse { 50% { transform: scale(1.15); } }
body.fx-lite .notify-bang { animation: none; }
.online-request-dot { display: none !important; }
.social-global-pane { padding: 14px 30px 4px; grid-template-rows: auto minmax(0, 1fr); }
.social-global-pane #titleGlobalChatPanel { min-height: 0 !important; height: min(50vh, 460px); }
.social-global-pane #titleGlobalChatPanel .dbts-global-messages { flex: 1 1 0; min-height: 0 !important; max-height: none; }
.social-global-signin[hidden] { display: none; }
.online-menu { width: min(760px, 94vw); }

.friend-toast-stack { position: fixed; right: 24px; bottom: 24px; z-index: 100400; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.friend-toast {
  position: relative; pointer-events: auto; padding: 16px 18px 14px;
  background: linear-gradient(145deg, rgba(18, 34, 72, .98), rgba(5, 10, 27, .99));
  box-shadow: inset 0 0 0 1px rgba(100, 165, 255, .42), inset 4px 0 0 #ff2d3d, 0 18px 50px rgba(0, 0, 0, .55);
  clip-path: var(--chamfer-m); animation: friendToastIn .3s var(--ease-out) both;
}
@keyframes friendToastIn { from { opacity: 0; transform: translateY(16px); } }
.friend-toast p { margin: 6px 34px 12px 0; color: var(--text-dim); font: 600 16px/1.35 var(--f-ui); }
.friend-toast p .social-name { font-size: 16px; }
.friend-toast-actions { display: flex; gap: 10px; align-items: center; }
.friend-toast-actions .hub-btn { min-height: 38px; padding: 0 22px; }
.friend-toast-x { position: absolute; top: 10px; right: 10px; width: 28px; min-height: 28px; padding: 0; border: 0; background: rgba(255, 255, 255, .08); color: #fff; clip-path: var(--chamfer-s); cursor: pointer; }
.friend-toast-status { margin-top: 8px; color: #9ff5c2; font: 600 13px/1.3 var(--f-ui); }
.friend-toast-status:empty { display: none; }
