/* Fiyat Teklif Formu – ön yüz */
:root { --ftf-accent: #2563eb; }

.ftf-wrap {
	--ftf-text: #0f172a;
	--ftf-muted: #64748b;
	--ftf-border: #e2e8f0;
	--ftf-field: #f8fafc;
	--ftf-danger: #ef4444;
	--ftf-radius: 12px;
	--ftf-ring: color-mix(in srgb, var(--ftf-accent) 18%, transparent);
	--ftf-tint: color-mix(in srgb, var(--ftf-accent) 7%, #fff);
	color: var(--ftf-text);
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
}
.ftf-wrap *, .ftf-wrap *::before, .ftf-wrap *::after { box-sizing: border-box; }
.ftf-wrap [hidden], .ftf-modal[hidden] { display: none !important; }

/* Sabit (inline) form kartı */
.ftf-inline {
	margin: 22px 0;
	padding: 28px;
	background: #fff;
	border: 1px solid var(--ftf-border);
	border-radius: 18px;
	box-shadow: 0 12px 32px -16px rgba(15, 23, 42, .18);
}
@media (max-width: 640px) { .ftf-inline { padding: 20px; } }

.ftf-head { margin-bottom: 22px; }
.ftf-wrap .ftf-title { margin: 0 0 6px; padding: 0; font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--ftf-text); letter-spacing: -.01em; }
.ftf-wrap .ftf-intro { margin: 0; color: var(--ftf-muted); font-size: 15px; }

/* Izgara */
.ftf-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 16px; }
.ftf-w-full { grid-column: span 6; }
.ftf-w-half { grid-column: span 3; }
.ftf-w-third { grid-column: span 2; }
@media (max-width: 640px) { .ftf-w-half, .ftf-w-third { grid-column: span 6; } }

.ftf-field { margin: 0; min-width: 0; }
.ftf-wrap .ftf-label { display: block; margin: 0 0 7px; font-size: 14px; font-weight: 600; color: var(--ftf-text); line-height: 1.3; }
.ftf-req { color: var(--ftf-danger); }

