/**
 * Infobric Form Widget Styles
 * Modern, clean design using Infobric theme colors
 */

/* Form Header */
.infobric-form-title {
	margin: 0 0 16px;
	padding: 0;
	color: #272726;
	font-weight: 600;
	line-height: 1.2;
}

.infobric-form-description {
	margin: 0 0 24px;
	padding: 0;
	color: #919191;
	line-height: 1.6;
}

.infobric-form-description p {
	margin: 0 0 12px;
}

.infobric-form-description p:last-child {
	margin-bottom: 0;
}

/* Form Container */
.infobric-form-container {
	width: 100%;
	max-width: 100%;
	padding: 20px;
	border-radius: 8px;
}

.infobric-form {
	width: 100%;
}

/* Form Fields Layout */
.infobric-form-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 24px;
}

.infobric-form-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Field Width Classes */
.infobric-field-width-100 {
	width: 100%;
}

.infobric-field-width-50 {
	width: calc(50% - 10px);
}

.infobric-field-width-33 {
	width: calc(33.333% - 14px);
}

.infobric-field-width-25 {
	width: calc(25% - 15px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.infobric-field-width-50,
	.infobric-field-width-33,
	.infobric-field-width-25 {
		width: 100%;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.infobric-field-width-33,
	.infobric-field-width-25 {
		width: calc(50% - 10px);
	}
}

/* Labels */
.infobric-form-field label {
	font-family: 'SuisseIntl-Medium-WebS', sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #272726;
	line-height: 1.4;
	margin-bottom: 0;
}

.infobric-form-field .required-asterisk {
	color: #E57D3E;
	margin-left: 2px;
}

/* Input Fields */
.infobric-form-field input[type="text"],
.infobric-form-field input[type="email"],
.infobric-form-field input[type="tel"],
.infobric-form-field input[type="number"],
.infobric-form-field input[type="url"],
.infobric-form-field textarea,
.infobric-form-field select {
	width: 100%;
	padding: 12px 16px;
	font-family: 'SuisseIntl-Regular-WebS', sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: #272726;
	background-color: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	transition: all 0.3s ease;
	outline: none;
}

.infobric-form-field input[type="text"]:focus,
.infobric-form-field input[type="email"]:focus,
.infobric-form-field input[type="tel"]:focus,
.infobric-form-field input[type="number"]:focus,
.infobric-form-field input[type="url"]:focus,
.infobric-form-field textarea:focus,
.infobric-form-field select:focus {
	border-color: #73C095;
	box-shadow: 0 0 0 3px rgba(115, 192, 149, 0.1);
}

.infobric-form-field textarea {
	resize: vertical;
	min-height: 120px;
}

/* Placeholder styling */
.infobric-form-field input::placeholder,
.infobric-form-field textarea::placeholder {
	color: #919191;
	opacity: 1;
}

/* Select Dropdown */
.infobric-form-field select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23272726' d='M6 8L0 2l1.4-1.4L6 5.2 10.6.6 12 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	padding-right: 40px;
	cursor: pointer;
}

/* Checkbox and Radio Groups */
.infobric-checkbox-group,
.infobric-radio-group {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.infobric-checkbox-label,
.infobric-radio-label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: 'SuisseIntl-Regular-WebS', sans-serif;
	font-size: 15px;
	color: #272726;
	cursor: pointer;
	transition: color 0.2s ease;
}

.infobric-checkbox-label:hover,
.infobric-radio-label:hover {
	color: #73C095;
}

.infobric-checkbox-label input[type="checkbox"],
.infobric-radio-label input[type="radio"] {
	width: 18px;
	height: 18px;
	margin: 0;
	cursor: pointer;
	accent-color: #73C095;
}

/* Submit Button */
.infobric-form-button-wrapper {
	margin-top: 8px;
}

.infobric-form-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 32px;
	font-family: 'SuisseIntl-SemiBold-WebS', sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: #ffffff;
	background-color: #73C095;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	outline: none;
	min-width: 160px;
}

.infobric-form-submit:hover {
	background-color: #5ba67d;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(115, 192, 149, 0.3);
}

.infobric-form-submit:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(115, 192, 149, 0.3);
}

.infobric-form-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.infobric-form-submit .button-loader {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.infobric-form-submit.loading .button-text {
	display: none;
}

.infobric-form-submit.loading .button-loader {
	display: inline-flex !important;
}

/* Form Messages */
.infobric-form-message {
	margin-top: 20px;
	padding: 16px 20px;
	border-radius: 4px;
	font-family: 'SuisseIntl-Regular-WebS', sans-serif;
	font-size: 15px;
	line-height: 1.5;
	animation: slideDown 0.3s ease;
}

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

.infobric-form-message.success {
	color: #155724;
	background-color: #C0FFDC;
	border: 1px solid #73C095;
}

.infobric-form-message.error {
	color: #721c24;
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
}

/* Validation States */
.infobric-form-field input.error,
.infobric-form-field textarea.error,
.infobric-form-field select.error {
	border-color: #E57D3E;
}

.infobric-form-field input.error:focus,
.infobric-form-field textarea.error:focus,
.infobric-form-field select.error:focus {
	border-color: #E57D3E;
	box-shadow: 0 0 0 3px rgba(229, 125, 62, 0.1);
}

.infobric-form-field .field-error-message {
	font-size: 13px;
	color: #E57D3E;
	margin-top: 4px;
	display: none;
}

.infobric-form-field.has-error .field-error-message {
	display: block;
	animation: slideDown 0.2s ease;
}

/* Validation Error Messages */
.infobric-field-error {
	display: block;
	font-size: 13px;
	color: #E57D3E;
	margin-top: 5px;
	line-height: 1.4;
	animation: slideDown 0.2s ease;
}

/* Acceptance Field */
.infobric-acceptance-wrapper {
	margin: 15px 0;
}

.infobric-acceptance-label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.6;
	color: #272726;
	margin: 0;
	padding: 0;
}

