/**
 * Compare Table — common widget CSS (layout, sticky, stars, stock).
 *
 * @package captain-widgets-kit
 * @since   1.4.0
 */

.captwiki-compare {
	width: 100%;
}

.captwiki-compare__scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.captwiki-compare__table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	min-width: 480px;
}

.captwiki-compare__table th,
.captwiki-compare__table td {
	padding: 14px 16px;
	border: 1px solid #e5e7eb;
	text-align: center;
	vertical-align: middle;
}

.captwiki-compare__label {
	width: 180px;
	text-align: left;
	font-weight: 600;
	color: #374151;
	background: #f9fafb;
}

.captwiki-compare__cell {
	color: #374151;
}

.captwiki-compare__cell--desc {
	text-align: left;
	font-size: 0.92em;
	line-height: 1.5;
}

/* Product header. */
.captwiki-compare__phead {
	position: relative;
	background: #ffffff;
	vertical-align: top;
}

.captwiki-compare__img {
	display: block;
	margin: 0 auto 10px;
}

.captwiki-compare__img img {
	display: block;
	margin: 0 auto;
	width: 120px;
	height: 120px;
	object-fit: cover;
	border-radius: 8px;
}

.captwiki-compare__title {
	display: block;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	color: #111827;
}

.captwiki-compare__title a {
	color: inherit;
	text-decoration: none;
}

.captwiki-compare__title a:hover {
	text-decoration: underline;
}

/* Highlight column + ribbon. */
.captwiki-compare__col--highlight {
	border-left: 2px solid #2563eb;
	border-right: 2px solid #2563eb;
}

.captwiki-compare__phead.captwiki-compare__col--highlight {
	border-top: 2px solid #2563eb;
}

.captwiki-compare__ribbon {
	display: inline-block;
	margin-bottom: 8px;
	padding: 3px 12px;
	border-radius: 999px;
	background: #2563eb;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Compact stars. */
.captwiki-compare__stars {
	position: relative;
	display: inline-block;
	font-size: 15px;
	line-height: 1;
	font-family: Arial, Helvetica, sans-serif;
	vertical-align: middle;
}

.captwiki-compare__stars-empty {
	color: #d1d5db;
	letter-spacing: 2px;
}

.captwiki-compare__stars-filled {
	position: absolute;
	top: 0;
	left: 0;
	width: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #f59e0b;
	letter-spacing: 2px;
}

.captwiki-compare__rcount {
	margin-left: 6px;
	font-size: 0.82em;
	color: #6b7280;
	vertical-align: middle;
}

/* Stock states. */
.captwiki-compare__stock--in {
	color: #16a34a;
	font-weight: 600;
}

.captwiki-compare__stock--out {
	color: #dc2626;
	font-weight: 600;
}

/* Add-to-cart cell. */
.captwiki-compare__cell--cart .button {
	display: inline-block;
	cursor: pointer;
}

/* Sticky label column. */
.captwiki-compare--sticky .captwiki-compare__label {
	position: sticky;
	left: 0;
	z-index: 2;
}

/* Editor notice. */
.captwiki-compare--notice {
	display: block;
	padding: 14px 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	background: #f6f7f7;
	color: #50575e;
	text-align: center;
	font-size: 13px;
}

.captwiki-compare--notice p {
	margin: 0;
}
