/* =============================================================
 * Student Profile / Dashboard screen (/profile/)
 * "Bảng điều khiển" layout — client mockup: user_dashboard.
 *
 * Authored as flat, plain CSS (valid as both .scss and .css) using custom
 * properties so this single source can be copied verbatim to
 * build/profile/style-index.css (the file actually enqueued) without a build
 * step. A future `wp-scripts build` recompiles this to the same output.
 * ============================================================= */

.climastery-profile-block {
	--navy: #002d62;
	--navy-2: #00438b;
	--deep-navy: #002042;
	--orange: #e26d35;
	--secondary: #a23f04;
	--ink: #1a1c1c;
	--muted: #737782;
	--variant: #434751;
	--line: #c3c6d2;
	--line-soft: #e3e2e1;
	--surface: #f4f3f2;

	font-family: 'Montserrat', sans-serif;
	width: 100%;
	padding: 40px 0;
	color: var(--ink);
}

.climastery-profile-block .cmp {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}

/* ---------- Logged-out gate ---------- */
.climastery-profile-block .climastery-profile-gate {
	max-width: 460px;
	margin: 0 auto;
	text-align: center;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 48px 32px;
}
.climastery-profile-block .climastery-profile-gate h2 { color: var(--navy); font-size: 22px; margin: 0 0 10px; }
.climastery-profile-block .climastery-profile-gate p { color: var(--muted); font-size: 14px; margin: 0 0 24px; }

.climastery-profile-block .climastery-profile-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: var(--navy);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	padding: 11px 22px;
	border-radius: 12px;
	transition: background 0.2s ease;
}
.climastery-profile-block .climastery-profile-btn:hover { background: var(--navy-2); color: #fff; }

/* ---------- Identity header ---------- */
.climastery-profile-block .cmp-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	background: #fff;
	border: 1px solid var(--line-soft);
	border-left: 6px solid var(--navy);
	border-radius: 16px;
	padding: 28px 32px;
	margin-bottom: 40px;
}
.climastery-profile-block .cmp-id {
	display: flex;
	align-items: center;
	gap: 24px;
	min-width: 0;
}
.climastery-profile-block .cmp-avatar {
	width: 92px;
	height: 92px;
	flex-shrink: 0;
	border-radius: 14px;
	overflow: hidden;
	background: var(--surface);
	border: 1px solid var(--line-soft);
}
.climastery-profile-block .cmp-avatar img,
.climastery-profile-block .cmp-avatar svg {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 14px;
}
.climastery-profile-block .cmp-name {
	font-size: 30px;
	font-weight: 700;
	color: var(--navy);
	line-height: 1.15;
	margin: 0 0 6px;
	letter-spacing: -0.01em;
}
.climastery-profile-block .cmp-role {
	font-size: 15px;
	font-weight: 500;
	color: var(--ink);
	margin: 0 0 4px;
}
.climastery-profile-block .cmp-email {
	font-size: 12px;
	color: var(--muted);
	margin: 0;
}
.climastery-profile-block .cmp-edit-btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--navy);
	color: var(--navy);
	background: transparent;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	text-decoration: none;
	padding: 11px 22px;
	border-radius: 12px;
	transition: background 0.2s ease, color 0.2s ease;
}
.climastery-profile-block .cmp-edit-btn:hover { background: var(--navy); color: #fff; }

/* ---------- Dashboard grid ---------- */
.climastery-profile-block .cmp-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 36px;
	align-items: start;
}

/* ---------- Tabs ---------- */
.climastery-profile-block .cmp-tabs-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}
.climastery-profile-block .cmp-tabs-row .cmp-tabs { flex: 1 1 auto; }
.climastery-profile-block .cmp-explore-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 28px;
	padding: 11px 20px;
	border-radius: 10px;
	background: var(--navy);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease;
}
.climastery-profile-block .cmp-explore-btn:hover { background: var(--orange); color: #fff; }
.climastery-profile-block .cmp-explore-btn svg { transition: transform 0.2s ease; }
.climastery-profile-block .cmp-explore-btn:hover svg { transform: translateX(3px); }

.climastery-profile-block .cmp-tabs {
	display: flex;
	gap: 28px;
	border-bottom: 1px solid var(--line-soft);
	margin-bottom: 28px;
	overflow-x: auto;
}
.climastery-profile-block .cmp-tab {
	appearance: none;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	padding: 0 0 14px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--variant);
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: color 0.2s ease;
}
.climastery-profile-block .cmp-tab:hover { color: var(--navy); }
.climastery-profile-block .cmp-tab.is-active {
	color: var(--navy);
	font-weight: 700;
	border-bottom-color: var(--navy);
}
.climastery-profile-block .cmp-tab-count {
	font-size: 11px;
	font-weight: 700;
	background: var(--surface);
	color: var(--muted);
	padding: 2px 8px;
	border-radius: 9999px;
}
.climastery-profile-block .cmp-tab.is-active .cmp-tab-count { background: rgba(0, 45, 98, 0.1); color: var(--navy); }

