/**
 * Frontend Form Styles for WP İletişim Formu
 */

.wpilfor-form-container {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 20px 0;
	font-family: inherit;
}

.wpilfor-form {
	width: 100%;
	box-sizing: border-box;
}

.wpilfor-form * {
	box-sizing: border-box;
}

/* Grid Layout */
.wpilfor-grid-row {
	display: flex;
	flex-wrap: wrap;
	margin-left: -8px;
	margin-right: -8px;
	row-gap: 16px;
}

.wpilfor-field-col {
	padding-left: 8px;
	padding-right: 8px;
	flex: 0 0 100%;
	max-width: 100%;
}

.wpilfor-col-12 {
	flex: 0 0 100%;
	max-width: 100%;
}

.wpilfor-col-6 {
	flex: 0 0 50%;
	max-width: 50%;
}

.wpilfor-col-4 {
	flex: 0 0 33.333333%;
	max-width: 33.333333%;
}

.wpilfor-col-3 {
	flex: 0 0 25%;
	max-width: 25%;
}

@media (max-width: 640px) {

	.wpilfor-col-6,
	.wpilfor-col-4,
	.wpilfor-col-3 {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

.wpilfor-form-container .wpilfor-input,
.wpilfor-form-container .wpilfor-textarea,
.wpilfor-form-container .wpilfor-select {
	width: 100%;
}

/* Labels & Typography */
.wpilfor-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #1e293b;
	line-height: 1.4;
}

.wpilfor-required-asterisk {
	color: #ef4444;
	font-weight: bold;
	margin-left: 2px;
}

.wpilfor-help-text {
	display: block;
	font-size: 12px;
	color: #64748b;
	margin-top: 4px;
	line-height: 1.3;
}

/* Inputs, Textareas, Selects */
.wpilfor-input,
.wpilfor-textarea,
.wpilfor-select {
	width: 100%;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.5;
	color: #1e293b;
	background-color: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
	outline: none;
	font-family: inherit;
}

.wpilfor-input:focus,
.wpilfor-textarea:focus,
.wpilfor-select:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.wpilfor-select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px 16px;
	padding-right: 42px;
	cursor: pointer;
}

.wpilfor-select::-ms-expand {
	display: none;
}

.wpilfor-select:hover {
	border-color: #94a3b8;
}

.wpilfor-select option {
	background-color: #ffffff;
	color: #1e293b;
	padding: 8px 12px;
}

.wpilfor-textarea {
	resize: vertical;
	min-height: 100px;
}

/* Choices: Radio & Checkbox */
.wpilfor-radio-group,
.wpilfor-checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 4px;
}

.wpilfor-choice-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 14px;
	color: #334155;
	user-select: none;
}

.wpilfor-choice-item input[type="radio"],
.wpilfor-choice-item input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	cursor: pointer;
	accent-color: #2563eb;
}

/* File Upload */
.wpilfor-input-file {
	display: block;
	width: 100%;
	font-size: 13px;
	color: #475569;
}

.wpilfor-input-file::file-selector-button {
	padding: 8px 16px;
	border-radius: 6px;
	border: 1px solid #cbd5e1;
	background: #f1f5f9;
	color: #1e293b;
	font-weight: 500;
	font-size: 13px;
	cursor: pointer;
	margin-right: 12px;
	transition: all 0.15s;
}

.wpilfor-input-file::file-selector-button:hover {
	background: #e2e8f0;
}

/* Section Separator */
.wpilfor-section-separator {
	margin-top: 12px;
	margin-bottom: 4px;
	border-bottom: 2px solid #e2e8f0;
	padding-bottom: 8px;
}

.wpilfor-section-title {
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 4px 0;
}

.wpilfor-section-desc {
	font-size: 13px;
	color: #64748b;
	margin: 0;
}

/* HTML Block Field */
.wpilfor-html-block {
	line-height: 1.6;
	color: #334155;
	font-size: 14px;
	margin-top: 4px;
	margin-bottom: 4px;
}

.wpilfor-html-block p:last-child {
	margin-bottom: 0;
}

.wpilfor-html-block img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

/* Captcha wrapper */
.wpilfor-captcha-col {
	margin: 10px 0;
}

.wpilfor-captcha-wrapper {
	min-height: 65px;
	display: flex;
	align-items: center;
}

/* Submit Button */
.wpilfor-submit-col {
	margin-top: 8px;
}

.wpilfor-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #ffffff;
	border: none;
	border-radius: 8px;
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.wpilfor-submit-btn:hover {
	background: linear-gradient(135deg, #1d4ed8, #1e40af);
	box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.3);
	transform: translateY(-1px);
}

.wpilfor-submit-btn:disabled,
.wpilfor-submit-btn.wpilfor-btn-disabled {
	opacity: 0.5 !important;
	cursor: not-allowed !important;
	transform: none !important;
	box-shadow: none !important;
	pointer-events: none !important;
}

/* Consent / Privacy Policy Field */
.wpilfor-consent-wrapper {
	margin-top: 4px;
	margin-bottom: 4px;
}

.wpilfor-consent-text-box {
	background-color: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 13px;
	line-height: 1.6;
	color: #334155;
	margin-bottom: 10px;
}

.wpilfor-consent-text-box.wpilfor-consent-scrollable {
	max-height: 140px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
}

.wpilfor-consent-text-box p:last-child {
	margin-bottom: 0;
}

.wpilfor-consent-text-box a {
	color: #2563eb;
	text-decoration: underline;
}

.wpilfor-consent-choice-wrap {
	display: flex;
	align-items: center;
	margin-top: 6px;
}

.wpilfor-consent-choice {
	font-weight: 500;
	color: #1e293b;
	cursor: pointer;
}

/* Loading Spinner */
.wpilfor-spinner-svg {
	animation: wpilfor-rotate 1.5s linear infinite;
	width: 18px;
	height: 18px;
}

.wpilfor-spinner-svg circle {
	stroke: #ffffff;
	stroke-linecap: round;
	animation: wpilfor-dash 1.5s ease-in-out infinite;
}

@keyframes wpilfor-rotate {
	100% {
		transform: rotate(360deg);
	}
}

@keyframes wpilfor-dash {
	0% {
		stroke-dasharray: 1, 150;
		stroke-dashoffset: 0;
	}

	50% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -35;
	}

	100% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -124;
	}
}

/* Alerts / Response Messages */
.wpilfor-response-message {
	padding: 14px 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	margin: 16px 0;
	line-height: 1.5;
	animation: wpilfor-fadeIn 0.25s ease-in;
}

@keyframes wpilfor-fadeIn {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.wpilfor-response-message.wpilfor-alert-success {
	background-color: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.wpilfor-response-message.wpilfor-alert-error {
	background-color: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}