/*
 * Front page pieces the Next.js design did not have, so the compiled Tailwind CSS has no classes for them: the old
 * (crossed out) price and the "coming soon" plan in the pricing section, and the refund calculator. Same colours,
 * radii and edge shadows as the rest of the page.
 */

/* --- Hero: "ჩვენთან ერთად" is wider than the design's longest line, so the title is a little smaller --- */

@media (min-width: 640px) {
	#hero-title {
		font-size: min(11.9cqw, 4.5rem);
	}
}

@media (min-width: 1024px) {
	#hero-title {
		font-size: min(11.9cqw, 8.6svh, 4.5rem);
	}
}

/* --- Pricing: a discount and a plan that is not out yet --- */

.sst-price-old {
	align-self: flex-end;
	margin-right: 0.35rem;
	padding-bottom: 0.2rem;
	font-size: 1.55rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
	white-space: nowrap;
	opacity: 0.42;
	text-decoration: line-through;
	text-decoration-thickness: 2px;
}

.sst-price-old .font-display {
	font-weight: 800;
}

.sst-plan-soon {
	box-shadow: 0 10px 0 #d9cfe6 !important;
	translate: none !important;
}

.sst-plan-soon > :not(.sst-soon-ribbon) {
	opacity: 0.68;
	filter: saturate(0.5);
	user-select: none;
}

.sst-plan-soon [aria-disabled="true"] {
	cursor: default;
	pointer-events: none;
}

/* The title keeps clear of the ribbon. */
.sst-plan-soon h3,
.sst-plan-soon h3 + p {
	padding-right: 6rem;
}

/*
 * "Coming soon": a lime ribbon across the top right corner, its ends tucked behind the card (the two dark folds).
 * The box hangs 10px over the card's edges; the band runs at 45° from its top edge to its right edge.
 */
.sst-soon-ribbon {
	position: absolute;
	z-index: 2;
	top: -10px;
	right: -10px;
	width: 170px;
	height: 170px;
	margin: 0;
	overflow: hidden;
	pointer-events: none;
}

.sst-soon-ribbon::before,
.sst-soon-ribbon::after {
	content: "";
	position: absolute;
	width: 10px;
	height: 10px;
	background: #1d4a12;
}

.sst-soon-ribbon::before {
	top: 0;
	left: 22px;
}

.sst-soon-ribbon::after {
	top: 138px;
	right: 0;
}

.sst-soon-band {
	position: absolute;
	z-index: 1;
	top: 40px;
	left: -20px;
	display: block;
	overflow: hidden;
	width: 260px;
	padding: 13.75px 0;
	background: #adee68;
	color: #0c0b0a;
	font-size: 12.5px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.14em;
	text-align: center;
	white-space: nowrap;
	rotate: 45deg;
	box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.45), inset 0 -2px 0 rgb(21 70 24 / 0.25), 0 6px 14px -4px rgb(21 70 24 / 0.55);
}

/* A glint runs along the band now and then. */
.sst-soon-band::after {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 40%;
	background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.75), transparent);
	translate: -120% 0;
	animation: sst-soon-glint 3.6s ease-in-out 1s infinite;
}

