/* CursoAI Generator - Estilos do Frontend */

.cursoai-wrapper {
	max-width: 720px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1f2937;
}

.cursoai-card {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	padding: 32px;
}

.cursoai-title {
	font-size: 24px;
	font-weight: 700;
	margin-bottom: 4px;
}

.cursoai-subtitle {
	color: #6b7280;
	margin-bottom: 24px;
}

.cursoai-field {
	margin-bottom: 18px;
}

.cursoai-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}

.cursoai-field input,
.cursoai-field select {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font-size: 15px;
}

.cursoai-field textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font-size: 15px;
	font-family: inherit;
	resize: vertical;
}

.cursoai-field-opcional {
	font-weight: 400;
	color: #9ca3af;
	font-size: 12px;
	margin-left: 6px;
}

.cursoai-contador {
	display: block;
	text-align: right;
	font-size: 12px;
	color: #9ca3af;
	margin-top: 4px;
}

.cursoai-btn {
	width: 100%;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	border: none;
	padding: 14px 20px;
	border-radius: 12px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.cursoai-btn:hover {
	transform: translateY(-1px);
	opacity: 0.95;
}

.cursoai-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.cursoai-loading {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
	color: #6366f1;
	font-weight: 500;
}

.cursoai-spinner {
	width: 20px;
	height: 20px;
	border: 3px solid #e0e7ff;
	border-top-color: #6366f1;
	border-radius: 50%;
	animation: cursoai-spin 0.8s linear infinite;
}

@keyframes cursoai-spin {
	to {
		transform: rotate(360deg);
	}
}

.cursoai-erro {
	margin-top: 14px;
	background: #fee2e2;
	color: #991b1b;
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 14px;
}

/* Página do curso */
.cursoai-curso-header h1 {
	font-size: 28px;
	margin: 12px 0 4px;
}

.cursoai-meta {
	color: #6b7280;
	margin-bottom: 24px;
}

.cursoai-capa img {
	width: 100%;
	border-radius: 16px;
}

.cursoai-sumario {
	background: #f9fafb;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 24px;
}

.cursoai-sumario ol {
	margin: 8px 0 0 20px;
}

.cursoai-capitulo {
	padding: 24px 0;
	border-bottom: 1px solid #e5e7eb;
}

.cursoai-dica {
	background: #fef3c7;
	padding: 12px 16px;
	border-radius: 10px;
	margin-top: 12px;
	font-size: 14px;
}

.cursoai-btn-melhorar {
	margin-top: 12px;
	background: #e0e7ff;
	color: #4338ca;
	border: none;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 13px;
	cursor: pointer;
}

.cursoai-quiz {
	margin-top: 32px;
}

.cursoai-questao {
	margin-bottom: 20px;
	padding: 16px;
	background: #f9fafb;
	border-radius: 12px;
}

.cursoai-alternativa {
	display: block;
	padding: 8px 0;
	cursor: pointer;
}

.cursoai-aviso {
	padding: 14px 18px;
	border-radius: 10px;
	margin-top: 16px;
	font-weight: 500;
}

.cursoai-aviso-sucesso {
	background: #d1fae5;
	color: #065f46;
}

.cursoai-aviso-erro {
	background: #fee2e2;
	color: #991b1b;
}

.cursoai-preco {
	font-size: 24px;
	font-weight: 700;
	color: #6366f1;
	margin: 8px 0 16px;
}

/* Catálogo de cursos publicados */
.cursoai-catalogo-wrapper {
	max-width: 1080px;
}

.cursoai-catalogo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
	margin-top: 20px;
}

.cursoai-catalogo-card {
	display: block;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cursoai-catalogo-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.cursoai-catalogo-thumb img {
	width: 100%;
	height: 140px;
	object-fit: cover;
	display: block;
}

.cursoai-catalogo-thumb-placeholder {
	height: 140px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 40px;
	background: linear-gradient(135deg, #ede9fe, #ddd6fe);
}

.cursoai-catalogo-body {
	padding: 14px 16px;
}

.cursoai-catalogo-body h3 {
	font-size: 16px;
	margin: 0 0 6px;
}

.cursoai-catalogo-excerpt {
	font-size: 13px;
	color: #6b7280;
	margin: 0 0 10px;
}

.cursoai-catalogo-meta {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: #4b5563;
}

.cursoai-catalogo-preco {
	font-weight: 700;
	color: #6366f1;
}

/* Tabela "Meus cursos" */
.cursoai-tabela {
	width: 100%;
	border-collapse: collapse;
}

.cursoai-tabela th,
.cursoai-tabela td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid #e5e7eb;
}

.cursoai-badge {
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.cursoai-badge-ok {
	background: #d1fae5;
	color: #065f46;
}

.cursoai-badge-warning {
	background: #fef3c7;
	color: #92400e;
}

.cursoai-badge-erro {
	background: #fee2e2;
	color: #991b1b;
}
