/* TinyMCE Snippy Blocks Modal Styles */

/* Custom TinyMCE Button Icon */
.mce-i-bccb_blocks {
	position: relative;
	display: inline-block;
	padding: 2px;
}

.mce-i-bccb_blocks::before {
	content: "";
	display: inline-block;
	width: 22px;
	height: 22px;
	background-image: url(../icons/bccb-icon.png);
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	vertical-align: middle;
}

/* Icon Notes */

/* Current icon: Custom PNG logo [B] in brand blue color */

/* File: ../icons/bccb-icon.png */

/* Size: 16x16px optimized for TinyMCE toolbar */

.bccb-blocks-modal-open {
	overflow: hidden;
}

#bccb-blocks-tinymce-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	opacity: 1;
	transition: opacity 0.3s ease;
}

.bccb-blocks-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(3px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.bccb-blocks-modal-dialog {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	width: 100%;
	max-width: 600px;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	animation: bccbModalSlideIn 0.3s ease-out;
}

@keyframes bccbModalSlideIn {

	from {
		opacity: 0;
		transform: scale(0.95) translateY(-20px);
	}

	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.bccb-blocks-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px;
	border-bottom: 1px solid #e1e5e9;
	background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
	border-radius: 16px 16px 0 0;
}

.bccb-blocks-modal-header h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #1e1e1e;
}

.bccb-blocks-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #6c7781;
	padding: 4px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.bccb-blocks-modal-close:hover {
	background: #f0f0f0;
	color: #1e1e1e;
}

.bccb-blocks-modal-body {
	flex: 1;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.bccb-blocks-search-wrapper {
	padding: 20px 24px 0;
}

.bccb-blocks-search-wrapper input {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #e1e5e9;
	border-radius: 12px;
	font-size: 14px;
	outline: none;
	transition: all 0.2s ease;
}

.bccb-blocks-search-wrapper input:focus {
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.bccb-blocks-list {
	flex: 1;
	overflow-y: auto;
	padding: 20px 24px;
	max-height: 400px;
}

.bccb-blocks-loading {
	text-align: center;
	padding: 40px 20px;
}

.bccb-blocks-spinner {
	width: 24px;
	height: 24px;
	border: 2px solid #e1e5e9;
	border-top: 2px solid #0073aa;
	border-radius: 50%;
	display: inline-block;
	animation: spin 1s linear infinite;
	margin-bottom: 12px;
}

@keyframes spin {

	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

.bccb-blocks-snippet-item {
	border: 2px solid #e1e5e9;
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
	background: #fff;
}

.bccb-blocks-snippet-item:hover {
	border-color: #0073aa;
	box-shadow: 0 4px 16px rgba(0, 115, 170, 0.1);
	transform: translateY(-1px);
}

.bccb-blocks-snippet-item:last-child {
	margin-bottom: 0;
}

.bccb-blocks-snippet-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 8px;
}

.bccb-blocks-snippet-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #1e1e1e;
	line-height: 1.3;
	flex: 1;
}

.bccb-blocks-snippet-date {
	font-size: 12px;
	color: #6c7781;
	margin-left: 12px;
	white-space: nowrap;
}

.bccb-blocks-snippet-preview {
	font-size: 14px;
	color: #6c7781;
	line-height: 1.4;
	margin-bottom: 8px;
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow: hidden;
}

.bccb-blocks-snippet-shortcode {
	font-family: Monaco, Menlo, "Ubuntu Mono", monospace;
	font-size: 12px;
	color: #0073aa;
	background: rgba(0, 115, 170, 0.1);
	padding: 4px 8px;
	border-radius: 4px;
	display: inline-block;
}

.bccb-blocks-empty {
	text-align: center;
	padding: 60px 20px;
}

.bccb-blocks-empty-icon {
	font-size: 48px;
	margin-bottom: 16px;
	opacity: 0.6;
}

.bccb-blocks-empty h3 {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 600;
	color: #1e1e1e;
}

.bccb-blocks-empty p {
	margin: 0 0 20px 0;
	color: #6c7781;
	font-size: 14px;
}

.bccb-blocks-error {
	text-align: center;
	padding: 40px 20px;
	color: #d63638;
}

.bccb-blocks-modal-footer {
	padding: 16px 24px;
	border-top: 1px solid #e1e5e9;
	background: #f8f9fa;
	border-radius: 0 0 16px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.bccb-blocks-btn {
	padding: 10px 16px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.bccb-blocks-btn-primary {
	background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
	color: #fff;
	box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.bccb-blocks-btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(0, 115, 170, 0.4);
}

.bccb-blocks-btn-secondary {
	background: #fff;
	color: #0073aa;
	border: 1px solid #0073aa;
}

.bccb-blocks-btn-secondary:hover {
	background: #0073aa;
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

/* Responsive */
@media (max-width: 768px) {

	.bccb-blocks-modal-dialog {
		margin: 20px;
		max-width: none;
		width: calc(100% - 40px);
	}

	.bccb-blocks-modal-header,
	.bccb-blocks-search-wrapper,
	.bccb-blocks-list,
	.bccb-blocks-modal-footer {
		padding-left: 16px;
		padding-right: 16px;
	}

	.bccb-blocks-snippet-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.bccb-blocks-snippet-date {
		margin-left: 0;
		margin-top: 4px;
	}
}
