/*
 * Editor Styles for ccframe
 * Mirrors theme.json styles that the editor cannot fully apply.
 */

/* --- Base --- */
.editor-styles-wrapper {
	font-family: "Inter", "Helvetica Neue", "Yu Gothic", "Noto Sans JP", sans-serif;
	color: #2d3748;
	line-height: 1.85;
	-webkit-font-smoothing: antialiased;
}

/* --- Headings --- */
.editor-styles-wrapper h2 {
	border-left: 3px solid #2563eb;
	padding-left: 0.8rem;
}

.editor-styles-wrapper h3 {
	border: none;
}

/* --- Links --- */
.editor-styles-wrapper a {
	color: #2563eb;
	text-decoration: underline;
	text-decoration-color: rgba(37,99,235,0.25);
	text-underline-offset: 3px;
}

.editor-styles-wrapper a:hover {
	color: #1d4ed8;
}

/* --- Code --- */
.editor-styles-wrapper pre {
	background: #f1f5f9;
	border: 1px solid #eef0f3;
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
	font-size: 0.85rem;
	line-height: 1.5;
}

.editor-styles-wrapper code {
	background: #edf2f7;
	border-radius: 3px;
	padding: 0.1rem 0.35rem;
	font-size: 0.87em;
}

.editor-styles-wrapper pre code {
	background: none;
	padding: 0;
	border-radius: 0;
}

/* --- Blockquote --- */
.editor-styles-wrapper blockquote {
	border-left: 3px solid #2563eb;
	background: #edf2f7;
	border-radius: 0 8px 8px 0;
	padding: 0.9rem 1.2rem;
	font-size: 0.95rem;
}

/* --- Info Boxes (pattern preview support) --- */
.info-box-official,
.info-box-result,
.info-box-warning,
.info-box-opinion,
.info-box-note {
	border-radius: 8px;
	padding: 1rem 1.2rem;
	margin: 1.5rem 0;
	font-size: 0.95rem;
}

.info-box-official { background: #eff6ff; border: 1px solid #bfdbfe; border-left: 4px solid #2563eb; }
.info-box-result  { background: #f0fdf4; border: 1px solid #bbf7d0; border-left: 4px solid #16a34a; }
.info-box-warning { background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid #d97706; }
.info-box-opinion { background: #faf5ff; border: 1px solid #e9d5ff; border-left: 4px solid #7c3aed; }
.info-box-note    { background: #edf2f7; border: 1px solid #eef0f3; border-left: 4px solid #718096; }

/* --- Selection --- */
.editor-styles-wrapper ::selection {
	background: rgba(37,99,235,0.15);
	color: #1a1a2e;
}


/* ============================================================
 * note / zenn style — Card & Interaction Design
 * ============================================================ */

/* --- Card Base --- */
.ccframe-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	overflow: hidden;
}
.ccframe-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	transform: translateY(-2px);
}

/* --- Category Badge (inline chip) --- */
.ccframe-badge {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 500;
	padding: 0.15rem 0.5rem;
	border-radius: 4px;
	background: #dbeafe;
	color: #2563eb;
	line-height: 1.4;
}

/* --- Archive / Search Post Card (thumbnail left) --- */
.wp-block-group.ccframe-post-card {
	display: flex !important;
	gap: 1rem;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	padding: 1rem;
	transition: box-shadow 0.2s ease;
	margin-bottom: 0.75rem;
}
.wp-block-group.ccframe-post-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.wp-block-group.ccframe-post-card .wp-block-post-featured-image {
	flex-shrink: 0;
	margin: 0;
}
.wp-block-group.ccframe-post-card .wp-block-post-featured-image a {
	display: block;
}
.wp-block-group.ccframe-post-card .wp-post-image {
	width: 120px;
	height: auto;
	border-radius: 6px;
}
.ccframe-post-card .ccframe-post-body {
	flex: 1;
	min-width: 0;
}
.ccframe-post-card .ccframe-post-title {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.5;
	color: #1a1a2e;
	margin: 0 0 0.25rem 0;
}
.ccframe-post-card .ccframe-post-title a {
	text-decoration: none;
	color: inherit;
}
.ccframe-post-card .ccframe-post-title a:hover {
	color: #2563eb;
}
.ccframe-post-card .ccframe-post-meta {
	font-size: 0.75rem;
	color: #718096;
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-bottom: 0.3rem;
}
.ccframe-post-card .ccframe-post-excerpt {
	font-size: 0.82rem;
	color: #718096;
	line-height: 1.6;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* --- Learning Path Step Number (circle) --- */
.ccframe-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: #2563eb;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1;
}

/* --- Header shadow (replaces border) --- */
.ccframe-header {
	box-shadow: 0 1px 0 rgba(0,0,0,0.06);
	border-bottom: none !important;
}

/* --- Single Post Meta --- */
.ccframe-meta-badge {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 500;
	padding: 0.2rem 0.6rem;
	border-radius: 4px;
	background: #f1f5f9;
	color: #718096;
	margin-right: 0.4rem;
}
.ccframe-meta-badge a {
	text-decoration: none;
	color: inherit;
}
.ccframe-meta-badge a:hover {
	color: #2563eb;
}
.ccframe-meta-badge--category {
	background: #dbeafe;
	color: #2563eb;
}

/* --- Title Divider (single post) --- */
.ccframe-title-divider {
	height: 3px;
	width: 60px;
	background: linear-gradient(90deg, #2563eb, #7c3aed);
	border-radius: 2px;
	margin: 0.75rem 0 0;
}

/* --- Footer --- */
.ccframe-footer {
	background: linear-gradient(180deg, #1a1a2e 0%, #0f172a 100%);
}

/* --- Responsive: mobile card stack --- */
@media (max-width: 600px) {
	.ccframe-post-card {
		flex-direction: column;
	}
	.ccframe-post-card .ccframe-post-thumb {
		width: 100%;
		height: 120px;
	}
}