.climastery-profile-block .cmp-panel { display: none; }
.climastery-profile-block .cmp-panel.is-active { display: block; }

/* ---------- Empty state ---------- */
.climastery-profile-block .cmp-empty {
	background: #fff;
	border: 1px dashed var(--line);
	border-radius: 16px;
	padding: 40px;
	text-align: center;
}
.climastery-profile-block .cmp-empty p { color: var(--muted); margin: 0 0 18px; }
.climastery-profile-block .cmp-empty .cmp-btn:last-child { margin-bottom: 0; }

/* ---------- Course cards ---------- */
.climastery-profile-block .cmp-course-list {
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.climastery-profile-block .cmp-course {
	display: flex;
	gap: 24px;
	background: #fff;
	border: 1px solid var(--line-soft);
	border-radius: 16px;
	padding: 22px;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.climastery-profile-block .cmp-course:hover { box-shadow: 0 8px 24px rgba(0, 45, 98, 0.08); }
.climastery-profile-block .cmp-course-thumb {
	flex: 0 0 160px;
	width: 160px;
	align-self: stretch;
	min-height: 120px;
	border-radius: 12px;
	overflow: hidden;
	background: var(--surface);
	display: flex;
	align-items: center;
	justify-content: center;
}
.climastery-profile-block .cmp-course-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(1);
	transition: filter 0.5s ease;
}
.climastery-profile-block .cmp-course:hover .cmp-course-thumb img { filter: grayscale(0); }
.climastery-profile-block .cmp-course-thumb-ph { color: var(--line); }
.climastery-profile-block .cmp-course-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.climastery-profile-block .cmp-course-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}
.climastery-profile-block .cmp-course-cat {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--secondary);
}
.climastery-profile-block .cmp-course-status {
	flex-shrink: 0;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 9999px;
	white-space: nowrap;
}
.climastery-profile-block .cmp-course-status.is-completed { background: rgba(34, 139, 84, 0.12); color: #1f7a4d; }
.climastery-profile-block .cmp-course-status.is-inprogress { background: rgba(226, 109, 53, 0.14); color: var(--orange); }
.climastery-profile-block .cmp-course-status.is-notstarted { background: rgba(115, 119, 130, 0.12); color: var(--muted); }
.climastery-profile-block .cmp-course-title {
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 16px;
}
.climastery-profile-block .cmp-course-title a { color: var(--ink); text-decoration: none; }
.climastery-profile-block .cmp-course-title a:hover { color: var(--navy); }

.climastery-profile-block .cmp-progress { margin-bottom: 18px; }
.climastery-profile-block .cmp-progress-head {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	font-weight: 700;
	color: var(--ink);
	margin-bottom: 8px;
}
.climastery-profile-block .cmp-progress-pct { color: var(--navy); }
.climastery-profile-block .cmp-progress-bar {
	width: 100%;
	height: 6px;
	background: var(--surface);
	border-radius: 9999px;
	overflow: hidden;
}
.climastery-profile-block .cmp-progress-fill {
	height: 100%;
	background: var(--navy);
	border-radius: 9999px;
	transition: width 0.4s ease;
}
.climastery-profile-block .cmp-next {
	font-size: 12px;
	color: var(--variant);
	margin: 10px 0 0;
}
.climastery-profile-block .cmp-course-actions {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-top: auto;
	flex-wrap: wrap;
}
.climastery-profile-block .cmp-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--navy);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	text-decoration: none;
	padding: 11px 26px;
	border-radius: 12px;
	transition: background 0.2s ease;
}
.climastery-profile-block .cmp-btn:hover { background: var(--deep-navy); color: #fff; }
.climastery-profile-block .cmp-cert-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--orange);
	text-decoration: none;
}
.climastery-profile-block .cmp-cert-link:hover { text-decoration: underline; }

