/**
 * Структурный CSS шаблона [abon_catalog] — сетка, высоты, попап.
 * !important — против Elementor/темы, которые сбрасывают display/width.
 */

.abon-crm-catalog,
.elementor-widget-container .abon-crm-catalog,
.elementor-shortcode .abon-crm-catalog {
	width: 100% !important;
	max-width: 1120px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box !important;
}
.abon-crm-policy {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.45;
}

.abon-crm-catalog__grid,
.abon-crm-catalog > .abon-crm-catalog__grid,
.elementor-widget-container .abon-crm-catalog__grid,
.elementor-shortcode .abon-crm-catalog__grid {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) !important;
	gap: 16px !important;
	align-items: stretch !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

@media (min-width: 768px) {
	.abon-crm-catalog__grid,
	.abon-crm-catalog > .abon-crm-catalog__grid,
	.elementor-widget-container .abon-crm-catalog__grid,
	.elementor-shortcode .abon-crm-catalog__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 18px !important;
	}
}

@media (min-width: 992px) {
	.abon-crm-catalog__grid,
	.abon-crm-catalog > .abon-crm-catalog__grid,
	.elementor-widget-container .abon-crm-catalog__grid,
	.elementor-shortcode .abon-crm-catalog__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 20px !important;
	}
}

.abon-crm-catalog__grid > .abon-crm-product,
.abon-crm-product {
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	min-width: 0 !important;
	max-width: 100% !important;
	width: auto !important;
	box-sizing: border-box !important;
	float: none !important;
	clear: none !important;
}
.abon-crm-product__head {
	margin-bottom: 10px;
}
.abon-crm-product__title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
}
.abon-crm-product__desc {
	margin: 0;
	font-size: 13px;
	line-height: 1.35;
}
.abon-crm-product__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}
.abon-crm-product .abonement-table {
	width: 100% !important;
	border-collapse: collapse;
	margin: 0;
}
.abon-crm-product .abonement-table td {
	padding: 10px 0;
	vertical-align: middle;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
}
.abon-crm-product .abonement-table td:first-child {
	padding-right: 10px;
	width: 100%;
}
.abon-crm-product .abonement-table td:last-child {
	width: 1%;
	white-space: nowrap;
	text-align: right;
	vertical-align: middle;
}
.abon-crm-variant__name {
	font-size: 13px;
	line-height: 1.3;
}
.abon-crm-variant__price {
	margin-top: 4px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
}
.abon-crm-product .abon-crm-buy,
.abon-crm-product .buy-trigger {
	white-space: nowrap;
}

/* Попап — структура */
.abon-crm-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
}
.abon-crm-popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	padding: 18px 18px 16px;
	z-index: 9999;
	width: min(340px, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	overflow: auto;
	box-sizing: border-box;
}
.abon-crm-popup[hidden],
.abon-crm-overlay[hidden] {
	display: none !important;
}
#abon-crm-popup-body {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.abon-crm-buy-info {
	padding-bottom: 10px;
	margin-bottom: 12px;
}
.abon-crm-buy-info__title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
}
.abon-crm-buy-info__price {
	font-size: 14px;
	margin-top: 4px;
}
.abon-crm-fields {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 12px;
}
.abon-crm-field {
	display: block;
	margin: 0;
}
.abon-crm-field__label {
	display: block;
	font-size: 12px;
	margin-bottom: 4px;
}
.abon-crm-popup .abon-crm-input,
.abon-crm-popup .buy-input {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	box-sizing: border-box;
	height: 40px;
	padding: 0 10px;
	font-size: 14px;
	line-height: 40px;
}
.abon-crm-popup select.abon-crm-input,
.abon-crm-popup select.buy-input.vremya {
	padding-right: 28px;
	cursor: pointer;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.abon-crm-paymethod {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 12px;
}
.abon-crm-paymethod__opt {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	cursor: pointer;
}
.abon-crm-paymethod__opt:has(input:checked) {
	border-color: currentColor;
	font-weight: 600;
}
.abon-crm-paymethod__opt input {
	margin: 0;
}
.abon-crm-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 4px;
}
.abon-crm-actions button,
.abon-crm-popup .bt_bb_link {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0 !important;
	cursor: pointer;
	height: 40px;
	padding: 0 8px;
	font-size: 13px;
	font-weight: 600;
	line-height: 40px;
	text-align: center;
}
.abon-crm-actions button:disabled {
	opacity: 0.7;
	cursor: wait;
}
.abon-crm-error {
	font-size: 13px;
	margin: 0 0 8px;
	line-height: 1.3;
}

.abon-crm-thanks {
	max-width: 520px;
	margin: 40px auto;
	padding: 0 16px;
}
