/* Element Brand — rank card for Flatsome UX Builder (light theme, blue accent) */

/* The rank badge numbers the cards in document order. */
body {
	counter-reset: element-brand;
}

.eb-brand {
	--eb-primary: #032fb4;
	--eb-primary-hi: #1f4fd8;
	--eb-primary-lo: #021f80;
	--eb-navy: #0a1233;
	--eb-text: #3a4668;
	--eb-line: #d6def2;
	--eb-tile: #eef2fc;
	--eb-star-off: #cdd6ee;
	--eb-font: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;

	position: relative;
	margin: 0 0 16px;
	padding-left: 46px;
	color: var(--eb-text);
	counter-increment: element-brand;
}

.eb-brand,
.eb-brand *,
.eb-brand *::before,
.eb-brand *::after {
	box-sizing: border-box;
}

/* Rank badge hanging off the left edge. */
.eb-brand__rank {
	position: absolute;
	z-index: 2;
	top: 21px;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 51px;
	height: 43px;
	padding-right: 8px;
	background: linear-gradient(135deg, var(--eb-primary-hi), var(--eb-primary));
	clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
	color: #fff;
	font: italic 800 32px/1 var(--eb-font);
}

.eb-brand__rank::before {
	content: counter(element-brand);
}

.eb-brand__card {
	position: relative;
	display: grid;
	grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr) 158px;
	grid-template-areas: "logo info meta actions";
	column-gap: 17px;
	align-items: center;
	min-height: 110px;
	margin-left: 5px;
	padding: 14px 17px 14px 40px;
	border: 1px solid var(--eb-line);
	border-left: 0;
	border-radius: 0 6px 6px 0;
	background:
		repeating-linear-gradient(114deg, transparent 0 10.3px, rgba(3, 47, 180, 0.04) 10.3px 12.1px),
		linear-gradient(90deg, #f3f6fe, #fff);
	box-shadow: 0 2px 10px rgba(3, 47, 180, 0.08);
}

/* Blue bar on the left edge of the card. */
.eb-brand__card::before {
	content: "";
	position: absolute;
	top: -1px;
	bottom: -1px;
	left: -5px;
	width: 5px;
	background: linear-gradient(90deg, var(--eb-primary-hi), var(--eb-primary));
}

/* Logo tile */
.eb-brand__logo {
	position: relative;
	grid-area: logo;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 82px;
}

.eb-brand__logo::before {
	content: "";
	position: absolute;
	inset: 0;
	border: 1px solid var(--eb-line);
	background: var(--eb-tile);
	transform: skewX(-6deg);
}

.eb-brand .eb-brand__img {
	position: relative;
	display: block;
	width: 64px;
	height: 64px;
	max-width: none;
	margin: 0;
	border-radius: 10px;
	object-fit: contain;
}

/* Sub title + title */
.eb-brand__info {
	grid-area: info;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 7px;
	min-width: 0;
}

.eb-brand__subtitle {
	display: inline-block;
	max-width: 100%;
	padding: 0 16px 0 10px;
	background: var(--eb-primary);
	clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
	color: #fff;
	font: italic 800 14px/28px var(--eb-font);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.eb-brand__title {
	max-width: 100%;
	margin: 0;
	color: var(--eb-navy);
	font: italic 800 30px/1.05 var(--eb-font);
	letter-spacing: 0.01em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

/* Rating + text */
.eb-brand__meta {
	grid-area: meta;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
}

.eb-brand__rating {
	display: inline-flex;
	align-items: center;
	gap: 1px;
	min-width: 98px;
	height: 28px;
	padding: 0 9px;
	border: 1px solid var(--eb-line);
	border-radius: 3px;
	background: #fff;
	font-size: 13px;
	line-height: 1;
}

.eb-star {
	color: var(--eb-star-off);
}

.eb-star.is-on {
	color: var(--eb-primary);
}

.eb-brand__text {
	max-width: 100%;
	color: var(--eb-text);
	font-size: 14px;
	line-height: 1.4;
}

.eb-brand__text > :first-child {
	margin-top: 0;
}

.eb-brand__text > :last-child {
	margin-bottom: 0;
}

.eb-brand__text p {
	margin: 0 0 0.35em;
	font-size: inherit;
}

.eb-brand__text a {
	color: var(--eb-primary);
}

/* Buttons */
.eb-brand__actions {
	grid-area: actions;
	display: flex;
	flex-direction: column;
	gap: 13px;
}

.eb-brand .eb-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 158px;
	height: 32px;
	margin: 0;
	padding: 0 20px;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
	font: italic 800 15px/1 var(--eb-font);
	letter-spacing: 0.05em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition: filter 0.15s ease;
}

.eb-brand .eb-btn > span {
	position: relative;
	z-index: 1;
}

.eb-brand .eb-btn:hover,
.eb-brand .eb-btn:focus-visible {
	text-decoration: none;
}

/* clip-path would hide the focus ring, so keyboard focus drops the slanted shape. */
.eb-brand .eb-btn:focus-visible,
.eb-brand .eb-btn--secondary:focus-visible::before {
	clip-path: none;
}

.eb-brand .eb-btn:focus-visible {
	outline: 2px solid var(--eb-primary);
	outline-offset: 2px;
}

.eb-brand .eb-btn--primary,
.eb-brand .eb-btn--primary:hover,
.eb-brand .eb-btn--primary:focus {
	background: linear-gradient(160deg, var(--eb-primary-hi) 0%, var(--eb-primary) 50%, var(--eb-primary-lo) 100%);
	color: #fff;
}

.eb-brand .eb-btn--primary:hover,
.eb-brand .eb-btn--primary:focus-visible {
	filter: brightness(1.15);
}

/* Secondary: white fill inside a 1px blue outline. */
.eb-brand .eb-btn--secondary,
.eb-brand .eb-btn--secondary:hover,
.eb-brand .eb-btn--secondary:focus {
	background: var(--eb-primary);
	color: var(--eb-primary);
}

.eb-brand .eb-btn--secondary::before {
	content: "";
	position: absolute;
	inset: 1px;
	background: #fff;
	clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
	transition: background-color 0.15s ease;
}

.eb-brand .eb-btn--secondary:hover::before,
.eb-brand .eb-btn--secondary:focus-visible::before {
	background: var(--eb-tile);
}

/* Tablet: logo left, details right, buttons on their own row. */
@media (max-width: 849px) {
	.eb-brand__card {
		grid-template-columns: 112px minmax(0, 1fr);
		grid-template-areas:
			"logo info"
			"logo meta"
			"actions actions";
		row-gap: 12px;
		padding: 16px 16px 16px 28px;
	}

	.eb-brand__actions {
		flex-direction: row;
		gap: 10px;
	}

	.eb-brand .eb-btn {
		flex: 1 1 0;
		width: auto;
		padding: 0 14px;
	}
}

/* Phone */
@media (max-width: 549px) {
	.eb-brand {
		padding-left: 36px;
	}

	.eb-brand__rank {
		top: 16px;
		width: 41px;
		height: 34px;
		padding-right: 6px;
		clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%);
		font-size: 24px;
	}

	.eb-brand__card {
		grid-template-columns: 84px minmax(0, 1fr);
		column-gap: 12px;
		padding: 14px 12px 14px 20px;
	}

	.eb-brand__logo {
		height: 68px;
	}

	.eb-brand .eb-brand__img {
		width: 48px;
		height: 48px;
		border-radius: 8px;
	}

	.eb-brand__title {
		font-size: 24px;
	}

	.eb-brand .eb-btn {
		font-size: 14px;
	}
}