/* ---------- Right rail cards ---------- */
.climastery-profile-block .cmp-side {
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.climastery-profile-block .cmp-card {
	background: #fff;
	border: 1px solid var(--line-soft);
	border-radius: 16px;
	padding: 24px;
}
.climastery-profile-block .cmp-card-title {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: var(--navy);
	margin: 0 0 20px;
}

/* Mục tiêu 4 tuần do học viên tự đặt (Round 3) */
.climastery-profile-block .cmp-goal-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}
.climastery-profile-block .cmp-goal-head .cmp-card-title { margin: 0 0 18px; }
.climastery-profile-block .cmp-goal-edit {
	font-size: 12px;
	font-weight: 700;
	color: var(--navy-2);
	text-decoration: none;
	white-space: nowrap;
}
.climastery-profile-block .cmp-goal-edit:hover { text-decoration: underline; }

.climastery-profile-block .cmp-goal-label {
	display: block;
	font-size: 13px;
	line-height: 1.5;
	color: var(--variant);
	margin-bottom: 10px;
}
.climastery-profile-block .cmp-goal-row { display: flex; gap: 10px; }
.climastery-profile-block .cmp-goal-row input[type="number"] {
	width: 88px;
	height: 42px;
	padding: 0 12px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	color: var(--navy);
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #fff;
	box-sizing: border-box;
}
.climastery-profile-block .cmp-goal-save {
	flex: 1;
	height: 42px;
	border: 0;
	border-radius: 10px;
	background: var(--navy);
	color: #fff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease;
}
.climastery-profile-block .cmp-goal-save:hover { background: var(--orange); }

.climastery-profile-block .cmp-goal-numbers {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 12px;
}
.climastery-profile-block .cmp-goal-value { font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1; }
.climastery-profile-block .cmp-goal-target { font-size: 18px; font-weight: 600; color: var(--muted); }
.climastery-profile-block .cmp-goal-unit { font-size: 13px; color: var(--muted); }
.climastery-profile-block .cmp-goal-bar {
	height: 8px;
	width: 100%;
	background: var(--surface);
	border-radius: 9999px;
	overflow: hidden;
}
.climastery-profile-block .cmp-goal-fill {
	height: 100%;
	background: var(--orange);
	border-radius: 9999px;
	transition: width 0.3s ease;
}
.climastery-profile-block .cmp-goal-fill.is-reached { background: #1f9254; }
.climastery-profile-block .cmp-goal-status {
	margin: 12px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: #1f9254;
}
.climastery-profile-block .cmp-goal-mark { margin-top: 14px; }
.climastery-profile-block .cmp-goal-markbtn {
	width: 100%;
	height: 38px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #fff;
	color: var(--navy);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}
.climastery-profile-block .cmp-goal-markbtn:hover { border-color: var(--navy); color: var(--orange); }
.climastery-profile-block .cmp-goal-context {
	margin: 18px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--line-soft);
	font-size: 12px;
	color: var(--muted);
}

/* Calendar */
.climastery-profile-block .cmp-cal-head { margin-bottom: 18px; }
.climastery-profile-block .cmp-cal-head .cmp-card-title { margin: 0; }
.climastery-profile-block .cmp-cal-dow,
.climastery-profile-block .cmp-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
}
.climastery-profile-block .cmp-cal-dow {
	gap: 0 4px;
	margin-bottom: 12px;
}
.climastery-profile-block .cmp-cal-dow span {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--muted);
}
.climastery-profile-block .cmp-cal-grid { gap: 8px 4px; }
.climastery-profile-block .cmp-cal-grid span {
	font-size: 12px;
	color: var(--ink);
	width: 30px;
	height: 30px;
	line-height: 30px;
	margin: 0 auto;
	border-radius: 8px;
}
.climastery-profile-block .cmp-cal-day.is-today {
	background: var(--navy);
	color: #fff;
	font-weight: 700;
}
.climastery-profile-block .cmp-cal-day.is-active {
	color: var(--navy);
	font-weight: 700;
	box-shadow: inset 0 0 0 1px var(--line);
}
.climastery-profile-block .cmp-cal-streak {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--line-soft);
}
.climastery-profile-block .cmp-cal-streak-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	color: var(--variant);
	margin-bottom: 10px;
}
.climastery-profile-block .cmp-cal-streak-val { font-weight: 700; color: var(--navy); }
.climastery-profile-block .cmp-cal-streak-bar {
	height: 4px;
	width: 100%;
	background: var(--surface);
	border-radius: 9999px;
	overflow: hidden;
}
.climastery-profile-block .cmp-cal-streak-fill {
	height: 100%;
	background: var(--orange);
	border-radius: 9999px;
}

