/* CS2Day 1.10.3: shared profile matches, activity tabs and profile media. */
body.cs2day-v2 .cs2-detail--person .cs2-detail-main,
body.cs2day-v2 .cs2-detail--person .cs2-detail-sidebar {
	grid-template-columns: minmax(0, 1fr) !important;
}

body.cs2day-v2 .cs2-detail--person .cs2-detail-main > *,
body.cs2day-v2 .cs2-detail--person .cs2-detail-sidebar > * {
	grid-column: 1 / -1 !important;
}

body.cs2day-v2 .cs2-detail-sidebar .cs2-detail-facts {
	display: grid;
	grid-template-columns: minmax(0, 1fr) !important;
	gap: 0;
}

body.cs2day-v2 .cs2-detail-sidebar .cs2-detail-facts > div {
	display: grid;
	grid-template-columns: minmax(108px, .42fr) minmax(0, 1fr);
	gap: 14px;
	min-width: 0;
}

body.cs2day-v2 .cs2-detail-sidebar .cs2-detail-facts :where(dt, dd, a) {
	min-width: 0;
	overflow-wrap: anywhere;
	word-break: normal;
}

.cs2-detail-hero--person { overflow: hidden; position: relative; }
.cs2-detail-hero--person .cs2-detail-hero__cover {
	height: 100%;
	inset: 0;
	object-fit: cover;
	opacity: .24;
	position: absolute;
	width: 100%;
}
.cs2-detail-hero--person.has-cover::after {
	background: linear-gradient(90deg, color-mix(in srgb, var(--cs2-card) 96%, transparent) 0%, color-mix(in srgb, var(--cs2-card) 72%, transparent) 56%, color-mix(in srgb, var(--cs2-card) 88%, transparent) 100%);
	content: "";
	inset: 0;
	position: absolute;
}
.cs2-detail-hero--person > :not(.cs2-detail-hero__cover) { position: relative; z-index: 1; }

.cs2-person-social-links a,
.cs2-person-social-links > span {
	align-items: center;
	display: inline-flex;
	justify-content: center;
}
.cs2-person-social-links .cs2-provider-login__icon { height: 20px; width: 20px; }

.cs2-detail-panel--profile-matches { overflow: hidden; }
.cs2-detail-panel--profile-matches .cs2-profile-matches { margin: 18px -20px -20px; }
.cs2-detail-panel--profile-matches .cs2-matchcenter__tabs { padding-inline: 20px; }
.cs2-detail-panel--profile-matches .cs2-matchcenter__fixtures {
	overflow-x: hidden;
	padding-inline: 12px;
	scrollbar-gutter: auto;
}
.cs2-detail-panel--profile-matches .cs2-match-line {
	grid-template-columns: minmax(0, 1fr) 112px;
	min-width: 0;
}
.cs2-detail-panel--profile-matches .cs2-match-line__main {
	gap: 7px;
	grid-template-columns: 82px 36px minmax(64px, 1fr) 50px minmax(64px, 1fr) 36px minmax(96px, 1.1fr);
	min-width: 0;
	padding: 8px 10px;
}
.cs2-detail-panel--profile-matches .cs2-match-line__caster { padding: 8px 10px; }
.cs2-detail-panel--profile-matches .cs2-match-line__logo,
.cs2-detail-panel--profile-matches .cs2-match-line__logo img,
.cs2-detail-panel--profile-matches .cs2-match-line__initials { height: 36px; width: 36px; }

.cs2-profile-activity__workspace { display: grid; gap: 16px; }
.cs2-profile-activity__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.cs2-profile-activity__tabs button { min-height: 36px; }
.cs2-profile-activity__panel[hidden] { display: none !important; }
.cs2-detail--continuous .cs2-profile-activity__section { margin-top: 0; }
.cs2-profile-activity__grid--transfers { display: grid; grid-template-columns: minmax(0, 1fr) !important; gap: 0 !important; }
.cs2-profile-transfer-row { min-width: 0; }
.cs2-profile-transfer-row .cs2-transfer-row { border-bottom: 1px solid var(--cs2-border); }
.cs2-profile-transfer-row:last-child .cs2-transfer-row { border-bottom: 0; }

.cs2-profile-media-editor__grid {
	display: grid;
	grid-template-columns: minmax(180px, .4fr) minmax(0, 1fr);
	gap: 18px;
}
.cs2-profile-media-editor img {
	aspect-ratio: 1;
	border: 1px solid var(--cs2-border);
	border-radius: 4px;
	height: 120px;
	object-fit: cover;
	width: 120px;
}
.cs2-profile-media-editor img.is-header { aspect-ratio: 16 / 5; height: 120px; width: 100%; }
.cs2-profile-media-editor input[type="file"] { width: 100%; }

