/**
 * Foradux Media — Multi-step frontend price calculator
 */

.foradux-hesaplayici {
	--fd-primary: #1a5fb4;
	--fd-primary-dark: #0d4a8f;
	--fd-accent: #3584e4;
	--fd-success: #2ec27e;
	--fd-error: #e01b24;
	--fd-border: #d8dee4;
	--fd-bg: #f6f8fb;
	--fd-card: #ffffff;
	--fd-text: #1e1e1e;
	--fd-muted: #5e5c64;
	--fd-radius: 12px;
	--fd-shadow: 0 8px 32px rgba(26, 95, 180, 0.08);

	max-width: 860px;
	margin: 2rem auto;
	padding: 0 1rem;
	font-family: inherit;
	color: var(--fd-text);
	box-sizing: border-box;
}

.foradux-hesaplayici *,
.foradux-hesaplayici *::before,
.foradux-hesaplayici *::after {
	box-sizing: border-box;
}

.foradux-hesaplayici__header {
	text-align: center;
	margin-bottom: 1.75rem;
}

.foradux-hesaplayici__title {
	margin: 0 0 0.35rem;
	font-size: clamp(1.4rem, 3vw, 1.85rem);
	font-weight: 700;
	color: var(--fd-primary);
}

.foradux-hesaplayici__subtitle {
	margin: 0;
	color: var(--fd-muted);
	font-size: 0.95rem;
}

/* Step indicator */
.foradux-hesaplayici__steps {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	counter-reset: none;
}

.foradux-hesaplayici__step-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	position: relative;
	text-align: center;
}

.foradux-hesaplayici__step-item:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 18px;
	left: calc(50% + 22px);
	width: calc(100% - 44px);
	height: 2px;
	background: var(--fd-border);
	z-index: 0;
}

.foradux-hesaplayici__step-item.is-complete:not(:last-child)::after,
.foradux-hesaplayici__step-item.is-active:not(:last-child)::after {
	background: var(--fd-accent);
}

.foradux-hesaplayici__step-num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--fd-border);
	color: var(--fd-muted);
	font-weight: 700;
	font-size: 0.9rem;
	position: relative;
	z-index: 1;
	transition: background 0.2s, color 0.2s, transform 0.2s;
}

.foradux-hesaplayici__step-item.is-active .foradux-hesaplayici__step-num,
.foradux-hesaplayici__step-item.is-complete .foradux-hesaplayici__step-num {
	background: var(--fd-primary);
	color: #fff;
}

.foradux-hesaplayici__step-item.is-active .foradux-hesaplayici__step-num {
	transform: scale(1.08);
	box-shadow: 0 0 0 4px rgba(53, 132, 228, 0.2);
}

.foradux-hesaplayici__step-label {
	font-size: 0.72rem;
	color: var(--fd-muted);
	font-weight: 500;
	line-height: 1.2;
}

.foradux-hesaplayici__step-item.is-active .foradux-hesaplayici__step-label {
	color: var(--fd-primary);
	font-weight: 600;
}

/* Form card */
.foradux-hesaplayici__form {
	background: var(--fd-card);
	border: 1px solid var(--fd-border);
	border-radius: var(--fd-radius);
	box-shadow: var(--fd-shadow);
	overflow: hidden;
}

.foradux-hesaplayici__panel {
	padding: 1.75rem 1.75rem 0.5rem;
	animation: foraduxFadeIn 0.25s ease;
}

.foradux-hesaplayici__panel[hidden] {
	display: none !important;
}

@keyframes foraduxFadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.foradux-hesaplayici__panel-title {
	margin: 0 0 1.25rem;
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--fd-text);
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--fd-bg);
}

.foradux-hesaplayici__grid {
	display: grid;
	gap: 1rem;
}

.foradux-hesaplayici__grid--2 {
	grid-template-columns: repeat(2, 1fr);
}

.foradux-hesaplayici__field {
	margin-bottom: 0.25rem;
}

