/**
 * Rexultz Block Editor Styles
 *
 * @package Rexultz
 */

/* Block editor wrapper */
.rexultz-block-editor {
	padding: 0;
}

/* Preview container when feed ID is set */
.rexultz-block-preview {
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 24px;
	text-align: center;
}

/* Preview wrapper */
.rexultz-block-preview-wrapper {
	min-height: 100px;
}

/* Block header with icon and title */
.rexultz-block-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 16px;
	padding: 12px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 8px 8px 0 0;
	color: #fff;
}

.rexultz-block-header .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	color: #fff;
}

.rexultz-block-title {
	font-size: 14px;
	font-weight: 600;
	color: #fff;
}

.rexultz-feed-id {
	font-size: 12px;
	opacity: 0.8;
	margin-left: auto;
}

/* Feed info display */
.rexultz-block-info {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 12px 16px;
	margin: 16px auto;
	display: inline-block;
	font-size: 14px;
	color: #1e1e1e;
}

.rexultz-block-info strong {
	color: #50575e;
}

/* Note text */
.rexultz-block-note {
	font-size: 12px;
	color: #757575;
	margin: 16px 0 0 0;
	font-style: italic;
}

/* Live preview container */
.rexultz-block-live-preview {
	border: 1px solid #dee2e6;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.rexultz-preview-content {
	padding: 16px;
	max-height: 500px;
	overflow-y: auto;
}

/* Loading state */
.rexultz-block-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	gap: 12px;
}

.rexultz-block-loading span {
	color: #666;
	font-size: 14px;
}

/* Error state */
.rexultz-block-error {
	background: #fff5f5;
	border: 1px solid #f5c6cb;
	border-radius: 8px;
	padding: 24px;
	text-align: center;
}

.rexultz-block-error .rexultz-block-header {
	background: #dc3545;
	margin: -24px -24px 16px -24px;
	border-radius: 8px 8px 0 0;
}

.rexultz-block-error .dashicons-warning {
	color: #fff;
}

.rexultz-block-error p {
	color: #721c24;
	margin: 0 0 16px 0;
}

/* Preview disabled state */
.rexultz-block-preview-disabled {
	background: #f0f0f1;
	border: 2px dashed #c3c4c7;
}

.rexultz-block-preview-disabled .rexultz-block-header {
	background: #50575e;
}

.rexultz-block-preview-disabled .rexultz-block-note {
	color: #50575e;
	font-style: normal;
}

/* Placeholder styling */
.wp-block-rexultz-product-feed .components-placeholder {
	min-height: 150px;
}

.wp-block-rexultz-product-feed .components-placeholder__instructions {
	margin-bottom: 16px;
}

.wp-block-rexultz-product-feed .components-placeholder .components-text-control__input {
	max-width: 200px;
	text-align: center;
}

/* Input field in placeholder */
.wp-block-rexultz-product-feed .components-base-control {
	margin-bottom: 0;
}

.wp-block-rexultz-product-feed .components-base-control__label {
	display: block;
	margin-bottom: 8px;
}

/* Refresh button in sidebar */
.wp-block-rexultz-product-feed .components-panel__body .components-button {
	margin-top: 12px;
}