/* Keep ticker mentions as sibling links so one entry always remains one row. */
body.cs2day-v2 .cs2-ticker-directory__item {
	align-items: center;
	background: var(--cs2-v2-panel-strong);
	border: 1px solid var(--cs2-v2-border);
	border-radius: 5px;
	display: grid;
	gap: 10px;
	grid-template-columns: minmax(0, 1fr) auto auto auto;
	min-height: 58px;
	padding: 9px 12px;
}
body.cs2day-v2 .cs2-ticker-directory__item:hover { border-color: var(--cs2-v2-accent); }
body.cs2day-v2 .cs2-ticker-directory__item > a { background: transparent; border: 0; border-radius: 0; min-height: 0; padding: 0; }
body.cs2day-v2 .cs2-ticker-directory__primary {
	align-items: center;
	display: grid;
	gap: 12px;
	grid-template-columns: minmax(92px, 130px) minmax(0, 1fr);
	min-width: 0;
	text-decoration: none;
}
body.cs2day-v2 .cs2-ticker-directory__primary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.cs2day-v2 .cs2-ticker-directory__mentions { min-width: 0; }
body.cs2day-v2 .cs2-ticker-directory__mentions .cs2-mentioned-profiles { margin: 0; padding: 0; }
body.cs2day-v2 .cs2-ticker-directory__mentions .cs2-mentioned-profiles__list { flex-wrap: nowrap; }
body.cs2day-v2 .cs2-ticker-directory__mentions .cs2-mentioned-profile { max-width: 92px; min-height: 26px; padding-block: 2px; }
body.cs2day-v2 .cs2-ticker-directory__mentions .cs2-mentioned-profile__avatar,
body.cs2day-v2 .cs2-ticker-directory__mentions .cs2-mentioned-profile__avatar img { height: 18px; width: 18px; }
body.cs2day-v2 .cs2-ticker-directory__external { align-items: center; color: var(--cs2-v2-muted); display: inline-flex; justify-content: center; width: 22px; }
body.cs2day-v2 .cs2-ticker-directory__external svg { height: 16px; width: 16px; }

@media (max-width: 1040px) {
	.cs2-detail-panel--profile-matches .cs2-match-line { grid-template-columns: minmax(0, 1fr) 112px; }
}

@media (max-width: 720px) {
	body.cs2day-v2 .cs2-detail-sidebar .cs2-detail-facts > div { grid-template-columns: minmax(92px, .42fr) minmax(0, 1fr); }
	.cs2-profile-activity__tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
	.cs2-profile-activity__tabs button { flex: 0 0 auto; }
	.cs2-profile-media-editor__grid { grid-template-columns: minmax(0, 1fr); }
	.cs2-detail-panel--profile-matches .cs2-profile-matches { margin-inline: -14px; }
	.cs2-detail-panel--profile-matches .cs2-match-line { grid-template-columns: minmax(0, 1fr); }
	.cs2-detail-panel--profile-matches .cs2-match-line__caster { display: none; }
	.cs2-detail-panel--profile-matches .cs2-match-line__main {
		grid-template-columns: 32px minmax(0, 1fr) auto minmax(0, 1fr) 32px;
		padding: 10px 12px;
	}
	.cs2-detail-panel--profile-matches .cs2-match-line__date,
	.cs2-detail-panel--profile-matches .cs2-match-line__league { grid-column: 1 / -1; }
	.cs2-detail-panel--profile-matches .cs2-match-line__team--away { text-align: right; }
	.cs2-detail-panel--profile-matches .cs2-match-line__logo,
	.cs2-detail-panel--profile-matches .cs2-match-line__logo img,
	.cs2-detail-panel--profile-matches .cs2-match-line__initials { height: 32px; width: 32px; }
	body.cs2day-v2 .cs2-ticker-directory__item { grid-template-columns: minmax(0, 1fr) auto; }
	body.cs2day-v2 .cs2-ticker-directory__primary { grid-column: 1 / -1; grid-template-columns: 82px minmax(0, 1fr); }
	body.cs2day-v2 .cs2-ticker-directory__mentions { grid-column: 1; }
	body.cs2day-v2 .cs2-ticker-directory__date { grid-column: 1; justify-self: start; }
	body.cs2day-v2 .cs2-ticker-directory__external { grid-column: 2; grid-row: 2 / span 2; }
}
