@import url('CertCreater-Icons.css');

/* ========================================
   Brand Design Tokens (Pflegecampus)
   ======================================== */

/* Prevent page scroll and hide footer when editor is active */
body:has(.cert-creater) {
	overflow: hidden;
}

body:has(.cert-creater) footer,
body:has(.cert-creater) .debuggerhide,
body:has(.cert-creater) pc-support-chat-button {
	display: none;
}

.cert-creater {
	/* Brand tokens */
	--cc-primary: var(--rd-secondary-active, #4073b6);
	--cc-primary-hover: var(--rd-secondary-hover, #335c92);
	--cc-primary-pressed: var(--rd-secondary-pressed, #26456d);
	--cc-primary-light: var(--rd-secondary-inactive, #d9e3f0);
	--cc-primary-border: #93b4d9;
	--cc-accent: var(--rd-primary-active, #d66181);
	--cc-accent-hover: var(--rd-primary-hover, #ab4e67);
	--cc-accent-pressed: var(--rd-primary-pressed, #803a4d);
	--cc-accent-light: var(--rd-primary-inactive, #fbeff3);
	--cc-text-primary: var(--rd-font-dark, #0d1130);
	--cc-text-secondary: #475569;
	--cc-text-muted: #94a3b8;
	--cc-bg: #f4f6f9;
	--cc-surface: #f1f5f9;
	--cc-surface-light: #f8fafc;
	--cc-input-bg: #ffffff;
	--cc-border: #e2e8f0;
	--cc-border-light: #f1f5f9;
	--cc-header-bg: #ffffff;
	--cc-success: var(--rd-success-default, #89b63f);
	--cc-success-hover: var(--rd-success-hover, #6e9232);
	--cc-error: var(--rd-error-hover, #f43f5e);

	/* Layout */
	display: flex;
	flex-direction: column;
	height: calc(100vh - 145px);
	background: var(--cc-bg);
	border-radius: var(--rd-borderradius-border-lg, 16px);
	overflow: hidden;
	font-family: var(--rd-fontfamilies-open-sans, "Open Sans"), -apple-system, BlinkMacSystemFont, sans-serif;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	border: 1px solid var(--cc-border);
	transition: all 0.3s ease;
}

/* Fullscreen Mode */
.cert-creater--fullscreen {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	min-height: unset;
	border-radius: 0;
	z-index: 9999;
	box-shadow: none;
	border: none;
}

/* ========================================
   Header
   ======================================== */
.cert-creater__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	background: linear-gradient(to bottom, #ffffff, #fafbfc);
	border-bottom: 1px solid #e5e7eb;
	gap: 16px;
	flex-shrink: 0;
}

.cert-creater__header-left,
.cert-creater__header-center,
.cert-creater__header-right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.cert-creater__header-left {
	flex: 1;
	min-width: 0;
}

.cert-creater__header-center {
	flex-shrink: 0;
}

.cert-creater__header-right {
	flex-shrink: 0;
}

.cert-creater__name-input {
	font-size: 18px;
	font-weight: 600;
	color: var(--cc-text-primary, #0d1130);
	background: transparent;
	border: 1px solid transparent;
	border-radius: 6px;
	padding: 6px 10px;
	min-width: 200px;
	max-width: 400px;
	transition: all 0.2s;
}

.cert-creater__name-input:hover {
	border-color: #e5e7eb;
}

.cert-creater__name-input:focus {
	outline: none;
	border-color: var(--cc-primary);
	background: white;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--cc-primary) 10%, transparent);
}

/* Zoom Controls */
.cert-creater__zoom-controls {
	display: flex;
	align-items: center;
	gap: 2px;
	background: #f1f5f9;
	border-radius: 10px;
	padding: 4px;
	border: 1px solid #e5e7eb;
}

.cert-creater__zoom-value {
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	min-width: 55px;
	text-align: center;
	padding: 0 4px;
}

.cert-creater__divider {
	width: 1px;
	height: 24px;
	background: #e5e7eb;
	margin: 0 12px;
}

/* ========================================
   Buttons
   ======================================== */
.cert-creater__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.cert-creater__btn .material-symbols-outlined {
	font-size: 18px;
}

.cert-creater__btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Primary Button */
.cert-creater__btn--primary {
	background: linear-gradient(135deg, var(--cc-primary) 0%, var(--cc-primary-hover) 100%);
	color: white;
	box-shadow: 0 4px 14px color-mix(in srgb, var(--cc-primary) 35%, transparent);
}

.cert-creater__btn--primary:hover:not(:disabled) {
	background: linear-gradient(135deg, var(--cc-primary-hover) 0%, var(--cc-primary-pressed) 100%);
	box-shadow: 0 6px 20px color-mix(in srgb, var(--cc-primary) 45%, transparent);
	transform: translateY(-1px);
}

/* Success Button (temporary state after save) */
.cert-creater__btn--success {
	background: linear-gradient(135deg, var(--cc-success) 0%, var(--cc-success-hover) 100%);
	color: white;
	box-shadow: 0 4px 14px color-mix(in srgb, var(--cc-success) 35%, transparent);
	transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Secondary Button */
.cert-creater__btn--secondary {
	background: white;
	color: #374151;
	border: 1px solid #d1d5db;
}

.cert-creater__btn--secondary:hover:not(:disabled) {
	background: #f9fafb;
	border-color: #9ca3af;
}

/* Danger Button */
.cert-creater__btn--danger {
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
}

.cert-creater__btn--danger:hover:not(:disabled) {
	background: #fee2e2;
	border-color: #fca5a5;
}

/* Icon Button */
.cert-creater__btn--icon {
	padding: 8px;
	background: transparent;
	border-radius: 8px;
	color: #64748b;
}

.cert-creater__btn--icon:hover:not(:disabled) {
	background: #f1f5f9;
	color: #334155;
}

/* Small Button */
.cert-creater__btn--small {
	padding: 6px 12px;
	font-size: 12px;
}

.cert-creater__btn--small .material-symbols-outlined {
	font-size: 16px;
}

/* Full Width Button */
.cert-creater__btn--full {
	width: 100%;
}

/* ========================================
   Main Content Area
   ======================================== */
.cert-creater__main {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	overflow: hidden;
}

/* Toolbar */
.cert-creater__toolbar {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 12px 20px;
	background: #ffffff;
	border-bottom: 1px solid #e5e7eb;
	flex-wrap: wrap;
	flex-shrink: 0;
}

.cert-creater__toolbar-section {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px;
	background: #f8fafc;
	border-radius: 10px;
}

.cert-creater__toolbar-label {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: #94a3b8;
	padding: 0 8px;
}

/* Tool Button */
.cert-creater__tool-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 8px;
	border: none;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	transition: all 0.2s ease;
}

.cert-creater__tool-btn .material-symbols-outlined {
	font-size: 22px;
}

.cert-creater__tool-btn:hover {
	background: #e2e8f0;
	color: #334155;
}

/* Labeled tool button (icon + text below) */
.cert-creater__tool-btn--labeled {
	flex-direction: column;
	width: auto;
	height: auto;
	padding: 6px 10px;
	gap: 2px;
}

.cert-creater__tool-btn-label {
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.cert-creater__tool-btn--active {
	background: var(--cc-primary);
	color: white;
	box-shadow: 0 2px 8px color-mix(in srgb, var(--cc-primary) 35%, transparent);
}

.cert-creater__tool-btn--active:hover {
	background: var(--cc-primary-hover);
}

.cert-creater__tool-btn--danger:hover {
	background: #fef2f2;
	color: #dc2626;
}

/* Color Input */
.cert-creater__color-input {
	width: 38px;
	height: 38px;
	padding: 3px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	cursor: pointer;
	background: white;
	transition: border-color 0.2s;
}

.cert-creater__color-input:hover {
	border-color: #94a3b8;
}

.cert-creater__color-input::-webkit-color-swatch-wrapper {
	padding: 2px;
}

.cert-creater__color-input::-webkit-color-swatch {
	border-radius: 4px;
	border: none;
}

/* ========================================
   Content Layout
   ======================================== */
.cert-creater__content {
	display: flex;
	flex: 1;
	min-height: 0;
	overflow: hidden;
}

/* ========================================
   Canvas Container
   ======================================== */
.cert-creater__canvas-container {
	flex: 1;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 60px 40px 60px 40px;
	overflow: auto;
	background-color: #e8ecf0;
	background-image: 
		radial-gradient(circle, #d0d5dc 1px, transparent 1px);
	background-size: 16px 16px;
}

.cert-creater__canvas {
	position: relative;
	box-shadow: 
		0 25px 50px -12px rgba(0, 0, 0, 0.25),
		0 0 0 1px rgba(0, 0, 0, 0.05);
	border-radius: 4px;
	flex-shrink: 0;
	background-repeat: no-repeat;
	background-color: white;
}

/* ========================================
   Elements on Canvas
   ======================================== */
.cert-creater__element {
	position: absolute;
	user-select: none;
}

.cert-creater__element--selected {
	outline: 2px solid var(--cc-primary);
	outline-offset: -1px;
}

/* Ghost placeholder for empty text elements */
.cert-creater__placeholder-ghost {
	color: #94a3b8;
	font-style: italic;
	pointer-events: none;
	user-select: none;
}

/* Resize Handles */
.cert-creater__resize-handle {
	position: absolute;
	width: 12px;
	height: 12px;
	background: var(--cc-primary);
	border: 2px solid white;
	border-radius: 50%;
	z-index: 10;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cert-creater__resize-handle--nw {
	top: -6px;
	left: -6px;
	cursor: nw-resize;
}

.cert-creater__resize-handle--ne {
	top: -6px;
	right: -6px;
	cursor: ne-resize;
}

.cert-creater__resize-handle--sw {
	bottom: -6px;
	left: -6px;
	cursor: sw-resize;
}

.cert-creater__resize-handle--se {
	bottom: -6px;
	right: -6px;
	cursor: se-resize;
}

.cert-creater__resize-handle--n {
	top: -6px;
	left: 50%;
	transform: translateX(-50%);
	cursor: n-resize;
}

.cert-creater__resize-handle--s {
	bottom: -6px;
	left: 50%;
	transform: translateX(-50%);
	cursor: s-resize;
}

.cert-creater__resize-handle--w {
	top: 50%;
	left: -6px;
	transform: translateY(-50%);
	cursor: w-resize;
}

.cert-creater__resize-handle--e {
	top: 50%;
	right: -6px;
	transform: translateY(-50%);
	cursor: e-resize;
}

/* ========================================
   Side Panels
   ======================================== */
.cert-creater__placeholder-panel,
.cert-creater__properties-panel {
	width: 300px;
	min-width: 300px;
	background: #ffffff;
	border-left: 1px solid #e5e7eb;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	overflow: hidden;
}

.cert-creater__properties-empty {
	padding: 24px 16px;
	color: #9ca3af;
	font-size: 13px;
	text-align: center;
}

.cert-creater__placeholder-panel {
	border-left: none;
	border-right: 1px solid var(--cc-border, #e2e8f0);
}

.cert-creater__panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	font-size: 13px;
	font-weight: 600;
	color: var(--rd-font-dark);
	border-bottom: 1px solid var(--cc-border, #e2e8f0);
	flex-shrink: 0;
}

/* ========================================
   Placeholder Panel
   ======================================== */
.cert-creater__placeholder-list {
	flex: 1;
	overflow-y: auto;
	padding: 8px;
}

.cert-creater__placeholder-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 12px;
	margin-bottom: 4px;
	border-radius: 8px;
	cursor: grab;
	transition: all 0.15s;
	background: var(--cc-surface-light, #f8fafc);
	border: 1px solid transparent;
}

.cert-creater__placeholder-item:hover {
	background: var(--cc-primary-light);
	border-color: var(--cc-primary-border);
}

.cert-creater__placeholder-item:active {
	cursor: grabbing;
}

.cert-creater__placeholder-key {
	font-family: "Fira Code", "Consolas", monospace;
	font-size: 13px;
	font-weight: 600;
	color: var(--cc-primary);
	background: none;
	padding: 0;
}

.cert-creater__placeholder-label {
	font-size: 12px;
	font-weight: 500;
	color: var(--cc-text-primary, #1a202c);
}

.cert-creater__placeholder-example {
	font-size: 11px;
	color: var(--cc-text-muted, #94a3b8);
	font-style: italic;
}

.cert-creater__placeholder-hint {
	padding: 12px 16px;
	font-size: 11px;
	color: var(--cc-text-muted, #94a3b8);
	background: var(--cc-surface-light, #f8fafc);
	border-top: 1px solid var(--cc-border, #e2e8f0);
	flex-shrink: 0;
}

/* ========================================
   Properties Panel
   ======================================== */
.cert-creater__properties-content {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
}

.cert-creater__property-group {
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--cc-border-light, #f1f5f9);
}

.cert-creater__property-group:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

.cert-creater__property-label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--cc-text-muted, #94a3b8);
	margin-bottom: 8px;
}

.cert-creater__property-row {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
}

.cert-creater__property-row:last-child {
	margin-bottom: 0;
}

.cert-creater__property-input {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cert-creater__property-input--full {
	flex: none;
	width: 100%;
}

.cert-creater__property-input label {
	font-size: 11px;
	color: var(--cc-text-secondary, #64748b);
}

.cert-creater__property-input input[type="number"],
.cert-creater__property-input input[type="text"] {
	width: 100%;
	padding: 6px 8px;
	font-size: 13px;
	border: 1px solid var(--cc-border, #e2e8f0);
	border-radius: 6px;
	background: var(--cc-input-bg, #ffffff);
	color: var(--cc-text-primary, #1a202c);
	transition: all 0.15s;
}

.cert-creater__property-input input:focus {
	outline: none;
	border-color: var(--cc-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc-primary) 10%, transparent);
}

.cert-creater__property-input input[type="color"] {
	width: 100%;
	height: 32px;
	padding: 2px;
	border: 1px solid var(--cc-border, #e2e8f0);
	border-radius: 6px;
	cursor: pointer;
	background: transparent;
}

.cert-creater__property-input input[type="range"] {
	flex: 1;
	accent-color: var(--cc-primary);
}

.cert-creater__property-input span {
	font-size: 11px;
	color: var(--cc-text-secondary, #64748b);
	min-width: 35px;
	text-align: right;
}

/* Text Input (Textarea) */
.cert-creater__text-input {
	width: 100%;
	padding: 8px 10px;
	font-size: 13px;
	font-family: inherit;
	border: 1px solid var(--cc-border, #e2e8f0);
	border-radius: 6px;
	background: var(--cc-input-bg, #ffffff);
	color: var(--cc-text-primary, #1a202c);
	resize: vertical;
	min-height: 60px;
	transition: all 0.15s;
}

.cert-creater__text-input:focus {
	outline: none;
	border-color: var(--cc-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc-primary) 10%, transparent);
}

/* Select */
.cert-creater__select {
	width: 100%;
	padding: 6px 8px;
	font-size: 13px;
	border: 1px solid var(--cc-border, #e2e8f0);
	border-radius: 6px;
	background: var(--cc-input-bg, #ffffff);
	color: var(--cc-text-primary, #1a202c);
	cursor: pointer;
	transition: all 0.15s;
}

.cert-creater__select:focus {
	outline: none;
	border-color: var(--cc-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc-primary) 10%, transparent);
}

/* Style Buttons */
.cert-creater__style-buttons {
	display: flex;
	gap: 4px;
	margin-bottom: 8px;
}

.cert-creater__style-buttons:last-child {
	margin-bottom: 0;
}

.cert-creater__style-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	border: 1px solid var(--cc-border, #e2e8f0);
	background: var(--cc-input-bg, #ffffff);
	color: var(--cc-text-secondary, #64748b);
	cursor: pointer;
	transition: all 0.15s;
}

.cert-creater__style-btn .material-symbols-outlined {
	font-size: 18px;
}

.cert-creater__style-btn:hover {
	background: var(--cc-surface, #f1f5f9);
	color: var(--cc-text-primary, #1a202c);
}

.cert-creater__style-btn--active {
	background: var(--cc-primary);
	border-color: var(--cc-primary);
	color: white;
}

/* Layer Buttons */
.cert-creater__layer-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	max-height: 120px;
	overflow-y: auto;
	margin-bottom: 6px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	padding: 4px;
}

.cert-creater__layer-item {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 6px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 11px;
	color: #64748b;
	white-space: nowrap;
	overflow: hidden;
}

.cert-creater__layer-item:hover {
	background: #f1f5f9;
}

.cert-creater__layer-item--active {
	background: var(--cc-primary-light);
	color: var(--cc-primary);
	font-weight: 500;
}

.cert-creater__layer-item .material-symbols-outlined {
	font-size: 14px;
	flex-shrink: 0;
}

.cert-creater__layer-item-label {
	overflow: hidden;
	text-overflow: ellipsis;
}

.cert-creater__layer-buttons {
	display: flex;
	gap: 4px;
}

/* Action Buttons */
.cert-creater__action-buttons {
	display: flex;
	gap: 8px;
}

.cert-creater__action-buttons .cert-creater__btn {
	flex: 1;
}

/* ========================================
   Status Bar
   ======================================== */
.cert-creater__statusbar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	font-size: 11px;
	color: var(--cc-text-muted, #94a3b8);
	background: var(--cc-header-bg, #ffffff);
	border-top: 1px solid var(--cc-border, #e2e8f0);
	flex-shrink: 0;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 1024px) {
	.cert-creater__placeholder-panel,
	.cert-creater__properties-panel {
		width: 250px;
	}
}

@media (max-width: 768px) {
	.cert-creater__header {
		flex-wrap: wrap;
		padding: 12px;
	}

	.cert-creater__header-left {
		order: 1;
		flex: 1 1 100%;
		margin-bottom: 8px;
	}

	.cert-creater__header-center {
		order: 2;
	}

	.cert-creater__header-right {
		order: 3;
	}

	.cert-creater__name-input {
		min-width: 100%;
		max-width: 100%;
	}

	.cert-creater__content {
		flex-direction: column;
	}

	.cert-creater__placeholder-panel,
	.cert-creater__properties-panel {
		width: 100%;
		max-height: 250px;
		border-left: none;
		border-right: none;
		border-top: 1px solid var(--cc-border, #e2e8f0);
	}

	.cert-creater__canvas-container {
		padding: 16px;
	}
}

/* ========================================
   Modal / Certificate List
   ======================================== */
.cert-creater__modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	backdrop-filter: blur(4px);
}

.cert-creater__modal {
	background: white;
	border-radius: 16px;
	width: 90%;
	max-width: 600px;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	overflow: hidden;
}

.cert-creater__modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #e5e7eb;
	background: linear-gradient(to bottom, #ffffff, #fafbfc);
}

.cert-creater__modal-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--cc-text-primary, #0d1130);
}

.cert-creater__modal-content {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
}

.cert-creater__modal-search {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	border-bottom: 1px solid #e5e7eb;
	background: #ffffff;
}

.cert-creater__modal-search .material-symbols-outlined {
	color: #64748b;
	font-size: 20px;
}

.cert-creater__modal-search-input {
	width: 100%;
	height: 36px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 0 10px;
	font-size: 14px;
	color: var(--cc-text-primary, #0d1130);
	background: #f8fafc;
	outline: none;
}

.cert-creater__modal-search-input:focus {
	border-color: var(--cc-primary);
	background: #ffffff;
}

.cert-creater__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	color: #64748b;
	font-size: 14px;
}

.cert-creater__no-certs {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	color: #94a3b8;
	font-size: 14px;
}

.cert-creater__list-item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
	border: 1px solid #e5e7eb;
	margin-bottom: 8px;
}

.cert-creater__list-item:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
}

.cert-creater__list-item--new {
	background: linear-gradient(135deg, var(--cc-primary-light) 0%, var(--cc-surface) 100%);
	border-color: var(--cc-primary-border);
	color: var(--cc-primary-pressed);
	font-weight: 500;
}

.cert-creater__list-item--new:hover {
	background: linear-gradient(135deg, var(--cc-primary-light) 0%, var(--cc-primary-light) 100%);
	border-color: var(--cc-primary);
}

.cert-creater__list-item--new .material-symbols-outlined {
	font-size: 24px;
}

.cert-creater__list-item-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cert-creater__list-item-title {
	font-size: 15px;
	font-weight: 500;
	color: var(--cc-text-primary, #0d1130);
}

.cert-creater__list-item-meta {
	font-size: 12px;
	color: #64748b;
	display: flex;
	align-items: center;
	gap: 8px;
}

.cert-creater__list-item > .material-symbols-outlined {
	color: #94a3b8;
}

/* ========================================
   Badges
   ======================================== */
.cert-creater__badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 6px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.cert-creater__badge--public {
	background: #dcfce7;
	color: #166534;
}

.cert-creater__badge--custom {
	background: #fef3c7;
	color: #92400e;
}

.cert-creater__badge--new {
	background: var(--cc-primary-light);
	color: var(--cc-primary);
}

.cert-creater__badge--clickable {
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.15s ease;
}

.cert-creater__badge--clickable:hover {
	border-color: currentColor;
	opacity: 0.85;
}

/* ========================================
   Error Banner
   ======================================== */
.cert-creater__error-banner {
	background: #fef2f2;
	color: #dc2626;
	padding: 12px 20px;
	font-size: 13px;
	border-bottom: 1px solid #fecaca;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ========================================
   Info Banner
   ======================================== */
.cert-creater__info-banner {
	background: var(--cc-primary-light);
	color: var(--cc-primary-pressed);
	padding: 12px 20px;
	font-size: 13px;
	border-bottom: 1px solid var(--cc-primary-border);
	display: flex;
	align-items: center;
	gap: 8px;
}

.cert-creater__info-banner .material-symbols-outlined {
	font-size: 18px;
}

/* ========================================
   Danger Icon Button
   ======================================== */
.cert-creater__btn--danger-icon {
	color: #64748b;
}

.cert-creater__btn--danger-icon:hover:not(:disabled) {
	background: #fef2f2;
	color: #dc2626;
}

/* ========================================
   Preview Modal
   ======================================== */
.cert-creater__preview-modal {
	background: white;
	border-radius: 16px;
	width: 95%;
	max-width: 900px;
	height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	overflow: hidden;
}

.cert-creater__preview-modal .cert-creater__modal-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 24px;
	border-bottom: 1px solid #e5e7eb;
	background: #f8fafc;
}

.cert-creater__preview-modal .cert-creater__modal-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
}

.cert-creater__preview-hint {
	font-size: 13px;
	color: #64748b;
	flex: 1;
}

.cert-creater__modal-header-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.cert-creater__preview-content {
	flex: 1;
	overflow: hidden;
	background: #e8ecf0;
}

.cert-creater__preview-iframe {
	width: 100%;
	height: 100%;
	border: none;
	background: white;
}

.cert-creater__preview-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 100%;
	color: #64748b;
}

.cert-creater__spinner {
	animation: spin 1s linear infinite;
	font-size: 32px;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}