.foradux-hesaplayici__field label {
	display: block;
	margin-bottom: 0.4rem;
	font-weight: 600;
	font-size: 0.875rem;
	color: var(--fd-text);
}

.foradux-hesaplayici__field .required {
	color: var(--fd-error);
}

.foradux-hesaplayici__field input,
.foradux-hesaplayici__field select {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1.5px solid var(--fd-border);
	border-radius: 8px;
	font-size: 0.95rem;
	background: #fff;
	color: var(--fd-text);
	transition: border-color 0.15s, box-shadow 0.15s;
	appearance: auto;
}

.foradux-hesaplayici__field input:focus,
.foradux-hesaplayici__field select:focus {
	outline: none;
	border-color: var(--fd-accent);
	box-shadow: 0 0 0 3px rgba(53, 132, 228, 0.15);
}

.foradux-hesaplayici__field.is-invalid input,
.foradux-hesaplayici__field.is-invalid select {
	border-color: var(--fd-error);
}

.foradux-hesaplayici__field-error {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.8rem;
	color: var(--fd-error);
}

/* Grouped product options */
.foradux-hesaplayici__option-groups {
	display: grid;
	gap: 1rem;
	margin-top: 0.5rem;
}

.foradux-hesaplayici__option-group {
	background: var(--fd-bg);
	border: 1px solid var(--fd-border);
	border-radius: 10px;
	padding: 1rem 1.1rem;
}

.foradux-hesaplayici__option-group-title {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--fd-primary);
	text-transform: none;
	letter-spacing: 0;
}

.foradux-hesaplayici__option-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.5rem;
}

.foradux-hesaplayici__option-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2rem;
	padding: 0.65rem 0.75rem;
	border: 1.5px solid var(--fd-border);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	font-size: 0.85rem;
	font-weight: 500;
}

.foradux-hesaplayici__option-card input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.foradux-hesaplayici__option-card:has(input:checked) {
	border-color: var(--fd-primary);
	background: rgba(26, 95, 180, 0.06);
}

.foradux-hesaplayici__option-card-name {
	line-height: 1.3;
}

.foradux-hesaplayici__impact {
	font-size: 0.78rem;
	color: var(--fd-muted);
	font-weight: 400;
}

.foradux-hesaplayici__option-select-wrap select {
	width: 100%;
}

.foradux-hesaplayici__checkbox-list {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.foradux-hesaplayici__checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 400;
	font-size: 0.9rem;
	cursor: pointer;
}

.foradux-hesaplayici__hint {
	color: var(--fd-muted);
	font-size: 0.85rem;
	margin: 0.75rem 0 0;
}

/* Footer: price bar + navigation */
.foradux-hesaplayici__footer {
	border-top: 1px solid var(--fd-border);
	background: var(--fd-bg);
	padding: 1.25rem 1.75rem 1.5rem;
}

.foradux-hesaplayici__price-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	margin-bottom: 1.1rem;
	padding: 1rem 1.1rem;
	background: #fff;
	border: 1px solid var(--fd-border);
	border-radius: 10px;
}

.foradux-hesaplayici__price-label {
	display: block;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--fd-muted);
	font-weight: 600;
	margin-bottom: 0.15rem;
}

.foradux-hesaplayici__price-value {
	font-size: clamp(1.4rem, 4vw, 1.85rem);
	font-weight: 800;
	color: var(--fd-primary);
	line-height: 1;
}

.foradux-hesaplayici__price-value.is-loading {
	opacity: 0.5;
}

.foradux-hesaplayici__price-breakdown {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	font-size: 0.8rem;
	color: var(--fd-muted);
}

.foradux-hesaplayici__price-breakdown span {
	white-space: nowrap;
}

.foradux-hesaplayici__nav {
	display: flex;
	justify-content: flex-end;
	gap: 0.75rem;
}

.foradux-hesaplayici__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7rem 1.5rem;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: background 0.15s, transform 0.1s;
	min-width: 120px;
}

.foradux-hesaplayici__btn:active {
	transform: scale(0.98);
}

