/**
 * 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;
}

/* ==========================================================================
   7. RADIO / CHECKBOX ICON BOX
   ========================================================================== */
.efe-rc-icon-box .elementor-field-subgroup .elementor-field-option {
	display: block !important;
	flex: 1; /* Allow it to scale in grid or horizontal layouts */
	min-width: 120px; /* Minimum width for icon boxes */
}
.efe-rc-icon-box input[type="radio"],
.efe-rc-icon-box input[type="checkbox"] {
	display: none !important;
}
.efe-rc-icon-box label {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 20px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background-color: #fff;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 100%;
	gap: 10px;
}
.efe-rc-icon-pos-left label {
	flex-direction: row;
	text-align: left;
}
.efe-rc-icon-pos-right label {
	flex-direction: row-reverse;
	text-align: right;
}
.efe-rc-icon-box label .efe-rc-icon {
	font-size: 24px;
	color: #64748b;
	transition: color 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}
.efe-rc-icon-box label .efe-rc-text {
	font-size: 15px;
	font-weight: 500;
	color: #334155;
	transition: color 0.3s ease;
}
.efe-rc-icon-box input:checked + label,
.efe-rc-icon-box label:has(input:checked) {
	border-color: #10b981;
	background-color: #ecfdf5;
}
.efe-rc-icon-box input:checked + label .efe-rc-icon,
.efe-rc-icon-box input:checked + label .efe-rc-text,
.efe-rc-icon-box label:has(input:checked) .efe-rc-icon,
.efe-rc-icon-box label:has(input:checked) .efe-rc-text {
	color: #10b981;
}


/* ==========================================================================
   7.1. RADIO / CHECKBOX BUTTON BOX (İkonsuz)
   ========================================================================== */
.efe-rc-button-box label {
	flex-direction: row !important;
	padding: 10px 20px;
	border-radius: 20px; /* Hap (Pill) görünümü */
	min-width: auto !important;
	gap: 0 !important;
}
.efe-rc-button-box label .efe-rc-icon {
	display: none !important;
}

/* ==========================================================================
   8. ADVANCED FILE UPLOAD
   ========================================================================== */
.efe-advanced-upload-wrapper {
	position: relative;
	width: 100%;
	min-height: 120px;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	background-color: #f8fafc;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
}

.efe-advanced-upload-wrapper:hover,
.efe-advanced-upload-wrapper.efe-dragover {
	border-color: #10b981;
	background-color: #ecfdf5;
}

.efe-advanced-upload-wrapper input[type="file"] {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.efe-advanced-upload-content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 24px;
	pointer-events: none;
}

.efe-upload-icon {
	font-size: 24px;
	color: #64748b;
	margin-bottom: 12px;
	transition: color 0.3s ease;
}

.efe-advanced-upload-wrapper:hover .efe-upload-icon,
.efe-advanced-upload-wrapper.efe-dragover .efe-upload-icon {
	color: #10b981;
}

.efe-upload-title {
	font-size: 14px;
	font-weight: 500;
	color: #334155;
	margin-bottom: 4px;
}

.efe-upload-subtitle {
	font-size: 12px;
	color: #94a3b8;
}

/* ==========================================================================
   9. REPEATER GROUP
   ========================================================================== */
.efe-rg-wrapper {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	margin-bottom: 15px;
	scroll-behavior: smooth;
}

/* Scrollbar (sade tasarım) */
.efe-rg-wrapper::-webkit-scrollbar {
	width: 5px;
}

.efe-rg-wrapper::-webkit-scrollbar-track {
	background: transparent;
	border-radius: 3px;
}

.efe-rg-wrapper::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 3px;
}

.efe-rg-wrapper::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

/* Firefox scrollbar */
.efe-rg-wrapper {
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
}

.efe-rg-item {
	position: relative;
	background-color: #f7f6f1; /* Tasarımdaki hafif sarımtırak arka plan */
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 24px;
}

.efe-rg-badge {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-bottom: 20px;
}

.efe-rg-badge span {
	background-color: #d1fae5; /* Tasarımdaki açık yeşil rozet arka planı */
	color: #065f46;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 12px;
}

.efe-rg-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 15px; /* Form elemanları arası boşluk */
}

/* Elementor alanlarının kutu içinde düzgün hizalanması */
.efe-rg-fields .elementor-field-group {
	margin-bottom: 0 !important;
}

.efe-rg-remove-btn {
	background: none;
	border: none;
	color: #ef4444;
	font-size: 16px;
	cursor: pointer;
	padding: 4px;
	transition: color 0.3s ease;
}

