/**
 * Neuroon Search - Widget Areas Styles
 *
 * Optimized styles for Gutenberg block in widget areas (sidebars, footers).
 * These styles ensure the search widget adapts properly to narrow widget areas.
 *
 * @package Neuroon_Search
 * @since 1.2.0
 */

/* Widget area container adjustments */
.widget-area .wp-block-neuroon-search,
.sidebar .wp-block-neuroon-search,
.widget_block .wp-block-neuroon-search {
	max-width: 100%;
	margin: 0;
}

/* Ensure proper width in widget areas */
.widget-area .wp-block-neuroon-search .neuroon-widget-wrapper,
.sidebar .wp-block-neuroon-search .neuroon-widget-wrapper,
.widget_block .wp-block-neuroon-search .neuroon-widget-wrapper {
	max-width: 100%;
	width: 100%;
}

/* Compact layout in widget areas - ensure it fits */
.widget-area .wp-block-neuroon-search .neuroon-layout-compact,
.sidebar .wp-block-neuroon-search .neuroon-layout-compact {
	width: 100%;
}

/* Full layout constraints in narrow sidebars */
.widget-area .wp-block-neuroon-search .neuroon-layout-full,
.sidebar .wp-block-neuroon-search .neuroon-layout-full {
	/* Stack elements vertically in narrow spaces */
	flex-direction: column;
}

/* Icon layout for very narrow sidebars */
.widget-area .wp-block-neuroon-search .neuroon-layout-icon,
.sidebar .wp-block-neuroon-search .neuroon-layout-icon {
	display: flex;
	justify-content: center;
	width: 100%;
}

/* Remove default widget margins that may conflict */
.widget-area .wp-block-neuroon-search:first-child,
.sidebar .wp-block-neuroon-search:first-child {
	margin-top: 0;
}

.widget-area .wp-block-neuroon-search:last-child,
.sidebar .wp-block-neuroon-search:last-child {
	margin-bottom: 0;
}

/* Footer widget areas - horizontal alignment */
.footer-widgets .wp-block-neuroon-search,
.site-footer .wp-block-neuroon-search {
	max-width: 400px;
}

/* Responsive adjustments for widget areas */
@media (max-width: 782px) {
	.widget-area .wp-block-neuroon-search,
	.sidebar .wp-block-neuroon-search {
		padding: 0;
	}
}
