/* BlogCutter AI Section Builder — Elementor editor UI v2.0.0 */

#bcasbe-fab {
	position: fixed !important;
	bottom: 24px;
	right: 24px;
	z-index: 99999 !important;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
	color: #fff;
	font-size: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
	cursor: pointer;
	border: none;
	transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s;
	user-select: none;
	outline: none;
}

#bcasbe-fab:hover {
	transform: scale(1.12);
	box-shadow: 0 8px 28px rgba(99, 102, 241, 0.65);
}

#bcasbe-fab:focus-visible {
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px #6366f1;
}

#bcasbe-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.72);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	animation: bcasbe-fadein 0.18s ease;
}

@keyframes bcasbe-fadein {
	from { opacity: 0; }
	to { opacity: 1; }
}

#bcasbe-modal {
	background: #fff;
	border-radius: 20px;
	width: 100%;
	max-width: 1040px;
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
	overflow: hidden;
	animation: bcasbe-slideup 0.24s cubic-bezier(0.16, 1, 0.3, 1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@keyframes bcasbe-slideup {
	from { transform: translateY(30px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

#bcasbe-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid #f1f5f9;
	flex-shrink: 0;
	gap: 12px;
}

#bcasbe-modal-head h2 {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.25px;
	display: flex;
	align-items: center;
	gap: 8px;
}

#bcasbe-badge {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.6px;
	background: linear-gradient(90deg, #06b6d4, #6366f1);
	color: #fff;
	padding: 2px 8px;
	border-radius: 20px;
	text-transform: uppercase;
}

.bcasbe-head-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

#bcasbe-history-btn,
#bcasbe-close-btn {
	border: none;
	cursor: pointer;
	outline: none;
	transition: background 0.14s, color 0.14s;
}

#bcasbe-history-btn {
	height: 32px;
	padding: 0 12px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #334155;
	font-size: 12px;
	font-weight: 600;
}

#bcasbe-history-btn[aria-expanded="true"],
#bcasbe-history-btn:hover {
	background: #e0e7ff;
	color: #3730a3;
}

#bcasbe-close-btn {
	width: 30px;
	height: 30px;
	background: #f1f5f9;
	border-radius: 50%;
	font-size: 14px;
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

#bcasbe-close-btn:hover {
	background: #e2e8f0;
	color: #0f172a;
}

#bcasbe-modal-body {
	padding: 18px 20px;
	overflow-y: auto;
	flex: 1;
	position: relative;
}

#bcasbe-prompt {
	width: 100%;
	box-sizing: border-box;
	min-height: 96px;
	background: #f8fafc;
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	padding: 12px 14px;
	font-size: 13.5px;
	line-height: 1.55;
	color: #0f172a;
	font-family: inherit;
	resize: vertical;
	outline: none;
	transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

#bcasbe-prompt:focus {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
	background: #fff;
}

#bcasbe-prompt::placeholder {
	color: #94a3b8;
}

.bcasbe-examples {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 10px 0 0;
}

.bcasbe-chip {
	border: 1px solid #e2e8f0;
	background: #fff;
	color: #334155;
	border-radius: 999px;
	padding: 5px 10px;
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.14s, background 0.14s, color 0.14s;
}

.bcasbe-chip:hover {
	border-color: #6366f1;
	background: #eef2ff;
	color: #3730a3;
}

.bcasbe-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 12px 0;
}

.bcasbe-field {
	position: relative;
}

.bcasbe-field > label {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.55px;
	text-transform: uppercase;
	color: #64748b;
	margin-bottom: 5px;
}

.bcasbe-field > select {
	width: 100%;
	padding: 10px 34px 10px 12px;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	background-color: #f8fafc !important;
	color: #0f172a !important;
	-webkit-text-fill-color: #0f172a !important;
	font-size: 13.5px;
	font-weight: 500;
	font-family: inherit;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	outline: none;
	transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.bcasbe-field > select:focus {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
	background-color: #fff !important;
}

.bcasbe-chevron {
	position: absolute;
	right: 12px;
	bottom: 12px;
	width: 7px;
	height: 7px;
	border-right: 2px solid #6366f1;
	border-bottom: 2px solid #6366f1;
	transform: rotate(45deg);
	pointer-events: none;
}

#bcasbe-gen-btn {
	width: 100%;
	padding: 13px 16px;
	font-size: 14.5px;
	font-weight: 700;
	background: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
	color: #fff;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	letter-spacing: 0.15px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: opacity 0.18s, transform 0.15s, box-shadow 0.18s;
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
	outline: none;
}

#bcasbe-gen-btn:hover:not(:disabled) {
	opacity: 0.91;
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.42);
}

#bcasbe-gen-btn:disabled {
	opacity: 0.58;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.bcasbe-btn-spin {
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: bcasbe-spin 0.6s linear infinite;
	flex-shrink: 0;
}

@keyframes bcasbe-spin {
	to { transform: rotate(360deg); }
}

#bcasbe-result {
	display: none;
	margin-top: 16px;
}

.bcasbe-tabs {
	display: flex;
	align-items: center;
	border-bottom: 2px solid #f1f5f9;
	margin-bottom: 13px;
	gap: 4px;
}

.bcasbe-tab {
	padding: 7px 15px;
	font-size: 12.5px;
	font-weight: 600;
	color: #64748b;
	border: none;
	background: transparent;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	cursor: pointer;
	border-radius: 6px 6px 0 0;
	user-select: none;
	transition: color 0.14s, border-color 0.14s, background 0.14s;
}

.bcasbe-tab:hover:not(.is-active) {
	color: #1e293b;
	background: #f8fafc;
}

.bcasbe-tab.is-active {
	color: #4f46e5;
	border-bottom-color: #6366f1;
}