.foradux-hesaplayici__btn--primary {
	background: var(--fd-primary);
	color: #fff;
}

.foradux-hesaplayici__btn--primary:hover {
	background: var(--fd-primary-dark);
}

.foradux-hesaplayici__btn--ghost {
	background: transparent;
	color: var(--fd-muted);
	border: 1.5px solid var(--fd-border);
}

.foradux-hesaplayici__btn--ghost:hover {
	background: #fff;
	color: var(--fd-text);
}

/* Notices */
.foradux-hesaplayici__notice {
	padding: 1rem 1.25rem;
	border-radius: 10px;
	margin-bottom: 1.25rem;
	font-size: 0.925rem;
}

.foradux-hesaplayici__notice--error {
	background: #fce8e8;
	border: 1px solid #f5c2c7;
	color: #8a1f1f;
}

.foradux-hesaplayici__notice--success {
	background: #e8f5ee;
	border: 1px solid #a8dab5;
	color: #1a5c36;
}

.foradux-hesaplayici__success-title {
	margin: 0 0 0.25rem;
	font-weight: 600;
}

.foradux-hesaplayici__result-price {
	font-size: 1.75rem;
	font-weight: 800;
	margin: 0.25rem 0 0.75rem;
	color: var(--fd-primary);
}

.foradux-hesaplayici__result-details {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	font-size: 0.875rem;
	color: var(--fd-muted);
}

/* Responsive */
@media (max-width: 640px) {
	.foradux-hesaplayici__grid--2 {
		grid-template-columns: 1fr;
	}

	.foradux-hesaplayici__step-label {
		font-size: 0.62rem;
	}

	.foradux-hesaplayici__step-num {
		width: 30px;
		height: 30px;
		font-size: 0.8rem;
	}

	.foradux-hesaplayici__step-item:not(:last-child)::after {
		top: 15px;
		left: calc(50% + 18px);
		width: calc(100% - 36px);
	}

	.foradux-hesaplayici__panel {
		padding: 1.25rem 1.1rem 0.25rem;
	}

	.foradux-hesaplayici__footer {
		padding: 1rem 1.1rem 1.25rem;
	}

	.foradux-hesaplayici__nav {
		flex-direction: column-reverse;
	}

	.foradux-hesaplayici__btn {
		width: 100%;
	}

	.foradux-hesaplayici__price-bar {
		flex-direction: column;
		align-items: flex-start;
	}
}

.foradux-shape-picker {
	margin-top: 0.75rem;
}

.foradux-hesaplayici__shape-error {
	margin: 0.75rem 0 0;
	padding: 0.65rem 0.85rem;
	border-radius: 8px;
	background: #fef2f2;
	color: #b91c1c;
	font-size: 0.875rem;
	font-weight: 600;
}

/* Balkon tipi — alt alta, her seçenek kendi kutusunda */
.foradux-hesaplayici__shape-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.foradux-hesaplayici__shape-card {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.85rem;
	width: 100%;
	padding: 1rem 1.1rem;
	border: 2px solid #c5d3e3;
	border-radius: 12px;
	cursor: pointer;
	background: #ffffff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	box-sizing: border-box;
}

.foradux-hesaplayici__shape-card:hover {
	border-color: #3584e4;
	background: #f8fbff;
}

.foradux-hesaplayici__shape-card.is-selected,
.foradux-hesaplayici__shape-card:has(input:checked) {
	border-color: #1a5fb4;
	background: #eef4fc;
	box-shadow: inset 0 0 0 1px #1a5fb4;
}

.foradux-shape-radio {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	border: 2px solid #94a3b8;
	border-radius: 50%;
	background: #fff;
	position: relative;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.foradux-hesaplayici__shape-card.is-selected .foradux-shape-radio,
.foradux-hesaplayici__shape-card:has(input:checked) .foradux-shape-radio {
	border-color: #1a5fb4;
	background: #1a5fb4;
}

.foradux-hesaplayici__shape-card.is-selected .foradux-shape-radio::after,
.foradux-hesaplayici__shape-card:has(input:checked) .foradux-shape-radio::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	margin: -4px 0 0 -4px;
	border-radius: 50%;
	background: #fff;
}