.infobric-acceptance-checkbox {
	margin: 4px 0 0 0;
	width: 18px;
	height: 18px;
	min-width: 18px;
	cursor: pointer;
	flex-shrink: 0;
	accent-color: #1D2C38;
}

.infobric-acceptance-text {
	flex: 1;
	color: #272726;
	font-size: 14px;
	line-height: 1.6;
}

.infobric-acceptance-text a {
	color: #1D2C38;
	text-decoration: underline;
	font-weight: 500;
}

.infobric-acceptance-text a:hover {
	color: #2d4456;
	text-decoration: none;
}

.infobric-acceptance-wrapper.error {
	color: #E57D3E;
}

.infobric-acceptance-wrapper.error .infobric-acceptance-label {
	color: #E57D3E;
}

.infobric-acceptance-wrapper.error .infobric-acceptance-text {
	color: #E57D3E;
}

.infobric-acceptance-wrapper.error .infobric-acceptance-checkbox {
	outline: 2px solid #E57D3E;
	outline-offset: 2px;
}

.infobric-acceptance-wrapper.error .infobric-field-error {
	margin-top: 8px;
}

/* Loading State */
.infobric-form.loading {
	opacity: 0.7;
	pointer-events: none;
}

/* Elementor Editor Fixes */
.elementor-editor-active .infobric-form-submit {
	pointer-events: none;
}

/* File Upload - Drag and Drop */
.infobric-file-upload-wrapper {
	width: 100%;
}

.infobric-file-drop-zone {
	position: relative;
	border: 2px dashed #e0e0e0;
	border-radius: 8px;
	padding: 40px 20px;
	text-align: center;
	background-color: #fafafa;
	transition: all 0.3s ease;
	cursor: pointer;
}

.infobric-file-drop-zone:hover {
	border-color: #73C095;
	background-color: #f0f9f4;
}

.infobric-file-drop-zone.drag-over {
	border-color: #73C095;
	background-color: #e8f5ee;
	border-style: solid;
}

.infobric-file-drop-zone.has-error {
	border-color: #E57D3E;
	background-color: #fff5f2;
}

.infobric-drop-zone-content svg {
	display: block;
	margin: 0 auto 16px;
}

.infobric-drop-text {
	font-family: 'SuisseIntl-Medium-WebS', sans-serif;
	font-size: 16px;
	color: #272726;
	margin: 0 0 12px;
}

.infobric-file-browse-btn {
	display: inline-block;
	padding: 10px 24px;
	background-color: #1D2C38;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	font-family: 'SuisseIntl-Medium-WebS', sans-serif;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-bottom: 12px;
}

.infobric-file-browse-btn:hover {
	background-color: #2d4456;
	transform: translateY(-1px);
}

.infobric-file-info {
	font-family: 'SuisseIntl-Regular-WebS', sans-serif;
	font-size: 12px;
	color: #919191;
	margin: 0;
}

.infobric-file-list {
	margin-top: 16px;
}

.infobric-file-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background-color: #f6f6f6;
	border-radius: 4px;
	margin-bottom: 8px;
	transition: background-color 0.2s ease;
}

.infobric-file-item:hover {
	background-color: #ececec;
}

.infobric-file-item-info {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
}

.infobric-file-icon {
	width: 32px;
	height: 32px;
	background-color: #73C095;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	font-family: 'SuisseIntl-Bold-WebS', sans-serif;
	font-size: 10px;
	text-transform: uppercase;
	flex-shrink: 0;
}

.infobric-file-details {
	flex: 1;
}

.infobric-file-name {
	font-family: 'SuisseIntl-Medium-WebS', sans-serif;
	font-size: 14px;
	color: #272726;
	margin: 0 0 4px;
	word-break: break-word;
}

.infobric-file-size {
	font-family: 'SuisseIntl-Regular-WebS', sans-serif;
	font-size: 12px;
	color: #919191;
	margin: 0;
}

.infobric-file-remove {
	background: none;
	border: none;
	color: #E57D3E;
	cursor: pointer;
	padding: 8px;
	font-size: 18px;
	line-height: 1;
	transition: color 0.2s ease;
	flex-shrink: 0;
}

.infobric-file-remove:hover {
	color: #d45a20;
}

/* Responsive Design */
@media (max-width: 480px) {
	.infobric-form-field input,
	.infobric-form-field textarea,
	.infobric-form-field select {
		font-size: 16px; /* Prevents zoom on iOS */
	}

	.infobric-form-submit {
		width: 100%;
		padding: 16px 24px;
	}
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
	.infobric-form-field input,
	.infobric-form-field textarea,
	.infobric-form-field select {
		background-color: #f6f6f6;
	}
}

/* Accessibility Improvements */
.infobric-form-field input:focus-visible,
.infobric-form-field textarea:focus-visible,
.infobric-form-field select:focus-visible {
	outline: 2px solid #73C095;
	outline-offset: 2px;
}

.infobric-form-submit:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

/* Print Styles */
@media print {
	.infobric-form-submit {
		display: none;
	}
}