.bcasbe-devices {
	display: flex;
	gap: 4px;
	margin-left: auto;
}

.bcasbe-device {
	width: 30px;
	height: 28px;
	border: 1px solid #e2e8f0;
	background: #fff;
	border-radius: 6px;
	color: #64748b;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
}

.bcasbe-device.is-active {
	border-color: #6366f1;
	color: #4f46e5;
	background: #eef2ff;
}

#bcasbe-preview-wrap {
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	overflow: auto;
	background: #f8fafc;
}

#bcasbe-preview-frame {
	margin: 0 auto;
	background: #fff;
	min-height: 280px;
	transition: max-width 0.2s ease;
	box-shadow: 0 0 0 1px #e2e8f0;
}

#bcasbe-preview-frame[data-device="desktop"] { max-width: 100%; }
#bcasbe-preview-frame[data-device="tablet"] { max-width: 768px; }
#bcasbe-preview-frame[data-device="mobile"] { max-width: 390px; }

#bcasbe-live-preview {
	min-height: 280px;
}

#bcasbe-loading {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 200px;
	background: #f8fafc;
}

#bcasbe-loading.is-visible {
	display: flex;
}

.bcasbe-ring {
	width: 26px;
	height: 26px;
	border: 3px solid #e2e8f0;
	border-top-color: #6366f1;
	border-radius: 50%;
	animation: bcasbe-spin 0.7s linear infinite;
}

#bcasbe-loading > span {
	font-size: 12.5px;
	color: #94a3b8;
	font-weight: 500;
}

#bcasbe-code-wrap {
	display: none;
}

#bcasbe-code-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #1e293b;
	padding: 7px 12px;
	border-radius: 10px 10px 0 0;
}

#bcasbe-code-toolbar > span {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: #94a3b8;
}

.bcasbe-tbar-btns {
	display: flex;
	gap: 6px;
}

.bcasbe-tbar-btn {
	font-size: 11.5px;
	font-weight: 600;
	border: none;
	border-radius: 6px;
	padding: 5px 11px;
	cursor: pointer;
	transition: opacity 0.14s, transform 0.1s;
	outline: none;
}

.bcasbe-tbar-btn:hover {
	opacity: 0.82;
	transform: translateY(-1px);
}

#bcasbe-copy-btn {
	background: #334155;
	color: #94a3b8;
}

#bcasbe-apply-btn {
	background: linear-gradient(90deg, #06b6d4, #6366f1);
	color: #fff;
}

#bcasbe-code-editor {
	width: 100%;
	box-sizing: border-box;
	min-height: 290px;
	max-height: 370px;
	background: #0f172a;
	color: #94a3b8;
	border: none;
	border-radius: 0 0 10px 10px;
	padding: 14px;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 12px;
	line-height: 1.65;
	resize: vertical;
	outline: none;
	tab-size: 2;
	white-space: pre;
	overflow: auto;
}

#bcasbe-code-editor:focus {
	box-shadow: inset 0 0 0 2px #6366f1;
}

.bcasbe-refine {
	display: none;
	grid-template-columns: 1fr auto;
	gap: 8px;
	margin-top: 12px;
}

.bcasbe-refine.is-visible {
	display: grid;
}

#bcasbe-refine {
	width: 100%;
	box-sizing: border-box;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 13px;
	font-family: inherit;
	outline: none;
}

#bcasbe-refine:focus {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

#bcasbe-refine-btn {
	border: none;
	border-radius: 10px;
	padding: 0 16px;
	background: #0f172a;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.bcasbe-actions {
	display: flex;
	gap: 10px;
	margin-top: 13px;
}

.bcasbe-action-btn {
	flex: 1;
	padding: 11px 14px;
	border: none;
	border-radius: 10px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	transition: opacity 0.15s, transform 0.14s;
	outline: none;
}

.bcasbe-action-btn:hover {
	opacity: 0.86;
	transform: translateY(-1px);
}

.bcasbe-btn-insert {
	background: #10b981;
	color: #fff;
	box-shadow: 0 3px 10px rgba(16, 185, 129, 0.25);
}

.bcasbe-btn-regen {
	background: #f1f5f9;
	color: #1e293b;
	border: 1.5px solid #e2e8f0;
}

#bcasbe-history-panel {
	display: none;
	margin-bottom: 14px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #f8fafc;
	padding: 10px;
	max-height: 220px;
	overflow: auto;
}

#bcasbe-history-panel.is-open {
	display: block;
}

.bcasbe-history-empty {
	margin: 8px;
	color: #64748b;
	font-size: 13px;
}

.bcasbe-history-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	margin-bottom: 8px;
}

.bcasbe-history-item p {
	margin: 0;
	font-size: 12.5px;
	color: #0f172a;
	font-weight: 600;
}

.bcasbe-history-item small {
	display: block;
	margin-top: 2px;
	color: #64748b;
	font-weight: 500;
}

.bcasbe-history-item button {
	border: 1px solid #e2e8f0;
	background: #fff;
	border-radius: 8px;
	padding: 5px 8px;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
}

.bcasbe-toast {
	position: fixed;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%) translateY(8px);
	padding: 9px 18px;
	border-radius: 10px;
	font-size: 12.5px;
	font-weight: 600;
	z-index: 200001;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
	opacity: 0;
	transition: opacity 0.22s, transform 0.22s;
	pointer-events: none;
	max-width: 420px;
	text-align: center;
	line-height: 1.4;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bcasbe-toast.is-error { background: #ef4444; color: #fff; }
.bcasbe-toast.is-success { background: #10b981; color: #fff; }
.bcasbe-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

@media (max-width: 620px) {
	.bcasbe-row,
	.bcasbe-refine.is-visible,
	.bcasbe-actions {
		grid-template-columns: 1fr;
		flex-direction: column;
	}
}
