/* Citygas calculator – based on design reference (тест.html) */

.cgc-calculator {
	box-sizing: border-box;
	width: 100%;
	max-width: 800px;
	margin: 0 auto 2rem;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.4;
	color: #333;
	background-color: #ffffff;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	border: 1px solid #d1d9e0;
}

.cgc-calculator *,
.cgc-calculator *::before,
.cgc-calculator *::after {
	box-sizing: border-box;
}

/* Header */
.cgc-calculator__header {
	background: linear-gradient(to bottom, #4a75a0, #2c5270);
	color: #ffffff;
	text-align: center;
	padding: 15px;
	font-size: clamp(1.1rem, 3vw, 1.4rem);
	font-weight: bold;
	letter-spacing: 1px;
	text-transform: uppercase;
}

/* Inputs */
.cgc-calculator__inputs {
	padding: clamp(16px, 4vw, 30px);
	display: flex;
	flex-direction: column;
	max-width: 650px;
	margin: 0 auto;
}

.cgc-calculator__form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cgc-input-row {
	display: flex;
	align-items: center;
	gap: 15px;
}

.cgc-icon-box {
	width: 80px;
	height: 80px;
	border: 2px solid #4a75a0;
	border-radius: 8px;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: #f9fbfd;
	flex-shrink: 0;
	overflow: hidden;
}

.cgc-icon-box img {
	max-width: 72px;
	max-height: 72px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.cgc-icon-box__fallback {
	display: block;
	width: 48px;
	height: 48px;
	background: linear-gradient(135deg, #dce8f4 0%, #b8cfe0 100%);
	border-radius: 4px;
}

.cgc-select-wrapper {
	flex-grow: 1;
	display: flex;
	align-items: center;
	min-width: 0;
	background: linear-gradient(to bottom, #618bb0, #41688c);
	border-radius: 4px;
	padding: 2px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cgc-select-label {
	color: #ffffff;
	padding: 10px 15px;
	font-size: clamp(0.78rem, 2vw, 0.9rem);
	font-weight: bold;
	min-width: min(180px, 38%);
	text-transform: uppercase;
	flex-shrink: 0;
}

.cgc-select-wrapper select {
	flex-grow: 1;
	width: 100%;
	min-width: 0;
	padding: 10px;
	border: none;
	background-color: #ffffff;
	border-radius: 0 3px 3px 0;
	font-family: inherit;
	font-size: clamp(0.78rem, 2vw, 0.9rem);
	color: #333333;
	cursor: pointer;
	outline: none;
}

.cgc-select-wrapper select:focus {
	box-shadow: 0 0 0 2px #00b0f0;
}

.cgc-calculator__error {
	color: #b32d2e;
	text-align: center;
	font-size: 0.85rem;
	margin: 0;
}

.cgc-calculator__loading {
	text-align: center;
	font-size: 0.85rem;
	font-weight: bold;
	color: #365f91;
	margin: 0;
	text-transform: uppercase;
}

.cgc-calculator.is-loading .cgc-results-table {
	opacity: 0.55;
}

/* Results */
.cgc-results {
	border-top: 1px solid #d1d9e0;
}

.cgc-results__header {
	background-color: #365f91;
	color: #ffffff;
	text-align: center;
	padding: 12px;
	font-size: clamp(0.8rem, 2.2vw, 0.95rem);
	font-weight: bold;
	text-transform: uppercase;
	line-height: 1.35;
}

.cgc-results__table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.cgc-results-table {
	width: 100%;
	min-width: 520px;
	border-collapse: collapse;
	text-align: center;
	font-family: inherit;
}

.cgc-results-table th,
.cgc-results-table td {
	border: 1px solid #d1d9e0;
	padding: 15px 10px;
	width: 20%;
	vertical-align: middle;
}

.cgc-results-table thead th {
	background-color: #ffffff;
	font-size: clamp(0.72rem, 1.8vw, 0.85rem);
	color: #333333;
	font-weight: bold;
	vertical-align: top;
}

.cgc-results-table__icon {
	display: block;
	margin: 0 auto 10px;
	max-width: 48px;
	max-height: 48px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.cgc-results-table__name {
	display: block;
	line-height: 1.25;
}

.cgc-results-table__th--gas .cgc-results-table__name {
	color: #00b0f0;
}

.cgc-results-table__prices td {
	font-size: clamp(0.95rem, 2.5vw, 1.1rem);
	font-weight: bold;
	color: #1f497d;
	background-color: #f2f5f9;
}

.cgc-results-table__prices td.cgc-gas-highlight {
	color: #00b0f0;
}

.cgc-results-table__quantities td {
	font-size: clamp(0.78rem, 2vw, 0.9rem);
	color: #595959;
	background-color: #e9eef4;
}

.cgc-results-table__quantities td.cgc-gas-highlight {
	color: #00b0f0;
	font-weight: bold;
}

/* Mobile */
@media (max-width: 600px) {
	.cgc-input-row {
		flex-direction: column;
		align-items: stretch;
	}

	.cgc-icon-box {
		margin: 0 auto;
	}

	.cgc-select-wrapper {
		flex-direction: column;
	}

	.cgc-select-label {
		min-width: auto;
		text-align: center;
		width: 100%;
	}

	.cgc-select-wrapper select {
		border-radius: 0 0 3px 3px;
		width: 100%;
	}

	.cgc-results-table {
		min-width: 480px;
	}
}
