/**
 * AR TMC Courses — Frontend Editor Styles (Argon)
 */

.artmc-ced-editor,
.artmc-ced-manage {
	font-family: 'Cairo', system-ui, sans-serif;
	max-width: 920px;
	margin: 0 auto;
	padding: 0 16px;
}

.artmc-ced-ed-notice {
	background: #faf5ff;
	border-right: 4px solid #6f42c1;
	padding: 16px 20px;
	border-radius: 8px;
	color: #475569;
	margin: 16px 0;
	font-family: 'Cairo', sans-serif;
}

/* ============================================================
 * HEADER
 * ============================================================ */

.artmc-ced-ed-header {
	margin: 24px 0 18px;
}
.artmc-ced-ed-header h2 {
	font-size: 26px;
	font-weight: 800;
	color: #6f42c1;
	margin: 0;
}
.artmc-ced-ed-editing {
	display: inline-block;
	margin-top: 6px;
	color: #64748b;
	font-size: 14px;
}

/* ============================================================
 * JSON PASTE PANEL
 * ============================================================ */

.artmc-ced-ed-json-panel {
	background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
	border: 1px solid #d8b4fe;
	border-radius: 14px;
	padding: 20px;
	margin-bottom: 24px;
}
.artmc-ced-ed-json-panel h3 {
	margin: 0 0 6px;
	color: #6f42c1;
	font-size: 17px;
}
.artmc-ced-ed-json-panel p {
	margin: 0 0 12px;
	color: #64748b;
	font-size: 13px;
}
.artmc-ced-ed-json-panel textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #d8b4fe;
	border-radius: 10px;
	font-family: 'Courier New', monospace;
	font-size: 13px;
	background: white;
	resize: vertical;
	direction: ltr;
	text-align: left;
}
.artmc-ced-ed-json-panel textarea:focus {
	outline: none;
	border-color: #a855f7;
}
.artmc-ced-ed-json-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 12px;
}

/* ============================================================
 * FORM SECTIONS
 * ============================================================ */

.artmc-ced-ed-section {
	background: white;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 22px;
	margin-bottom: 18px;
}
.artmc-ced-ed-section h3 {
	margin: 0 0 16px;
	font-size: 17px;
	color: #1a1a2e;
	font-weight: 700;
	padding-bottom: 10px;
	border-bottom: 2px solid #faf5ff;
}
.artmc-ced-ed-hint {
	color: #64748b;
	font-size: 13px;
	margin: 0 0 12px;
}

.artmc-ced-ed-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.artmc-ced-ed-field { display: flex; flex-direction: column; }
.artmc-ced-ed-wide { grid-column: 1 / -1; }

.artmc-ced-ed-field label {
	font-size: 13px;
	font-weight: 700;
	color: #475569;
	margin-bottom: 6px;
}
.artmc-ced-ed-field input[type=text],
.artmc-ced-ed-field input[type=url],
.artmc-ced-ed-field input[type=number],
.artmc-ced-ed-field input[type=email],
.artmc-ced-ed-field input[type=datetime-local],
.artmc-ced-ed-field textarea,
.artmc-ced-ed-field select {
	padding: 10px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	font-family: 'Cairo', sans-serif;
	font-size: 14px;
	background: #fafbfc;
	width: 100%;
}
.artmc-ced-ed-field input:focus,
.artmc-ced-ed-field textarea:focus,
.artmc-ced-ed-field select:focus {
	outline: none;
	border-color: #a855f7;
	background: white;
}

/* ============================================================
 * IMAGE PICKER
 * ============================================================ */

.artmc-ced-ed-image-picker {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.artmc-ced-ed-image-preview {
	width: 180px;
	height: 110px;
	border-radius: 10px;
	background: #f1f5f9;
	border: 2px dashed #d8b4fe;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.artmc-ced-ed-image-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ============================================================
 * BUTTONS
 * ============================================================ */

.artmc-ced-ed-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	border: 1px solid #e2e8f0;
	background: white;
	color: #475569;
	border-radius: 10px;
	font-family: 'Cairo', sans-serif;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s;
}
.artmc-ced-ed-btn:hover {
	border-color: #a855f7;
	color: #6f42c1;
	text-decoration: none;
}
.artmc-ced-ed-btn-primary {
	background: linear-gradient(135deg, #6f42c1, #5a32a3);
	color: white;
	border-color: transparent;
}
.artmc-ced-ed-btn-primary:hover {
	color: white;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(111, 66, 193, 0.3);
}
.artmc-ced-ed-btn-lg { padding: 14px 28px; font-size: 15px; }
.artmc-ced-ed-btn-sm { padding: 6px 12px; font-size: 12px; }

.artmc-ced-ed-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 24px 0;
}

/* ============================================================
 * MESSAGES
 * ============================================================ */

#artmc-ced-json-msg,
#artmc-ced-ed-msg {
	font-size: 13px;
	font-weight: 600;
}
.is-error   { color: #dc2626; }
.is-success { color: #059669; }
.is-info    { color: #6f42c1; }

/* ============================================================
 * MANAGE TABLE
 * ============================================================ */

.artmc-ced-manage-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 24px 0 18px;
}
.artmc-ced-manage-head h2 {
	font-size: 24px;
	font-weight: 800;
	color: #6f42c1;
	margin: 0;
}

.artmc-ced-manage-table {
	width: 100%;
	border-collapse: collapse;
	background: white;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
}
.artmc-ced-manage-table th {
	background: #faf5ff;
	color: #475569;
	padding: 12px 16px;
	text-align: right;
	font-weight: 700;
	font-size: 13px;
}
.artmc-ced-manage-table td {
	padding: 12px 16px;
	border-top: 1px solid #f1f5f9;
	font-size: 14px;
}
.artmc-ced-manage-table tr:hover td { background: #fafbfc; }

.artmc-ced-manage-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}
.artmc-ced-manage-status.status-publish { background: #dcfce7; color: #166534; }
.artmc-ced-manage-status.status-draft   { background: #fef3c7; color: #92400e; }
.artmc-ced-manage-status.status-pending { background: #dbeafe; color: #1e40af; }

.artmc-ced-ed-empty {
	text-align: center;
	padding: 40px 20px;
	background: #fafbfc;
	border-radius: 12px;
	color: #64748b;
}

/* ============================================================
 * RESPONSIVE
 * ============================================================ */

@media (max-width: 680px) {
	.artmc-ced-ed-grid { grid-template-columns: 1fr; }
	.artmc-ced-manage-head { flex-direction: column; gap: 12px; align-items: stretch; }
	.artmc-ced-ed-actions { flex-direction: column; align-items: stretch; }
	.artmc-ced-manage-table { font-size: 12px; }
	.artmc-ced-manage-table th, .artmc-ced-manage-table td { padding: 8px 10px; }
}