.foradux-hesaplayici__shape-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.foradux-shape-body {
	flex: 1;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.85rem;
	min-width: 0;
}

.foradux-shape-text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
	text-align: left;
}

.foradux-hesaplayici__shape-name {
	font-weight: 700;
	font-size: 1rem;
	color: #0f172a;
	line-height: 1.3;
}

.foradux-hesaplayici__shape-desc {
	font-size: 0.82rem;
	color: #64748b;
	line-height: 1.35;
}

.foradux-hesaplayici__shape-meta {
	flex-shrink: 0;
	font-size: 0.72rem;
	font-weight: 600;
	color: #1a5fb4;
	background: #e8f0fa;
	padding: 0.3rem 0.6rem;
	border-radius: 6px;
	white-space: nowrap;
}

.foradux-hesaplayici__shape-icon {
	flex-shrink: 0;
	display: block;
	width: 56px;
	height: 40px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.foradux-shape-icon--straight {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 48'%3E%3Crect x='8' y='10' width='56' height='28' rx='2' fill='none' stroke='%232563eb' stroke-width='3'/%3E%3C/svg%3E");
}

.foradux-shape-icon--l {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 48'%3E%3Cpath d='M8 10 H44 V38 H68 V10' fill='none' stroke='%232563eb' stroke-width='3'/%3E%3C/svg%3E");
}

.foradux-shape-icon--u {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 48'%3E%3Cpath d='M8 10 V38 H64 V10 H48 V24 H24 V10 Z' fill='none' stroke='%232563eb' stroke-width='3'/%3E%3C/svg%3E");
}

.foradux-shape-icon--oval {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 48'%3E%3Cellipse cx='36' cy='24' rx='28' ry='16' fill='none' stroke='%232563eb' stroke-width='3'/%3E%3C/svg%3E");
}

.foradux-hesaplayici__sub-title {
	margin: 1rem 0 0.5rem;
	font-size: 0.95rem;
	color: #135e96;
}

.foradux-hesaplayici__summary-card {
	background: #f8fafc;
	border: 1px solid #dbeafe;
	border-radius: 12px;
	padding: 1rem 1.1rem;
	margin-bottom: 1rem;
}

.foradux-summary-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.85rem;
}

@media (min-width: 640px) {
	.foradux-summary-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.foradux-summary-label {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
	margin-bottom: 0.25rem;
}

.foradux-summary-price {
	font-size: 1.35rem;
	font-weight: 800;
	color: #135e96;
	margin: 0;
}

.foradux-summary-list {
	margin: 0.25rem 0 0;
	padding-left: 1rem;
	font-size: 0.9rem;
}

.foradux-summary-muted {
	font-size: 0.85rem;
	color: #64748b;
	margin: 0.25rem 0 0;
}

.foradux-summary-quote-id {
	margin-top: 0.75rem;
	font-size: 0.9rem;
	color: #475569;
}

.foradux-hesaplayici__segment-block {
	padding: 0.75rem;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	background: #f6f7f7;
}

.foradux-hesaplayici__segment-title {
	margin: 0 0 0.5rem;
	font-size: 0.95rem;
	color: #135e96;
}

.foradux-hesaplayici__shape-list.is-invalid {
	border-radius: 12px;
	outline: 2px solid #d63638;
	outline-offset: 4px;
	padding: 4px;
}

@media (max-width: 639px) {
	.foradux-hesaplayici__steps {
		gap: 0.25rem;
	}

	.foradux-hesaplayici__step-label {
		font-size: 0.62rem;
		max-width: 4.5rem;
	}

	.foradux-shape-body {
		flex-wrap: wrap;
	}

	.foradux-hesaplayici__shape-meta {
		width: 100%;
		text-align: left;
	}
}
