/**
 * Elementor Form Extra - Frontend Styles
 * 
 * Tüm modüllerin frontend CSS stilleri burada tanımlanır.
 */

/* ==========================================================================
   1. KOLON / LAYOUT
   ========================================================================== */

/* Özel genişlikli alanlar */
.efe-custom-width {
	flex-grow: 0 !important;
	flex-shrink: 0 !important;
}

/* Yeni satır başlat - önceki satırı kapat ve yeni satır aç */
.efe-new-row {
	clear: both;
	flex-basis: 100% !important;
	width: 100% !important;
	max-width: 100% !important;
}

/* Özel layout'lu formlar için flex-wrap desteği */
.efe-has-custom-layout .elementor-form-fields-wrapper,
.efe-flex-wrap .elementor-form-fields-wrapper {
	flex-wrap: wrap !important;
}

/* Inline label (label ve input yan yana) */
.efe-inline-label {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
}

.efe-inline-label > label {
	flex-shrink: 0;
	margin-bottom: 0 !important;
	padding-right: 12px;
}

.efe-inline-label > .elementor-field,
.efe-inline-label > .elementor-select-wrapper,
.efe-inline-label > textarea,
.efe-inline-label > .efe-field-icon-wrapper {
	flex: 1;
	min-width: 0;
}

/* Responsive: Mobil'de tam genişlik */
@media (max-width: 767px) {
	.efe-custom-width {
		width: 100% !important;
		max-width: 100% !important;
	}

	.efe-inline-label {
		flex-direction: column !important;
		align-items: flex-start !important;
	}

	.efe-inline-label > label {
		padding-right: 0;
		margin-bottom: 5px !important;
	}
}


/* ==========================================================================
   2. RADIO / CHECKBOX YÖN KONTROLÜ
   ========================================================================== */

/* Tüm efe-direction alt gruplarında genel boşluk kontrolü */
.elementor-form .elementor-field-subgroup {
	gap: var(--efe-options-gap, 0px);
}

/* Yatay düzen */
.elementor-form .efe-direction-horizontal .elementor-field-subgroup {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	align-items: center !important;
}

/* Dikey düzen */
.elementor-form .efe-direction-vertical .elementor-field-subgroup {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
}

/* Sol Taraf düzeni (Dikey ve Sola Yaslı) */
.elementor-form .efe-direction-left .elementor-field-subgroup {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
}

/* Sağ Taraf düzeni (Metin solda, İşaret en sağda) */
.elementor-form .efe-direction-right .elementor-field-subgroup {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important; /* Satırları tam genişlik yap */
}

.elementor-form .efe-direction-right .elementor-field-subgroup .elementor-field-option {
	display: flex !important;
	flex-direction: row-reverse !important;
	justify-content: space-between !important;
	width: 100% !important;
}

/* Grid düzenleri - elementor-form class'ı ile specificity (özgüllük) artırıldı */
.elementor-form .efe-direction-grid-2 .elementor-field-subgroup {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr) !important;
	width: 100% !important;
}

.elementor-form .efe-direction-grid-3 .elementor-field-subgroup {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	width: 100% !important;
}

.elementor-form .efe-direction-grid-4 .elementor-field-subgroup {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	width: 100% !important;
}

/* Radio/Checkbox etiket stili - block displayi ezmek için flex kullanıyoruz */
.elementor-form .elementor-field-subgroup label {
	cursor: pointer;
	margin-bottom: 0 !important; /* Tema marginlerini sıfırla */
}

/* Inline list seçeneği kapalıyken (Elementor default) block olan elementleri eziyoruz */
.elementor-form .elementor-field-subgroup .elementor-field-option {
	display: flex !important;
	align-items: flex-start; /* Uzun metinlerde kutucuk yukarı hizalansın */
	gap: 6px; /* Varsayılan boşluk */
	margin: 0 !important;
}

/* Kutu hizalamasını iyileştirmek için ufak bir margin-top */
.elementor-form .elementor-field-subgroup .elementor-field-option input[type="radio"],
.elementor-form .elementor-field-subgroup .elementor-field-option input[type="checkbox"] {
	margin-top: 5px !important;
	margin-right: 0 !important;
	margin-left: 0 !important;
}

