/**
 * Affiliate Toolkit - Gutenberg Block Editor Styles
 * @since 3.0.0
 */

/* Block Wrapper - ensure blocks are selectable and properly styled */
.wp-block[data-type="atkp/product"],
.wp-block[data-type="atkp/list"] {
	/* Don't force width, let Gutenberg handle it */
	position: relative;
}

/* When block is selected, show proper border */
.wp-block[data-type="atkp/product"].is-selected .atkp-block-placeholder,
.wp-block[data-type="atkp/list"].is-selected .atkp-block-placeholder {
	border-color: #54b9ca;
	border-style: solid;
	box-shadow: 0 0 0 1px #54b9ca;
}

/* Block Container */
.atkp-product-block-editor,
.atkp-list-block-editor {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Block Placeholders */
.atkp-product-block-editor .atkp-block-placeholder,
.atkp-list-block-editor .atkp-block-placeholder {
	padding: 30px 20px;
	text-align: center;
	background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
	border: 2px dashed #ddd;
	border-radius: 8px;
	transition: all 0.3s ease;
	max-width: 100%;
	box-sizing: border-box;
	cursor: pointer;
}

.atkp-product-block-editor .atkp-block-placeholder:hover,
.atkp-list-block-editor .atkp-block-placeholder:hover {
	border-color: #54b9ca;
	background: linear-gradient(135deg, #e6f7f9 0%, #ffffff 100%);
	box-shadow: 0 4px 12px rgba(84, 185, 202, 0.15);
}

/* Hide dashicon, we use custom logo */
.atkp-block-placeholder .dashicons {
	display: none !important;
}

.atkp-block-logo {
	display: none !important;
}

.atkp-block-placeholder h4 {
	margin: 10px 0;
	color: #333;
	font-size: 18px;
	font-weight: 600;
}

.atkp-block-placeholder p {
	margin: 5px 0;
	color: #666;
	font-size: 14px;
}

/* Search Results */
.atkp-product-search,
.atkp-list-search {
	margin-bottom: 16px;
}

.atkp-product-search .components-base-control,
.atkp-list-search .components-base-control {
	margin-bottom: 0;
}

/* Selected Item Display */
.atkp-selected-product,
.atkp-selected-list {
	padding: 12px;
	background: #e6f7f9;
	border: 1px solid #b3e5ef;
	border-radius: 4px;
	margin-bottom: 12px;
}

.atkp-selected-product p,
.atkp-selected-list p {
	margin: 4px 0;
	color: #005162;
}

/* Inspector Controls */
.components-panel__body .components-base-control {
	margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 782px) {
	.atkp-block-placeholder {
		padding: 15px;
	}

	.atkp-block-placeholder .dashicons {
		font-size: 36px;
		width: 36px;
		height: 36px;
	}
}
