/*
 * Credential table shortcode styles — minimalist, defensive.
 *
 * Every selector is doubled (.bl-cred-tables .bl-cred-table…) to outrank
 * generic `table` / `td` / `img` styles from Hello Elementor parent,
 * Elementor widget defaults, and host plugins. !important is used only
 * on logo sizing, where Elementor's global `img { max-width: 100%; height: auto }`
 * otherwise collapses the inline width/height.
 */

.bl-cred-tables {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin: 0;
}

/* Reset: strip every property a generic theme/widget table style might paint. */
.bl-cred-tables .bl-cred-table,
.bl-cred-tables .bl-cred-table thead,
.bl-cred-tables .bl-cred-table tbody,
.bl-cred-tables .bl-cred-table tfoot,
.bl-cred-tables .bl-cred-table tr,
.bl-cred-tables .bl-cred-table th,
.bl-cred-tables .bl-cred-table td {
	background: transparent;
	background-color: transparent;
	border: 0;
	border-collapse: collapse;
	box-shadow: none;
}

.bl-cred-tables .bl-cred-table {
	--bl-cred-table-logo: 56px;
	width: 100%;
	border-collapse: collapse;
	table-layout: auto;
}

.bl-cred-tables .bl-cred-table td {
	padding: 0.625rem 1rem 0.625rem 0;
	vertical-align: middle;
	text-align: left;
	font-size: inherit;
}

.bl-cred-tables .bl-cred-table td:last-child {
	padding-right: 0;
}

.bl-cred-tables .bl-cred-table tbody tr + tr td {
	padding-top: 0.875rem;
}

/* Brand cell: narrow column hugging the logo + name. */
.bl-cred-tables .bl-cred-table td.bl-cred-table__brand {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    flex-direction: column;
    width: 180px;
}

/* Detail cell: takes the rest. */
.bl-cred-tables .bl-cred-table td.bl-cred-table__detail {
	width: auto;
	color: inherit;
	line-height: 1.45;
}

/* Logo sizing — !important here to defeat `.elementor img { max-width: 100%; height: auto }`. */
.bl-cred-tables .bl-cred-table img.bl-cred-table__logo {
	width: var(--bl-cred-table-logo) !important;
	height: var(--bl-cred-table-logo) !important;
	max-width: none !important;
	max-height: none !important;
	min-width: 0;
	min-height: 0;
	object-fit: contain;
	display: block;
	flex-shrink: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
	margin: 0;
}

/* Placeholder shown when no badge image is configured at all. */
.bl-cred-tables .bl-cred-table .bl-cred-table__placeholder {
	width: var(--bl-cred-table-logo);
	height: var(--bl-cred-table-logo);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	flex-shrink: 0;
	background: transparent;
}

.bl-cred-tables .bl-cred-table .bl-cred-table__name {
	font-weight: 500;
	font-size: 0.9375rem;
	line-height: 1.3;
	color: inherit;
	overflow-wrap: anywhere;
}

.bl-cred-tables .bl-cred-table .bl-cred-table__desc {
	margin: 0;
	padding: 0;
	font-size: 0.9375rem;
	line-height: 1.4;
	color: #4b5563;
}

.bl-cred-tables .bl-cred-table .bl-cred-table__meta {
    list-style: none;
    padding: 0;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: #4b5563;
}

.bl-cred-tables .bl-cred-table .bl-cred-table__meta li {
	display: inline;
	margin: 0;
	padding: 0;
	background: none;
}

.bl-cred-tables .bl-cred-table .bl-cred-table__meta li::before,
.bl-cred-tables .bl-cred-table .bl-cred-table__meta li::marker {
	content: none;
}

.bl-cred-tables .bl-cred-table .bl-cred-table__meta li + li::before {
	content: " · ";
	margin: 0 0.125rem;
	color: #d1d5db;
}

/* Subtle row hover on pointer-fine devices only. */
@media (hover: hover) {
	.bl-cred-tables .bl-cred-table tbody tr:hover td {
		background-color: rgba(0, 0, 0, 0.02);
	}
}

/* Compact layout on narrow viewports. */
@media (max-width: 480px) {
	.bl-cred-tables .bl-cred-table {
		--bl-cred-table-logo: 40px;
	}

	.bl-cred-tables .bl-cred-table td.bl-cred-table__brand {
		gap: 0.625rem;
	}

	.bl-cred-tables .bl-cred-table td {
		padding: 0.5rem 0.625rem 0.5rem 0;
	}

	.bl-cred-tables .bl-cred-table tbody tr + tr td {
		padding-top: 0.75rem;
	}

	.bl-cred-tables .bl-cred-table .bl-cred-table__name,
	.bl-cred-tables .bl-cred-table .bl-cred-table__desc {
		font-size: 0.875rem;
	}
}