/* Responsive: Mobil'de tek sütun */
@media (max-width: 767px) {
	.elementor-form .efe-direction-grid-3 .elementor-field-subgroup,
	.elementor-form .efe-direction-grid-4 .elementor-field-subgroup {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 480px) {
	.elementor-form .efe-direction-grid-2 .elementor-field-subgroup,
	.elementor-form .efe-direction-grid-3 .elementor-field-subgroup,
	.elementor-form .efe-direction-grid-4 .elementor-field-subgroup {
		grid-template-columns: 1fr !important;
	}

	.elementor-form .efe-direction-horizontal .elementor-field-subgroup {
		flex-direction: column !important;
		align-items: flex-start !important;
	}
}


/* ==========================================================================
   3. CONDITIONAL LOGIC
   ========================================================================== */

/* Gizli alanlar */
.efe-field-hidden {
	display: none !important;
}

/* Gösterim sınıfı */
.efe-field-showing {
	opacity: 1;
}


/* ==========================================================================
   4. MULTI-STEP FORM
   ========================================================================== */

/* Progress bar - Adım numaraları */
.efe-step-indicator {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: 30px;
	gap: 0;
	position: relative;
}

.efe-step-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	z-index: 2;
	flex: 1;
	max-width: 160px;
}

.efe-step-number {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background-color: #e2e8f0;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	transition: all 0.3s ease;
	position: relative;
	z-index: 2;
}

.efe-step-title {
	font-size: 12px;
	color: #94a3b8;
	margin-top: 6px;
	text-align: center;
	transition: color 0.3s ease;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.efe-step-item.active .efe-step-number {
	background-color: #6366f1;
	box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.efe-step-item.active .efe-step-title {
	color: #6366f1;
	font-weight: 600;
}

.efe-step-item.completed .efe-step-number {
	background-color: #10b981;
}

.efe-step-item.completed .efe-step-title {
	color: #10b981;
}

/* Adımlar arası çizgi */
.efe-step-connector {
	position: absolute;
	top: 19px;
	left: 0;
	right: 0;
	height: 2px;
	background-color: #e2e8f0;
	z-index: 1;
}

.efe-step-connector-fill {
	height: 100%;
	background-color: #10b981;
	transition: width 0.4s ease;
	width: 0%;
}

/* Progress bar - İlerleme çubuğu */
.efe-progress-bar {
	width: 100%;
	height: 6px;
	background-color: #e2e8f0;
	border-radius: 3px;
	margin-bottom: 24px;
	overflow: hidden;
}

.efe-progress-fill {
	height: 100%;
	background-color: #6366f1;
	border-radius: 3px;
	transition: width 0.4s ease;
	width: 0%;
}

.efe-progress-text {
	text-align: center;
	font-size: 13px;
	color: #64748b;
	margin-bottom: 16px;
}

/* Step paneller */
.efe-step-panel {
	display: none;
}

.efe-step-panel.efe-step-active {
	display: contents;
}

/* Navigasyon butonları */
.efe-step-navigation {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e2e8f0;
	width: 100%;
	flex-basis: 100%;
}

.efe-step-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 24px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.efe-step-btn-prev {
	background-color: #f1f5f9;
	color: #475569;
}

.efe-step-btn-prev:hover {
	background-color: #e2e8f0;
}

.efe-step-btn-next {
	background-color: #6366f1;
	color: #fff;
}

.efe-step-btn-next:hover {
	background-color: #4f46e5;
}

.efe-step-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Multi-step form'da submit butonu başlangıçta gizli */
.efe-multistep-form .elementor-field-type-submit {
	transition: opacity 0.3s ease;
}

.efe-multistep-form.efe-step-not-last .elementor-field-type-submit {
	display: none !important;
}


/* ==========================================================================
   5. REPEATER FIELD
   ========================================================================== */

.efe-repeater-wrapper {
	width: 100%;
}

.efe-repeater-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.efe-repeater-row:last-of-type {
	margin-bottom: 12px;
}

.efe-repeater-row input.efe-repeater-input {
	flex: 1;
	min-width: 0;
}

.efe-repeater-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	min-width: 32px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	background-color: #fff;
	color: #ef4444;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1;
	padding: 0;
}

.efe-repeater-remove:hover {
	background-color: #fef2f2;
	border-color: #ef4444;
}

.efe-repeater-add {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 14px;
	background-color: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 6px;
	color: #6366f1;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.efe-repeater-add:hover {
	background-color: #eef2ff;
	border-color: #6366f1;
}

.efe-repeater-add.efe-hidden {
	display: none;
}


/* ==========================================================================
   6. FIELD ICON
   ========================================================================== */

.efe-field-icon-wrapper {
	display: flex;
	align-items: center;
	position: relative;
	width: 100%;
}

.efe-field-icon {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 100%;
	color: #94a3b8;
	font-size: 16px;
	pointer-events: none;
	z-index: 2;
}

.efe-icon-pos-left .efe-field-icon {
	left: 0;
}

.efe-icon-pos-left input {
	padding-left: 40px !important;
}

.efe-icon-pos-right .efe-field-icon {
	right: 0;
}

.efe-icon-pos-right input {
	padding-right: 40px !important;
}

.efe-field-icon-wrapper input {
	width: 100%;
}

/* Emoji ikon boyutu */
.efe-field-icon-emoji {
	font-size: 18px;
	font-style: normal;
}