/* ---------- Tab "Chứng chỉ": tổng hợp chứng chỉ đã nhận ---------- */
.climastery-profile-block .cmp-cert-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}
.climastery-profile-block .cmp-certcard {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--line-soft);
	border-radius: 16px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.climastery-profile-block .cmp-certcard:hover {
	border-color: var(--line);
	box-shadow: 0 8px 28px rgba(16, 24, 40, 0.08);
}
.climastery-profile-block .cmp-certcard-preview {
	display: block;
	line-height: 0;
	background: var(--surface);
	border-bottom: 1px solid var(--line-soft);
}
.climastery-profile-block .cmp-certcard-ph {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1300 / 1004;
	color: var(--navy);
}
.climastery-profile-block .cmp-certcard-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px 20px;
}
.climastery-profile-block .cmp-certcard-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
}
.climastery-profile-block .cmp-certcard-title a {
	color: var(--ink);
	text-decoration: none;
	transition: color 0.2s ease;
}
.climastery-profile-block .cmp-certcard-title a:hover { color: var(--navy); }
.climastery-profile-block .cmp-certcard-date {
	margin: 0;
	font-size: 12px;
	color: var(--muted);
}
.climastery-profile-block .cmp-certcard-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin-top: 4px;
}
.climastery-profile-block .cmp-certcard-link {
	font-size: 13px;
	font-weight: 700;
	color: var(--navy-2);
	text-decoration: none;
}
.climastery-profile-block .cmp-certcard-link:hover { text-decoration: underline; }

/* ---------- Forum activity slot (rendered by climastery-forum) ---------- */
.climastery-profile-block .climastery-profile-forum {
	background: #fff;
	border: 1px solid var(--line-soft);
	border-left: 6px solid var(--navy);
	border-radius: 16px;
	padding: 28px 32px;
	margin-top: 40px;
}
.climastery-profile-block .climastery-profile-forum .climastery-profile-section-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--navy);
	margin: 0;
}

/* ---------- Community CTA ---------- */
.climastery-profile-block .cmp-cta {
	margin-top: 56px;
	background: #002d62 !important;
	border-left: 6px solid #e26d35;
	border-radius: 16px;
	padding: 44px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
}
.climastery-profile-block .cmp-cta-text { max-width: 640px; }
.climastery-profile-block .cmp-cta-text h2 {
	font-size: 24px;
	font-weight: 600;
	color: #fff;
	margin: 0 0 14px;
}
.climastery-profile-block .cmp-cta-text p {
	font-size: 16px;
	line-height: 1.6;
	color: #d7e3ff;
	margin: 0;
}
.climastery-profile-block .cmp-cta-btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: #e26d35 !important;
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	text-decoration: none;
	padding: 16px 32px;
	border-radius: 12px;
	transition: background 0.2s ease;
}
.climastery-profile-block .cmp-cta-btn:hover { background: #c95b28 !important; color: #fff !important; }

/* Round 3: CTA nằm bên trong khối "Hoạt động diễn đàn" (thay hộp "Bạn chưa tham gia…"). */
.climastery-profile-block .climastery-profile-forum .cmp-cta {
	margin-top: 24px;
	padding: 32px 36px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.climastery-profile-block .cmp-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
	.climastery-profile-block .cmp-header { flex-direction: column; align-items: stretch; }
	.climastery-profile-block .cmp-id { flex-direction: column; text-align: center; }
	.climastery-profile-block .cmp-edit-btn { justify-content: center; }
	.climastery-profile-block .cmp-course { flex-direction: column; }
	.climastery-profile-block .cmp-course-thumb { width: 100%; flex-basis: auto; height: 180px; }
	.climastery-profile-block .cmp-cta { flex-direction: column; align-items: flex-start; padding: 32px; }
}