/* Girdi alanları */
.ftf-wrap .ftf-input {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	min-height: 48px;
	margin: 0;
	padding: 12px 14px;
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: var(--ftf-text);
	background: var(--ftf-field);
	border: 1.5px solid var(--ftf-border);
	border-radius: var(--ftf-radius);
	box-shadow: none;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.ftf-wrap textarea.ftf-input { min-height: 116px; resize: vertical; }
.ftf-wrap .ftf-input::placeholder { color: #94a3b8; opacity: 1; }
.ftf-wrap .ftf-input:hover { border-color: #cbd5e1; }
.ftf-wrap .ftf-input:focus { background: #fff; border-color: var(--ftf-accent); box-shadow: 0 0 0 4px var(--ftf-ring); }
.ftf-wrap select.ftf-input {
	padding-right: 42px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 18px;
}
.ftf-wrap input[type=number].ftf-input { -moz-appearance: textfield; }
.ftf-wrap input[type=date].ftf-input { min-height: 48px; }

.ftf-help { margin: 7px 0 0; font-size: 13px; color: var(--ftf-muted); }
.ftf-error { display: none; margin: 7px 0 0; font-size: 13px; font-weight: 500; color: var(--ftf-danger); }
.ftf-has-error .ftf-error { display: block; }
.ftf-has-error .ftf-input, .ftf-has-error .ftf-drop, .ftf-has-error .ftf-choice { border-color: var(--ftf-danger) !important; }
.ftf-has-error .ftf-input:focus { box-shadow: 0 0 0 4px rgba(239, 68, 68, .15); }

/* Seçim kutuları */
.ftf-choices { display: flex; flex-direction: column; gap: 8px; }
.ftf-wrap .ftf-choice {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 11px;
	margin: 0;
	padding: 12px 14px;
	font-weight: 400;
	font-size: 15px;
	line-height: 1.4;
	cursor: pointer;
	background: var(--ftf-field);
	border: 1.5px solid var(--ftf-border);
	border-radius: var(--ftf-radius);
	transition: border-color .15s, background-color .15s;
}
.ftf-wrap .ftf-choice:hover { border-color: #cbd5e1; }
.ftf-choice input { position: absolute !important; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.ftf-choice-ui {
	position: relative;
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	background: #fff;
	border: 2px solid #cbd5e1;
	border-radius: 6px;
	transition: all .15s;
}
.ftf-type-radio .ftf-choice-ui { border-radius: 50%; }
.ftf-choice input:checked + .ftf-choice-ui { background: var(--ftf-accent); border-color: var(--ftf-accent); }
.ftf-choice input:checked + .ftf-choice-ui::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.ftf-type-radio .ftf-choice input:checked + .ftf-choice-ui::after { left: 4px; top: 4px; width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.ftf-choice input:focus-visible + .ftf-choice-ui { box-shadow: 0 0 0 4px var(--ftf-ring); }
.ftf-wrap .ftf-choice:has(input:checked) { border-color: var(--ftf-accent); background: var(--ftf-tint); }
.ftf-wrap .ftf-accept { padding: 0; border: 0 !important; background: transparent !important; font-size: 14px; color: #334155; }
.ftf-accept a { color: var(--ftf-accent); text-decoration: underline; }

/* Bölüm başlığı */
.ftf-section { padding-top: 8px; }
.ftf-fields > .ftf-section:not(:first-child) { border-top: 1px solid var(--ftf-border); padding-top: 18px; }
.ftf-wrap .ftf-section h4 { margin: 0 0 3px; font-size: 16px; font-weight: 700; color: var(--ftf-text); }
.ftf-wrap .ftf-section p { margin: 0; font-size: 14px; color: var(--ftf-muted); }

/* Dosya yükleme */
.ftf-wrap .ftf-drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 26px 18px;
	text-align: center;
	font-weight: 400;
	cursor: pointer;
	background: var(--ftf-field);
	border: 2px dashed #cbd5e1;
	border-radius: 14px;
	transition: border-color .15s, background-color .15s;
}
.ftf-wrap .ftf-drop:hover, .ftf-wrap .ftf-drop.is-drag { border-color: var(--ftf-accent); background: var(--ftf-tint); }
.ftf-drop:focus-within { border-color: var(--ftf-accent); box-shadow: 0 0 0 4px var(--ftf-ring); }
.ftf-drop.is-full { opacity: .5; pointer-events: none; }
.ftf-drop-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 4px; border-radius: 12px; color: var(--ftf-accent); background: color-mix(in srgb, var(--ftf-accent) 12%, #fff); }
.ftf-drop strong { font-size: 14px; font-weight: 600; color: var(--ftf-text); }
.ftf-drop small { font-size: 12px; color: var(--ftf-muted); }
.ftf-file-input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.ftf-wrap .ftf-file-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ftf-wrap .ftf-file-item { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 10px; font-size: 14px; background: #fff; border: 1px solid var(--ftf-border); border-radius: 10px; }
.ftf-file-ext { flex: 0 0 auto; min-width: 38px; padding: 4px 6px; font-size: 10px; font-weight: 700; text-align: center; color: var(--ftf-accent); background: var(--ftf-tint); border-radius: 6px; }
.ftf-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftf-file-size { font-size: 12px; color: var(--ftf-muted); }
.ftf-wrap .ftf-file-remove { flex: 0 0 auto; width: 28px; height: 28px; min-height: 0; padding: 0; margin: 0; font-size: 20px; line-height: 1; color: #64748b; background: #f1f5f9; border: 0; border-radius: 50%; cursor: pointer; }
.ftf-wrap .ftf-file-remove:hover { color: #fff; background: var(--ftf-danger); }

/* Gönder butonu */
.ftf-wrap .ftf-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 52px;
	margin: 24px 0 0;
	padding: 14px 22px;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: #fff;
	background: var(--ftf-accent);
	border: 0;
	border-radius: var(--ftf-radius);
	box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--ftf-accent) 75%, transparent);
	cursor: pointer;
	transition: transform .15s, filter .15s, box-shadow .15s;
}
.ftf-wrap .ftf-submit:hover { filter: brightness(1.07); transform: translateY(-1px); color: #fff; }
.ftf-wrap .ftf-submit:active { transform: translateY(0); }
.ftf-wrap .ftf-submit:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ftf-ring); }
.ftf-wrap .ftf-submit:disabled { opacity: .8; cursor: wait; transform: none; }
.ftf-spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: ftf-spin .7s linear infinite; }
.is-loading .ftf-spinner { display: inline-block; }
@keyframes ftf-spin { to { transform: rotate(360deg); } }

.ftf-alert { margin-top: 16px; padding: 12px 14px; font-size: 14px; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; }

/* Başarı */
.ftf-success { padding: 32px 8px 12px; text-align: center; animation: ftf-pop .35s ease; }
.ftf-success-icon { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 16px; color: #16a34a; background: #dcfce7; border-radius: 50%; }
.ftf-wrap .ftf-success-msg { margin: 0; font-size: 16px; white-space: pre-line; color: var(--ftf-text); }
@keyframes ftf-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

.ftf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Ürün sayfası butonu */
.ftf-quote-box { margin: 18px 0; }
.ftf-open-btn.button,
.ftf-open-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 14px 28px !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	color: #fff !important;
	background: var(--ftf-accent) !important;
	border: 0 !important;
	border-radius: 12px !important;
	box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--ftf-accent) 75%, transparent);
	cursor: pointer;
	text-transform: none !important;
	transition: transform .15s, filter .15s;
}
.ftf-open-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.ftf-open-btn svg { flex: 0 0 auto; }
.ftf-price-text { font-weight: 600; color: var(--ftf-accent); }

/* Modal */
html.ftf-lock, html.ftf-lock body { overflow: hidden; }
.ftf-modal { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.ftf-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s ease; }
.ftf-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 680px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #fff;
	border-radius: 22px;
	box-shadow: 0 30px 80px -20px rgba(15, 23, 42, .5);
	opacity: 0;
	transform: translateY(18px) scale(.98);
	transition: opacity .25s ease, transform .25s ease;
}
.ftf-modal.is-open .ftf-modal-backdrop { opacity: 1; }
.ftf-modal.is-open .ftf-modal-dialog { opacity: 1; transform: none; }
.ftf-modal-head { padding: 28px 30px 0; padding-right: 64px; }
.ftf-modal-body { padding: 22px 30px 30px; }
.ftf-wrap .ftf-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	min-height: 0;
	padding: 0;
	margin: 0;
	color: #334155;
	background: #f1f5f9;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .15s, transform .15s;
}
.ftf-wrap .ftf-modal-close:hover { background: #e2e8f0; transform: rotate(90deg); }
.ftf-product-chip { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px; background: var(--ftf-field); border: 1px solid var(--ftf-border); border-radius: 14px; }
.ftf-wrap .ftf-product-chip img { flex: 0 0 auto; width: 54px; height: 54px; margin: 0; object-fit: cover; border-radius: 10px; }
.ftf-product-chip strong { display: block; font-size: 15px; line-height: 1.3; }
.ftf-product-chip small { display: block; margin-top: 2px; font-size: 12px; color: var(--ftf-muted); }

@media (max-width: 640px) {
	.ftf-modal { align-items: flex-end; padding: 0; }
	.ftf-modal-dialog { max-height: 94vh; max-height: 94dvh; border-radius: 22px 22px 0 0; transform: translateY(40px); }
	.ftf-modal-head { padding: 22px 20px 0; padding-right: 60px; }
	.ftf-modal-body { padding: 18px 20px 26px; }
}
@media (prefers-reduced-motion: reduce) {
	.ftf-modal-dialog, .ftf-modal-backdrop, .ftf-success { transition: none; animation: none; }
}
