/* Visual Picker for ACF Flexible Content — Field settings panel */

.aibs-fcp-for-acf-plugin-wrapper {
	display: block;
	box-sizing: border-box;
	margin: 35px 70px 0 !important;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 20px !important;
	background: #fff;
	clear: both;
}

.aibs-fcp-for-acf-plugin-wrapper__header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 0;
}

.aibs-fcp-for-acf-plugin-wrapper__title {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #50575e;
	margin: 0;
}

.aibs-fcp-for-acf-plugin-wrapper__help {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #dcdcde;
	color: #50575e;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	cursor: default;
	flex-shrink: 0;
}

.aibs-fcp-for-acf-plugin-wrapper__help:hover {
	background: #2271b1;
	color: #fff;
}

.aibs-fcp-for-acf-plugin-wrapper__tooltip {
	display: none;
	position: absolute;
	left: 50%;
	bottom: calc(100% + 6px);
	transform: translateX(-50%);
	background: #1d2327;
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	line-height: 1.5;
	padding: 8px 12px;
	border-radius: 4px;
	white-space: normal;
	width: 240px;
	z-index: 9999;
	pointer-events: none;
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.aibs-fcp-for-acf-plugin-wrapper__tooltip::before {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 5px solid transparent;
	border-top-color: #1d2327;
}

.aibs-fcp-for-acf-plugin-wrapper__help:hover .aibs-fcp-for-acf-plugin-wrapper__tooltip {
	display: block;
}

.aibs-fcp-for-acf-plugin-wrapper .acf-field[data-name="aibs_fcp_for_acf_plugin_enabled"] {
	display: inline-flex !important;
	align-items: center !important;
	flex-shrink: 0;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	border: none !important;
	width: auto !important;
}

.aibs-fcp-for-acf-plugin-wrapper .acf-field[data-name="aibs_fcp_for_acf_plugin_enabled"] .acf-label {
	display: none !important;
}

.aibs-fcp-for-acf-plugin-wrapper .acf-field[data-name="aibs_fcp_for_acf_plugin_enabled"] .acf-input {
	float: none !important;
	width: auto !important;
	padding: 0 !important;
}

.aibs-fcp-for-acf-plugin {
	overflow: hidden;
	box-sizing: border-box;
	width: 100%;
	padding: 0 !important;
	border: none;
	border-top: 1px solid #dcdcde;
	background: #fff;
	border-radius: 0 0 8px 8px;
}

.aibs-fcp-for-acf-plugin.acf-field {
	clear: both;
	float: none;
	width: calc(100% + 40px) !important;
	margin: 20px -20px -20px !important;
	padding: 0 !important;
}

.aibs-fcp-for-acf-plugin__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 0 24px;
	min-height: 70px;
	background: #f3f4f6;
	cursor: pointer;
	user-select: none;
	border-bottom: 1px solid #d0d5dd;
	transition: background 0.15s;
}

.aibs-fcp-for-acf-plugin__header-info {
	flex: 1;
	min-width: 0;
}

.aibs-fcp-for-acf-plugin__title {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
}

.aibs-fcp-for-acf-plugin__desc {
	display: block;
	font-size: 12px;
	color: #787c82;
	margin-top: 3px;
}

.aibs-fcp-for-acf-plugin__chevron {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	background-color: #787c82;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20fill='none'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M6%209l6%206%206-6'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20fill='none'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M6%209l6%206%206-6'/%3E%3C/svg%3E");
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-position: center;
	mask-position: center;
	transform: rotate(180deg);
	transition: transform 0.2s, background-color 0.15s;
}

.aibs-fcp-for-acf-plugin__header[aria-expanded="false"] {
	border-bottom: none;
}

.aibs-fcp-for-acf-plugin__header[aria-expanded="false"] .aibs-fcp-for-acf-plugin__chevron {
	transform: rotate(0deg);
}

.aibs-fcp-for-acf-plugin__header:hover .aibs-fcp-for-acf-plugin__chevron {
	background-color: #50575e;
}

.aibs-fcp-for-acf-plugin__body {
	background: #fafbfc;
	padding: 24px;
}

.aibs-fcp-for-acf-plugin__body .acf-input {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	float: none;
	clear: both;
	width: 100% !important;
	max-width: 100% !important;
	padding: 0;
}

@media (max-width: 1200px) {
	.aibs-fcp-for-acf-plugin__body .acf-input {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 900px) {
	.aibs-fcp-for-acf-plugin__body .acf-input {
		grid-template-columns: 1fr;
	}
}

/* Visual Picker for ACF Flexible Content — Per-layout row cards & fields */

.aibs-fcp-for-acf-plugin__row {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	overflow: hidden;
	box-sizing: border-box;
	margin: 0;
}

.aibs-fcp-for-acf-plugin__row-head {
	background: #f1f3f5;
	border-bottom: 1px solid #dcdcde;
	padding: 8px 12px;
	text-align: center;
}

.aibs-fcp-for-acf-plugin__row-label {
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

.aibs-fcp-for-acf-plugin__row-fields {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.aibs-fcp-for-acf-plugin__field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 4px;
}

.aibs-fcp-for-acf-plugin__field label .description {
	font-weight: 400;
	color: #787c82;
}

.aibs-fcp-for-acf-plugin__field input.widefat,
.aibs-fcp-for-acf-plugin__field textarea.widefat {
	font-size: 14px;
}

.aibs-fcp-for-acf-plugin__field--thumb {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.aibs-fcp-for-acf-plugin__thumb-box {
	flex-shrink: 0;
	width: 107.4px;
	height: 107.4px;
	background: #f0f0f1;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	overflow: hidden;
}

.aibs-fcp-for-acf-plugin__thumb-preview {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.aibs-fcp-for-acf-plugin__thumb-controls {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.aibs-fcp-for-acf-plugin__thumb-controls .widefat {
	font-size: 14px;
}

.aibs-fcp-for-acf-plugin__thumb-or {
	font-size: 11px;
	color: #787c82;
}

.aibs-fcp-for-acf-plugin__thumb-controls .button {
	width: 50%;
	font-size: 13px;
	height: 40px;
	line-height: 38px;
	padding: 0 10px;
	box-sizing: border-box;
	text-align: center;
	justify-content: center;
}