@keyframes sst-soon-glint {
	0% {
		translate: -120% 0;
	}

	45%,
	100% {
		translate: 360% 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sst-soon-band::after {
		display: none;
	}
}

/* --- The calculator --- */

.sst-calc {
	display: grid;
	gap: 3rem 2.5rem;
	align-items: start;
}

@media (min-width: 1024px) {
	.sst-calc {
		grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
		gap: 3.5rem;
	}

	.sst-calc-slip {
		margin-top: 1.75rem;
	}
}

.sst-calc-form {
	display: grid;
	gap: 1.6rem;
	padding: 1.25rem;
	border-radius: 1.75rem;
	background: #fdf8f2;
	color: #0c0b0a;
	box-shadow: 0 10px 0 #0a260c;
}

@media (min-width: 640px) {
	.sst-calc-form {
		gap: 1.9rem;
		padding: 2rem;
		border-radius: 2.25rem;
	}
}

/* Two ways in: a pill with a sliding white key (the header's language toggle) */
.sst-calc-switch {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	padding: 0.25rem;
	border-radius: 999px;
	background: rgb(219 185 243 / 0.4);
}

.sst-calc-switch::before {
	content: "";
	position: absolute;
	inset: 0.25rem auto 0.25rem 0.25rem;
	width: calc(50% - 0.25rem);
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 1px 2px rgb(59 31 99 / 0.08), 0 6px 14px -8px rgb(59 31 99 / 0.5);
	transition: translate 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.sst-calc[data-mode="wage"] .sst-calc-switch::before {
	translate: 100%;
}

.sst-calc-switch button {
	position: relative;
	height: 2.75rem;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: rgb(12 11 10 / 0.55);
	cursor: pointer;
	transition: color 0.2s;
	outline: none;
}

.sst-calc-switch button[aria-pressed="true"] {
	color: #0c0b0a;
}

.sst-calc-switch button:focus-visible {
	box-shadow: 0 0 0 2px rgb(21 70 24 / 0.5);
}

.sst-calc-pane {
	display: grid;
	gap: 1.25rem 1rem;
}

.sst-calc-pane[hidden] {
	display: none;
}

@media (min-width: 640px) {
	.sst-calc-pane {
		grid-template-columns: 1fr 1fr;
	}

	.sst-calc-wide {
		grid-column: 1 / -1;
	}
}

.sst-calc-field,
.sst-calc-group {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 0.6rem;
	min-width: 0;
}

/* Side by side, a hint of two lines would push its box lower than the neighbour's: the boxes keep to the bottom. */
.sst-calc-pane > .sst-calc-field {
	align-content: space-between;
}

.sst-calc-group {
	border: 0;
	margin: 0;
	padding: 0;
}

.sst-calc-label {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: #0c0b0a;
	padding: 0;
}

.sst-calc-hint {
	font-size: 12.5px;
	line-height: 1.35;
	color: rgb(12 11 10 / 0.5);
}

.sst-calc-hint-under {
	display: block;
	margin-top: 0.55rem;
}

.sst-calc-box {
	position: relative;
	display: block;
	flex-basis: 100%;
	margin-top: 0.2rem;
}

.sst-calc-input {
	width: 100%;
	height: 3.25rem;
	padding: 0 3rem 0 1.1rem;
	border-radius: 1rem;
	border: 0;
	background: #fff;
	color: #0c0b0a;
	font-size: 17px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	box-shadow: inset 0 0 0 1.5px rgb(12 11 10 / 0.1), 0 4px 0 #e0d5c6;
	transition: box-shadow 0.15s;
	outline: none;
}

.sst-calc-input::placeholder {
	color: rgb(12 11 10 / 0.25);
}

.sst-calc-input:hover {
	box-shadow: inset 0 0 0 1.5px rgb(12 11 10 / 0.2), 0 4px 0 #e0d5c6;
}

.sst-calc-input:focus {
	box-shadow: inset 0 0 0 2px #154618, 0 4px 0 #adee68;
}

.sst-calc-unit {
	position: absolute;
	top: 50%;
	right: 1.1rem;
	translate: 0 -50%;
	font-size: 16px;
	font-weight: 700;
	color: #36893b;
	pointer-events: none;
}

/* Year and tax class: keys in a row, the chosen one pressed in lime */
.sst-calc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	flex-basis: 100%;
	margin-top: 0.2rem;
}

.sst-calc-chip {
	position: relative;
	cursor: pointer;
}

.sst-calc-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.sst-calc-chip span {
	display: grid;
	place-items: center;
	min-width: 4.4rem;
	height: 2.75rem;
	padding: 0 1rem;
	border-radius: 0.9rem;
	background: #fff;
	font-size: 15px;
	font-weight: 700;
	color: rgb(12 11 10 / 0.7);
	box-shadow: inset 0 0 0 1.5px rgb(12 11 10 / 0.1), 0 4px 0 #e0d5c6;
	transition: translate 0.15s, box-shadow 0.15s, background-color 0.15s, color 0.15s;
}

.sst-calc-chip:hover span {
	color: #0c0b0a;
}

.sst-calc-chip input:checked + span {
	background: #adee68;
	color: #154618;
	translate: 0 2px;
	box-shadow: inset 0 0 0 1.5px rgb(21 70 24 / 0.15), 0 2px 0 #62bb39;
}

.sst-calc-chip input:focus-visible + span {
	outline: 2px solid rgb(21 70 24 / 0.6);
	outline-offset: 2px;
}

/* Months: a slider with the number beside it */
.sst-calc-range {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-basis: 100%;
	margin-top: 0.35rem;
}

.sst-calc-range input {
	flex: 1;
	min-width: 0;
	height: 1.75rem;
	background: transparent;
	accent-color: #154618;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.sst-calc-range input::-webkit-slider-runnable-track {
	height: 0.5rem;
	border-radius: 1rem;
	background: linear-gradient(#adee68, #adee68) 0 / var(--fill, 18%) 100% no-repeat, rgb(12 11 10 / 0.1);
}

.sst-calc-range input::-moz-range-track {
	height: 0.5rem;
	border-radius: 1rem;
	background: linear-gradient(#adee68, #adee68) 0 / var(--fill, 18%) 100% no-repeat, rgb(12 11 10 / 0.1);
}

.sst-calc-range input::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 1.6rem;
	height: 1.6rem;
	margin-top: -0.55rem;
	border-radius: 50%;
	background: #154618;
	border: 4px solid #fff;
	box-shadow: 0 3px 0 #0a260c, 0 6px 12px -6px rgb(0 0 0 / 0.5);
}

.sst-calc-range input::-moz-range-thumb {
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background: #154618;
	border: 4px solid #fff;
	box-shadow: 0 3px 0 #0a260c;
}

.sst-calc-range input:focus-visible {
	outline: 2px solid rgb(21 70 24 / 0.5);
	outline-offset: 4px;
	border-radius: 1rem;
}

.sst-calc-range output {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 2.75rem;
	border-radius: 0.9rem;
	background: #adee68;
	color: #154618;
	font-size: 17px;
	font-weight: 800;
	box-shadow: 0 3px 0 #62bb39;
}

/* The slip with the result */
.sst-calc-sum {
	margin-top: 1.75rem;
	font-size: clamp(2.6rem, 11vw, 4.1rem);
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}

.sst-calc-message {
	min-height: 3em;
	margin-top: 0.9rem;
	font-size: 14px;
	line-height: 1.5;
	color: rgb(12 11 10 / 0.6);
}

.sst-calc-message:empty {
	display: none;
}

.sst-calc-lines {
	margin-top: 1.25rem;
	border-top: 1px dashed rgb(12 11 10 / 0.25);
}

.sst-calc-lines > div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.8rem 0;
	border-bottom: 1px dashed rgb(12 11 10 / 0.25);
	font-size: 14px;
	line-height: 1.3;
}

.sst-calc-lines dt {
	color: rgb(12 11 10 / 0.65);
}

.sst-calc-lines dd {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.sst-calc-note {
	margin-top: 1.1rem;
	font-size: 12.5px;
	line-height: 1.55;
	color: rgb(12 11 10 / 0.5);
}

@media (prefers-reduced-motion: reduce) {
	.sst-calc-switch::before,
	.sst-calc-chip span {
		transition: none;
	}
}
