/* ================================================================== */
/* iHELP pasica za piškotke – samostojen modul (predpona "ihc-")        */
/* ================================================================== */

.ihc {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 1000;
	width: min(460px, calc(100% - 40px));
	font-family: inherit;
	color: #26262a;
}

.ihc[hidden] {
	display: none;
}

.ihc-box {
	padding: 22px;
	background: #fff;
	border: 1px solid #e2e1e4;
	border-radius: 16px;
	box-shadow: 0 18px 50px rgba(20, 20, 24, .18);
}

.ihc .ihc-title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 750;
	line-height: 1.25;
	letter-spacing: -.02em;
}

.ihc .ihc-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: #55555e;
}

.ihc .ihc-link {
	color: #26262a;
	font-weight: 650;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Nastavitve ---------- */
.ihc-settings {
	display: grid;
	gap: 8px;
	margin-top: 16px;
}

.ihc-settings[hidden] {
	display: none;
}

.ihc-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 14px;
	background: #f4f2f1;
	border-radius: 10px;
	cursor: pointer;
}

.ihc-row-text strong {
	display: block;
	font-size: 14px;
	line-height: 1.3;
}

.ihc-row-text small {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	line-height: 1.4;
	color: #55555e;
}

/* Stikalo */
.ihc .ihc-switch {
	flex: none;
	position: relative;
	width: 42px;
	height: 24px;
	margin: 0;
	border-radius: 999px;
	background: #c9c8ce;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background .2s ease;
}

.ihc .ihc-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
	transition: transform .2s ease;
}

.ihc .ihc-switch:checked {
	background: #ec1c24;
}

.ihc .ihc-switch:checked::after {
	transform: translateX(18px);
}

.ihc .ihc-switch:disabled {
	opacity: .55;
	cursor: not-allowed;
}

.ihc .ihc-switch:focus-visible {
	outline: 2px solid #a6202a;
	outline-offset: 2px;
}

/* ---------- Gumbi ---------- */
.ihc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
}

.ihc .ihc-btn {
	flex: 1 1 auto;
	min-height: 42px;
	margin: 0;
	padding: 9px 14px;
	border: 1px solid transparent;
	border-radius: 8px;
	font: inherit;
	font-size: 14px;
	font-weight: 750;
	line-height: 1.2;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.ihc .ihc-btn[hidden] {
	display: none;
}

.ihc .ihc-btn-primary {
	background: #ec1c24;
	color: #fff;
}

.ihc .ihc-btn-dark {
	background: #242427;
	color: #fff;
}

.ihc .ihc-btn-ghost {
	flex-grow: 0;
	background: #fff;
	border-color: #cac8cd;
	color: #26262a;
}

.ihc .ihc-btn:hover {
	filter: brightness(1.1);
}

.ihc .ihc-btn:focus-visible {
	outline: 3px solid #a6202a;
	outline-offset: 2px;
}

/* ---------- Povezava v nogi ---------- */
.ihc-open {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: inherit;
	cursor: pointer;
}

.ihc-open:hover {
	text-decoration: underline;
	text-underline-offset: 5px;
}

/* ---------- Telefon: pasica čez celo širino ---------- */
@media (max-width: 520px) {
	.ihc {
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
	}

	.ihc-box {
		padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
		border-radius: 16px 16px 0 0;
		border-bottom: 0;
	}

	.ihc .ihc-btn-ghost {
		flex-basis: 100%;
		order: 3;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ihc .ihc-switch,
	.ihc .ihc-switch::after {
		transition: none;
	}
}