.efe-rg-remove-btn:hover {
	color: #b91c1c;
}

.efe-rg-add-btn {
	display: block;
	width: 100%;
	padding: 12px;
	background-color: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	color: #334155;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s ease;
}

.efe-rg-add-btn:hover {
	background-color: #f8fafc;
	border-color: #94a3b8;
}

/* ==========================================================================
   9. SECTION HEADING (İkonlu Başlık)
   ========================================================================== */
/* Elementor'un varsayılan düz yazılı başlığını (Label) sadece bu alan tipi için gizle */
.elementor-field-type-efe_heading > .elementor-field-label,
.elementor-field-type-efe_heading .elementor-field-label {
	display: none !important;
}

/* ==========================================================================
   10. TEXTAREA CHARACTER COUNTER (Karakter Sayacı)
   ========================================================================== */
.efe-textarea-counter {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	margin-top: 4px;
	font-size: 12px;
	color: #999;
	font-family: inherit;
	gap: 2px;
}

.efe-textarea-counter.efe-counter-warning {
	color: #e67e22;
}

.efe-textarea-counter.efe-counter-limit {
	color: #e74c3c;
	font-weight: 600;
}

/* ==========================================================================
   11. MULTI SELECT DROPDOWN (İkonlu Çoklu Seçim)
   ========================================================================== */

/* Container */
.efe-msd-container {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	font-family: inherit;
	background: #fff;
	transition: border-color 0.2s ease;
}

.efe-msd-container:hover {
	border-color: #b0b5ba;
}

/* Header (Tıklanabilir alan) */
.efe-msd-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	box-sizing: border-box;
	cursor: pointer;
	user-select: none;
	min-height: 42px;
}

.efe-msd-header-text {
	font-size: 14px;
	color: #6b7280;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.efe-msd-has-selection .efe-msd-header-text {
	color: #1f2937;
	font-weight: 500;
}

.efe-msd-arrow {
	font-size: 12px;
	color: #9ca3af;
	transition: transform 0.25s ease;
	margin-left: 8px;
}

.efe-msd-open .efe-msd-arrow {
	transform: rotate(180deg);
}

/* Dropdown Panel */
.efe-msd-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 5px);
	left: 0;
	width: 100%;
	z-index: 3;
	background: #fff;
	max-height: 280px;
	overflow-y: auto;
	box-sizing: border-box;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.efe-msd-open .efe-msd-dropdown {
	display: block;
	animation: efeMsdSlideDown 0.2s ease;
}

@keyframes efeMsdSlideDown {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Seçenek Satırı */
.efe-msd-item {
	display: flex;
	align-items: center;
	padding: 10px 14px;
	cursor: pointer;
	transition: background-color 0.15s ease;
	gap: 10px;
	border-bottom: 1px solid #f3f4f6;
}

.efe-msd-item:last-child {
	border-bottom: none;
}

.efe-msd-item:hover {
	background-color: #f9fafb;
}

/* Seçili satır */
.efe-msd-item.efe-msd-checked {
	background-color: #ecfdf5;
}

.efe-msd-item.efe-msd-checked:hover {
	background-color: #d1fae5;
}

/* Checkbox */
.efe-msd-checkbox {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	min-width: 22px;
	border: 2px solid #d1d5db;
	border-radius: 4px;
	background: #fff;
	transition: all 0.15s ease;
	color: transparent;
	font-size: 12px;
}

.efe-msd-checkbox.efe-msd-on {
	background-color: #10b981;
	border-color: #10b981;
	color: #fff;
}

/* İkon */
.efe-msd-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	min-width: 28px;
	font-size: 18px;
	color: #6b7280;
}

/* Metin alanı */
.efe-msd-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	flex: 1;
	min-width: 0;
}

.efe-msd-title {
	font-size: 14px;
	font-weight: 500;
	color: #1f2937;
	line-height: 1.3;
}

.efe-msd-subtitle {
	font-size: 12px;
	color: #9ca3af;
	line-height: 1.3;
}

/* Scrollbar */
.efe-msd-dropdown::-webkit-scrollbar {
	width: 6px;
}

.efe-msd-dropdown::-webkit-scrollbar-track {
	background: #f9fafb;
}

.efe-msd-dropdown::-webkit-scrollbar-thumb {
	background: #d1d5db;
	border-radius: 3px;
}

.efe-msd-dropdown::-webkit-scrollbar-thumb:hover {
	background: #9ca3af;
}
