/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* 通用：keep the text widget below the video widget */
.elementor-element.elementor-element-0e7b90b>.e-con-inner {
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.elementor-element.elementor-element-94ccc93,
.elementor-element.elementor-element-d777743 {
	width: 100%;
	max-width: 100%;
}

.elementor-element.elementor-element-d777743 {
	position: static !important;
	z-index: auto !important;
	margin-top: 24px !important;
}

.elementor-element.elementor-element-94ccc93 .video-container {
	position: relative;
	isolation: isolate;
}

.elementor-element.elementor-element-94ccc93 .video-container iframe {
	display: block;
}

@media (max-width: 767px) {
	.page-id-797 .elementor-797 .elementor-element.elementor-element-d777743 {
		margin-top: 16px !important;
	}
}

.cwy-dashboard-filter-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	width: 100%;
	margin-bottom: 24px;
	margin-left: 0;
	margin-right: 0;
	--tutor-gutter-x: 0;
	--tutor-gutter-y: 0;
}

.cwy-dashboard-filter-row>[class*='tutor-col'] {
	min-width: 0;
	width: auto;
	max-width: none;
	flex: 0 0 auto;
	padding-left: 0;
	padding-right: 0;
	margin-top: 0;
}

.cwy-dashboard-filter-field {
	position: relative;
}

.cwy-dashboard-filter-row .tutor-form-select,
.cwy-dashboard-filter-row .tutor-js-form-select,
.cwy-dashboard-filter-row .tutor-v2-date-picker,
.cwy-dashboard-filter-row .tutor-form-wrap,
.cwy-dashboard-filter-row .tutor-form-control {
	width: 100%;
}

.cwy-dashboard-filter-row .tutor-js-form-select {
	position: relative;
}

.cwy-dashboard-filter-row .tutor-js-form-select.is-active {
	z-index: 40;
}

.cwy-dashboard-filter-row .tutor-form-label {
	display: block;
	margin-bottom: 12px;
}

.cwy-dashboard-filter-row .tutor-form-select-label {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cwy-dashboard-filter-row .tutor-form-select-dropdown {
	width: 100%;
	min-width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.cwy-dashboard-filter-row .tutor-form-select-options {
	max-height: 320px;
	overflow: auto;
}

.cwy-dashboard-filter-row .tutor-form-select-search {
	position: sticky;
	top: 0;
	z-index: 1;
	background: #fff;
}

@media (min-width: 768px) {
	.cwy-dashboard-filter-row--assignments {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cwy-dashboard-filter-row--enrolled-courses {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 992px) {
	.cwy-dashboard-filter-row--enrolled-courses {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.cwy-dashboard-filter-row--enrolled-courses .cwy-dashboard-filter-field {
		max-width: none;
	}
}

@media (min-width: 1280px) {
	.cwy-dashboard-filter-row--assignments {
		grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr));
	}
}

.cwy-course-access-badge {
	display: inline-flex;
	align-items: center;
	padding: 5px 10px;
	margin-bottom: 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
}

.cwy-course-access-badge--subscription {
	background: #ecfeff;
	color: #0f766e;
}

.cwy-course-access-badge--lifetime {
	background: #fff7ed;
	color: #c2410c;
}

.cwy-renewal-required-card {
	display: grid;
	gap: 8px;
	width: 100%;
	padding: 12px;
	border: 1px solid #fed7aa;
	border-radius: 8px;
	background: #fff7ed;
}

.cwy-renewal-required-card__label {
	color: #9a3412;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.3;
}

.cwy-renewal-required-card__text {
	margin: 0;
	color: #57534e;
	font-size: 13px;
	line-height: 1.5;
}

.cwy-renewal-required-card__button {
	justify-content: center;
	width: 100%;
	min-height: 40px;
	border-radius: 8px;
}

.cwy-renewal-required-card--processing {
	background: #eff6ff;
	border-color: #bfdbfe;
}

.cwy-renewal-required-card--processing .cwy-renewal-required-card__label {
	color: #1d4ed8;
}

.cwy-renewal-required-card__spinner {
	font-size: 28px;
	line-height: 1;
	text-align: center;
	animation: cwy-hourglass-flip 2s ease-in-out infinite;
	display: block;
}

@keyframes cwy-hourglass-flip {

	0%,
	40% {
		transform: rotate(0deg);
	}

	50%,
	90% {
		transform: rotate(180deg);
	}

	100% {
		transform: rotate(180deg);
	}
}

.tutor-dashboard-content-inner.enrolled-courses .tutor-card .cwy-renewal-required-card {
	margin-top: 8px;
}

.tutor-dashboard-content-inner.enrolled-courses .tutor-card .list-item-button,
.tutor-dashboard-content-inner.enrolled-courses .tutor-card .tutor-card-footer {
	gap: 10px;
}

.tutor-dashboard-content-inner.enrolled-courses .tutor-card .list-item-button {
	align-items: stretch;
}

.tutor-dashboard-content-inner.enrolled-courses .tutor-card .list-item-button .tutor-btn {
	min-height: 42px;
	border-radius: 8px;
	white-space: normal;
	line-height: 1.35;
}

.tutor-dashboard-content-inner.enrolled-courses .tutor-card .tutor-course-price,
.tutor-dashboard-content-inner.enrolled-courses .tutor-card .price {
	line-height: 1.35;
}

/* ── 修正：Tutor 登入 Modal 圖層層級 ──────────────────────────
   問題：modal 被渲染在 sidebar 容器內，若父層有 transform/
   isolation 等 CSS 會建立新的 stacking context，導致
   position:fixed 的 z-index 參考系被限縮而無法浮到最上層。
   修法：JS teleport（見 functions.php）+ CSS 強化 z-index。
   ─────────────────────────────────────────────────────────── */
.tutor-login-modal {
	z-index: 2147483647 !important;
	/* 32-bit int max */
}

.tutor-login-modal .tutor-modal-overlay {
	position: fixed !important;
	z-index: -1 !important;
}

/* ── 教室頁 Hero：圖片左 + 資訊右（電腦）────────────────── */

/* Hero：左右兩欄（電腦），上下堆疊（手機） */
.cwy-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	column-gap: 3rem;
	margin-bottom: 48px;
	align-items: start;
}

/* 下方內容列：左右兩欄，欄寬與 hero 一致 */
.cwy-content-row {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	column-gap: 3rem;
	align-items: start;
}

/* sidebar 只佔自身高度，sticky 才能運作 */
.cwy-content-row>aside {
	align-self: start;
}

.cwy-content-row>aside .tutor-single-course-sidebar {
	position: sticky;
	top: calc(var(--sidebar-offset, 50px) + var(--admin-bar, 0px));
}

.cwy-hero-media {
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 確保媒體子元素全寬（不含 .cwy-hero-media 本身） */
.cwy-hero-media>*,
.cwy-hero-media img,
.cwy-hero-media video,
.cwy-hero-media iframe,
.cwy-hero-media .tutor-video-player,
.cwy-hero-media .tutor-course-thumbnail,
.cwy-hero-media .tutor-course-thumbnail a,
.cwy-hero-media .tutor-course-thumbnail img,
.cwy-hero-media .tutor-video-wraaper,
.cwy-hero-media .tutor-video-wraaper video,
.cwy-hero-media .tutor-video-wraaper iframe {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	display: block;
	border-radius: 8px;
}

.cwy-hero-media .tutor-video-wraaper {
	position: relative;
	padding-bottom: 56.25%;
	height: 0 !important;
	overflow: hidden;
	border-radius: 8px;
}

.cwy-hero-media .tutor-video-wraaper iframe,
.cwy-hero-media .tutor-video-wraaper video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	border-radius: 8px;
}

/* 右側資訊區 */
.cwy-hero-info {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	text-align: left;
	align-self: start;
	gap: 14px;
	min-width: 0;
	padding-top: 8px;
}

/* 右側側欄（desktop）固定追隨滾動 */
@media (min-width: 992px) {
	.cwy-content-row {
		position: relative;
		/* sticky 參考點：讓側欄絕對定位時以這個容器為參考 */
	}

	/* 讓側欄卡片對齊左側 nav 底部 */
	.cwy-content-row>aside {
		margin-top: 74px;
	}

	.cwy-content-row>aside .tutor-single-course-sidebar {
		position: -webkit-sticky;
		position: sticky;
		top: calc(var(--sidebar-offset, 50px) + var(--admin-bar, 0px));
		z-index: 50;
		max-height: calc(100vh - (calc(var(--sidebar-offset, 50px) + var(--admin-bar, 0px)) + 24px));
		overflow: auto;
	}

	/* 小幅 padding 讓內部 card 不會貼邊 */
	.cwy-content-row>aside .tutor-single-course-sidebar .tutor-sidebar-card {
		margin-bottom: 12px;
	}
}

/* 老師 + 作業指導 */
.cwy-hero-author {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0;
}

/* 標題 */
.cwy-hero-title {
	font-size: 1.85rem;
	font-weight: 700;
	line-height: 1.35;
	color: #111827;
	margin: 4px 0 0;
}

/* 評分 */
.cwy-hero-rating {
	display: flex;
	align-items: center;
}

/* 課程描述 */
.cwy-hero-excerpt-wrap {
	margin: 4px 0 0;
}

.cwy-hero-excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: #555;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.cwy-hero-excerpt.is-expanded {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
}

.cwy-excerpt-toggle {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 6px;
	background: none;
	border: none;
	padding: 0;
	font-size: 13px;
	color: var(--linkColor, #4a6cf7);
	cursor: pointer;
	font-weight: 500;
}

.cwy-excerpt-toggle:hover {
	text-decoration: underline;
}

.cwy-excerpt-toggle .cwy-excerpt-icon {
	display: inline-block;
	transition: transform 0.2s ease;
	font-style: normal;
}

.cwy-excerpt-toggle[aria-expanded="true"] .cwy-excerpt-icon {
	transform: rotate(180deg);
}

/* chips */
.cwy-hero-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* 按鈕區 */
.cwy-hero-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ── lead-info 通用元件 ────────────────────────────────── */

/* 老師連結 */
.cwy-author-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
	font-weight: 600;
	font-size: 15px;
	transition: opacity 0.2s;
}

.cwy-author-link:hover {
	opacity: 0.75;
	text-decoration: none;
	color: inherit;
}

.cwy-author-name {
	white-space: nowrap;
}

/* 分隔線 */
.cwy-lead-sep {
	display: inline-block;
	width: 1px;
	height: 20px;
	background: #d1d5db;
	margin: 0 14px;
	flex-shrink: 0;
}

/* 作業指導 */
.cwy-grading-block {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.cwy-grading-label {
	font-size: 13px;
	color: #6b7280;
	white-space: nowrap;
}

.cwy-grading-avatars {
	display: inline-flex;
	align-items: center;
}

.cwy-grading-avatars .cwy-grading-avatar {
	margin-left: -4px;
}

.cwy-grading-avatars .cwy-grading-avatar:first-child {
	margin-left: 0;
}

.cwy-grading-avatar .tutor-avatar,
.cwy-grading-avatar img {
	width: 28px !important;
	height: 28px !important;
	border-radius: 50%;
	box-sizing: content-box;
}

.cwy-grading-avatar .tutor-avatar span {
	width: 28px !important;
	height: 28px !important;
	font-size: 11px !important;
	line-height: 28px !important;
}

/* chips */
.cwy-chip {
	display: inline-block;
	font-size: 12px;
	font-weight: 500;
	padding: 4px 12px;
	border: 1px solid #d1d5db;
	border-radius: 20px;
	background: #fff;
	color: #374151;
	text-decoration: none;
	transition: all 0.2s ease;
	line-height: 1.4;
	white-space: nowrap;
}

.cwy-chip:hover {
	background: #111827;
	border-color: #111827;
	color: #fff;
	text-decoration: none;
}

/* 程序小圖片與資訊區下方留白 */
.cwy-hero-media {
	margin-bottom: 0;
}

.cwy-hero-info {
	margin-bottom: 0;
}

.tutor-course-details-header .tutor-course-details-title {
	font-size: 2.4rem !important;
	font-weight: 800 !important;
	line-height: 1.05 !important;
	letter-spacing: -0.03em;
	max-width: 100% !important;
}

.tutor-course-details-header .tutor-course-details-title span {
	display: block;
}

/* 隱藏「獲得證書」區塊 */
#tutor-certificate-showcase {
	display: none !important;
}

/* ── 平板 ───────────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1199px) {

	.cwy-hero,
	.cwy-content-row {
		grid-template-columns: 1fr;
	}

	.cwy-hero {
		margin-bottom: 24px;
	}

	.cwy-content-row>aside .tutor-single-course-sidebar {
		position: static;
	}

	.cwy-hero-title {
		font-size: 1.4rem;
	}
}

/* ── 手機版：上下堆疊 ──────────────────────────────── */
@media (max-width: 767px) {

	.cwy-hero,
	.cwy-content-row {
		grid-template-columns: 1fr;
		column-gap: 0;
		gap: 20px 0;
		/* 增加上下間距（row gap） */
	}

	.cwy-hero {
		margin-bottom: 24px;
	}

	.cwy-content-row>aside .tutor-single-course-sidebar {
		position: static;
	}

	.cwy-hero-media {
		border-radius: 0;
		margin-left: -16px;
		margin-right: -16px;
	}

	.cwy-hero-media img,
	.cwy-hero-media video,
	.cwy-hero-media iframe,
	.cwy-hero-media .tutor-video-wraaper {
		border-radius: 0 !important;
	}

	.cwy-hero-title {
		font-size: 1.35rem;
	}

	.cwy-hero-author {
		flex-wrap: wrap;
		gap: 10px;
	}

	.cwy-lead-sep {
		display: none;
	}
}

/* ── Footer 全站滿版 ──────────────────────────────────────── */
/* Blocksy 會對 footer 本體套用 container padding，造成外圈白框 */
#footer {
	padding: 0 !important;
	margin: 0 !important;
}

/* Blocksy 會在 [data-content="normal"] > article 上定義 theme block 寬度變數，
   is-layout-constrained 再用這些變數把 footer 內容夾成一般內容寬。這裡直接把 footer 專用變數改成滿版。 */
#footer [data-content="normal"]>article {
	--theme-block-width: 100%;
	--theme-block-max-width: 100%;
	--theme-block-wide-max-width: 100%;
	--theme-boxed-content-max-width: 100%;
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

#footer .ct-container-full,
#footer .entry-content,
#footer .entry-content.is-layout-constrained,
#footer .entry-content.is-layout-constrained>.elementor,
#footer .elementor.elementor-193,
#footer .elementor.elementor-193>.elementor-element.e-con-full.e-parent {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* ── 公開個人檔案頁 UI ───────────────────────────────────── */

/* 統一區塊間距，讓各段落有呼吸感 */
.cwy-profile-section {
	margin-top: 60px;
	text-align: left;
}

/* 區塊標題：底線分隔，字型與主題一致 */
.cwy-profile-section>h3 {
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin-bottom: 24px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--paletteColor5, #e5e7eb);
	color: var(--headingsColor, inherit);
	text-align: left;
}

/* 課程卡片格線 — 移出 inline style */
.tutor-user-public-profile .tutor-dashboard-content-inner.enrolled-courses {
	width: 100%;
	padding: 0 !important;
	margin: 0 !important;
	text-align: left !important;
}

.tutor-user-public-profile .tutor-grid-3 {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: flex-start !important;
	margin: 0 -10px !important;
}

.tutor-user-public-profile .tutor-grid-3>.tutor-card {
	width: calc(33.3333% - 20px) !important;
	margin: 10px !important;
}

@media (max-width: 767px) {
	.tutor-user-public-profile .tutor-grid-3>.tutor-card {
		width: 100% !important;
		max-width: none !important;
		margin: 10px 0 !important;
	}
}

/* 個人資料頁下方留白 */
.tutor-user-public-profile .tutor-user-profile-content {
	padding-bottom: 80px;
}

/* ── 講師課程可收合區塊 ──────────────────────────────────── */
.cwy-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.cwy-section-header h3 {
	margin-bottom: 0;
	border-bottom: none;
	padding-bottom: 0;
}

/* 讓標題下方分隔線改在 header 整列底部 */
.cwy-courses-collapsible>.cwy-section-header {
	padding-bottom: 12px;
	border-bottom: 2px solid var(--paletteColor5, #e5e7eb);
	margin-bottom: 24px;
}

.cwy-toggle-courses {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--linkColor, #555);
	background: none;
	border: 1px solid currentColor;
	border-radius: 20px;
	padding: 4px 12px;
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.2s ease, background 0.2s ease;
	flex-shrink: 0;
}

.cwy-toggle-courses:hover {
	color: var(--headingsColor, #000);
	background: rgba(0, 0, 0, 0.04);
}

.cwy-toggle-icon {
	display: inline-block;
	font-size: 0.75rem;
	transition: transform 0.25s ease;
	line-height: 1;
}

/* 收合狀態：用 JS 控制 display，不用 max-height */
.cwy-courses-grid-wrap.collapsed {
	overflow: visible;
}

/* 展開動画 */
.cwy-courses-grid-wrap .tutor-grid-3 {
	max-height: none;
	transition: none;
}

/* ── 講師課程卡片 — 緊湊模式 ──────────────────────────────
   隱藏對訪客意義不大的元素，讓一次能看到更多課程。       */
.tutor-instructor .cwy-profile-section .tutor-course-preview,
.tutor-instructor .cwy-profile-section .tutor-meta.tutor-mt-auto {
	display: none !important;
}

/* 收合時隱藏的卡片 — 特異性必須高於 grid card 的 flex !important */
.tutor-instructor .cwy-profile-section .tutor-grid-3>.tutor-card.cwy-card-hidden,
.tutor-instructor .cwy-courses-collapsible .tutor-grid-3>.tutor-card.cwy-card-hidden,
.cwy-courses-collapsible .tutor-grid-3>.tutor-card.cwy-card-hidden {
	display: none !important;
}

/* 講師頁改為 3 欄（桌面） */
.tutor-instructor .cwy-profile-section .tutor-grid-3 {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 20px !important;
	margin: 0 !important;
	align-items: stretch !important;
}

.tutor-instructor .cwy-profile-section .tutor-grid-3>.tutor-card {
	width: auto !important;
	margin: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
}

/* 讓 card-body 撐滿剩餘空間，footer 固定在底部 */
.tutor-instructor .cwy-profile-section .tutor-card .tutor-card-body {
	flex: 1 1 auto !important;
}

.tutor-instructor .cwy-profile-section .tutor-card .tutor-card-footer {
	margin-top: auto !important;
}

@media (max-width: 767px) {
	.tutor-instructor .cwy-profile-section .tutor-grid-3 {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* 手機：講師課程區塊單欄顯示，卡片撐滿容器並增加間距 */
@media (max-width: 767px) {

	.cwy-courses-grid-wrap .tutor-grid-3,
	.tutor-instructor .cwy-profile-section .tutor-grid-3 {
		grid-template-columns: 1fr !important;
		gap: 16px !important;
	}

	.cwy-courses-grid-wrap .tutor-grid-3>.tutor-card,
	.tutor-instructor .cwy-profile-section .tutor-grid-3>.tutor-card {
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
		border-radius: 8px;
		overflow: hidden;
	}

	/* 卡片內部微調，避免 footer 撐出容器 */
	.cwy-courses-grid-wrap .tutor-card .tutor-card-body,
	.tutor-instructor .tutor-card .tutor-card-body {
		padding: 12px 14px !important;
	}

	/* 調整外側間距，讓區塊左右有小邊距但卡片寬度仍為 100% */
	.cwy-courses-grid-wrap {
		padding-left: 12px;
		padding-right: 12px;
	}
}

/* ── 課程標籤（tutor-tag-chip）─────────────────────────── */
.tutor-course-tags {
	margin-top: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.tutor-tag-chip {
	display: inline-block;
	font-size: 11px;
	font-weight: 500;
	padding: 2px 8px;
	border: 1px solid #000;
	border-radius: 20px;
	background: #fff;
	color: #000;
	cursor: default;
	user-select: none;
	transition: background 0.2s ease, color 0.2s ease;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.tutor-tag-chip:hover {
	background: #000;
	color: #fff;
}

/* ── WooCommerce 優惠價格紅色 ──────────────────────────── */
.list-item-price .sale-price ins .woocommerce-Price-amount,
.list-item-price .sale-price ins .amount {
	color: #e00 !important;
	font-weight: 700 !important;
}

.list-item-price .sale-price del {
	color: #888 !important;
}

/* ── Footer content block 193：移除白底 padding（Blocksy 對 article 加 boxed 留白）── */
[data-block*="193"]>[class*="ct-container"]>article[class*="post"] {
	padding: 0 !important;
	background-color: transparent !important;
	box-shadow: none !important;
}

/* ── 課程頁底部白色留白清除 ───────────────────────────────── */
body.single-courses,
body.single-courses #page,
body.single-courses .site,
body.single-courses .ct-site-content,
body.single-courses main.site-main,
body.single-courses .tutor-full-width-course-top,
body.single-courses .tutor-course-details-page,
body.single-courses .tutor-wrap-parent,
body.single-courses .ct-container[data-vertical-spacing] {
	padding-bottom: 0 !important;
	margin-bottom: 0 !important;
}

/* ── 單一課程右側：TCMP 方案卡片改回 Tutor 原生按鈕體驗 ───────────────── */
.tutor-single-course-sidebar .tcmp-course-plan-picker form {
	margin: 0;
}

.tutor-single-course-sidebar .tcmp-course-plan-list {
	grid-template-columns: 1fr;
	gap: 10px;
	margin-top: 0;
}

.tutor-single-course-sidebar .tcmp-course-plan-card {
	padding: 14px;
	border-radius: 10px;
	border-color: #e5e7eb;
	box-shadow: none;
}

.tutor-single-course-sidebar .tcmp-course-plan-radio:checked+.tcmp-course-plan-card {
	border-color: var(--tutor-color-primary);
	box-shadow: 0 0 0 2px rgba(var(--tutor-color-primary-rgb), 0.15);
}

.tutor-single-course-sidebar .tcmp-course-plan-title {
	font-size: 18px;
	line-height: 1.35;
}

.tutor-single-course-sidebar .tcmp-course-plan-price {
	margin: 8px 0 10px;
	font-size: 36px;
	line-height: 1.15;
}

.tutor-single-course-sidebar .tcmp-course-plan-actions {
	margin-top: 12px;
	padding-top: 0;
	border-top: 0;
}

/* 移除按鈕下方那條灰線（來源是 Tutor card footer 的 border-top） */
.tutor-single-course-sidebar .tutor-sidebar-card .tutor-card-footer:not(.tutor-no-border) {
	border-top: 0 !important;
	padding-top: 12px;
}

/* 清掉主題對連結按鈕加的底線/裝飾線 */
.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn:hover,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn:focus,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn:active,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn *,
.tutor-single-course-sidebar .tcmp-course-plan-actions a,
.tutor-single-course-sidebar .tcmp-course-plan-actions a:hover,
.tutor-single-course-sidebar .tcmp-course-plan-actions a:focus,
.tutor-single-course-sidebar .tcmp-course-plan-actions a:active {
	text-decoration: none !important;
	border-bottom: 0 !important;
	background-image: none !important;
	box-shadow: none;
}

.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn::before,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn::after,
.tutor-single-course-sidebar .tcmp-course-plan-actions a::before,
.tutor-single-course-sidebar .tcmp-course-plan-actions a::after {
	content: none !important;
	display: none !important;
}

/* 明確對齊 Tutor 原生 primary / outline primary 色彩邏輯 */
.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn.tutor-btn-primary {
	color: #fff;
	border-color: var(--tutor-color-primary);
	background-color: var(--tutor-color-primary);
}

/* 強制移除主色加入購物車按鈕的灰色外框線（含外掛覆蓋） */
.tutor-single-course-sidebar .tcmp-course-plan-actions .tcmp-add-to-cart-submit.tutor-btn.tutor-btn-primary,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tcmp-add-to-cart-submit.tutor-btn.tutor-btn-primary:hover,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tcmp-add-to-cart-submit.tutor-btn.tutor-btn-primary:focus,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tcmp-add-to-cart-submit.tutor-btn.tutor-btn-primary:active,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tcmp-add-to-cart-submit.tutor-btn.tutor-btn-primary:focus-visible {
	border: 1px solid var(--tutor-color-primary) !important;
	outline: none !important;
	box-shadow: none !important;
	background-image: none !important;
	-webkit-appearance: none;
	appearance: none;
}

.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn.tutor-btn-primary:hover,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn.tutor-btn-primary:focus,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn.tutor-btn-primary:active {
	color: #fff;
	border-color: var(--tutor-color-primary-hover);
	background-color: var(--tutor-color-primary-hover);
}

.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn.tutor-btn-outline-primary {
	color: var(--tutor-color-primary);
	border-color: var(--tutor-color-primary);
	background-color: transparent;
}

.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn.tutor-btn-outline-primary:hover,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn.tutor-btn-outline-primary:focus,
.tutor-single-course-sidebar .tcmp-course-plan-actions .tutor-btn.tutor-btn-outline-primary:active {
	color: #fff;
	border-color: var(--tutor-color-primary-hover);
	background-color: var(--tutor-color-primary-hover);
}

/* 如果「查看購物車」(a.tutor-btn.tutor-btn-outline-primary) 因為上方覆寫被影響，明確還原 outline */
.tutor-single-course-sidebar .tcmp-course-plan-actions a.tutor-btn.tutor-btn-outline-primary {
	border: 1px solid var(--tutor-color-primary) !important;
	color: var(--tutor-color-primary) !important;
	background-color: transparent !important;
	display: block !important;
	padding: 0.75rem 1rem !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* ── 音樂教育 Hero Banner（通用樣式） ─────────────────────── */
.elementor-widget-music_hero_banner .hero-split-wrap {
	--hero-primary: #ac1f24;
	--hero-text-main: #1a1a1a;
	--hero-text-sub: #4a5565;
	width: 100vw !important;
	max-width: 100vw !important;
	min-height: 796px;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	background: #fff;
	display: flex;
	flex-wrap: nowrap;
	overflow: hidden;
}

.elementor-widget-music_hero_banner .hero-split-left {
	flex: 0 0 58%;
	min-width: 0;
}

.elementor-widget-music_hero_banner .hero-split-left img {
	width: 100%;
	height: 100%;
	min-height: 796px;
	object-fit: cover;
	object-position: center center;
}

.elementor-widget-music_hero_banner .hero-split-left::after {
	display: none;
}

.elementor-widget-music_hero_banner .hero-split-right {
	flex: 0 0 42%;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 72px 56px 72px 28px;
	background: #fff;
}

.elementor-widget-music_hero_banner .hero-split-content {
	max-width: 540px;
	width: 100%;
}

.elementor-widget-music_hero_banner .hero-split-title {
	margin: 0 0 12px;
	font-size: clamp(40px, 4vw, 60px);
	line-height: 1.05;
	letter-spacing: 0;
	color: var(--hero-text-main);
}

.elementor-widget-music_hero_banner .hero-split-subtitle {
	margin: 0 0 22px;
	padding-bottom: 0;
	border-bottom: 0;
	font-size: clamp(22px, 1.8vw, 24px);
	line-height: 1.35;
	color: var(--hero-primary);
}

.elementor-widget-music_hero_banner .hero-split-desc {
	margin: 0 0 26px;
	font-size: clamp(17px, 1.25vw, 20px);
	line-height: 1.5;
	color: var(--hero-text-sub);
}

.elementor-widget-music_hero_banner .hero-split-meta {
	gap: 16px;
	margin-bottom: 28px;
	padding-top: 18px;
	border-top: 1px solid #e5e7eb;
}

.elementor-widget-music_hero_banner .meta-item {
	flex: 1 1 31%;
	min-width: 132px;
}

.elementor-widget-music_hero_banner .meta-icon {
	width: 48px;
	height: 48px;
	background: rgba(172, 31, 36, 0.1);
}

.elementor-widget-music_hero_banner .meta-label {
	font-size: 12px;
	color: #4a5565;
	white-space: nowrap;
}

.elementor-widget-music_hero_banner .meta-value {
	font-size: 20px;
	line-height: 1.4;
	white-space: nowrap;
	word-break: keep-all;
}

.elementor-widget-music_hero_banner .hero-split-btn {
	margin-bottom: 28px;
	padding: 18px 28px;
	font-size: 22px;
	line-height: 1.2;
	border-radius: 8px;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.12), 0 4px 6px -4px rgba(0, 0, 0, 0.12);
}

.elementor-widget-music_hero_banner .hero-req-box {
	background: #f9fafb;
	border-radius: 14px;
	padding: 18px 22px;
}

.elementor-widget-music_hero_banner .req-title {
	font-size: 18px;
	line-height: 1.5;
	color: #1a1a1a;
	margin-bottom: 10px;
}

.elementor-widget-music_hero_banner .req-text {
	font-size: 16px;
	line-height: 1.5;
}

.elementor-widget-music_hero_banner .req-subtext {
	font-size: 14px;
	line-height: 1.45;
}

@media (max-width: 1280px) {
	.elementor-widget-music_hero_banner .hero-split-left {
		flex-basis: 54%;
	}

	.elementor-widget-music_hero_banner .hero-split-right {
		flex-basis: 46%;
		padding: 56px 44px 56px 24px;
	}

	.elementor-widget-music_hero_banner .hero-split-title {
		font-size: clamp(34px, 3.8vw, 52px);
		line-height: 1.15;
		margin: 8px 0 16px;
		padding-bottom: 14px;
		border-bottom: 1px solid #e5e7eb;
	}

	.elementor-widget-music_hero_banner .hero-split-subtitle {
		font-size: 20px;
		line-height: 1.45;
		margin-bottom: 14px;
	}

	.elementor-widget-music_hero_banner .hero-split-desc {
		font-size: 16px;
		line-height: 1.7;
		margin-bottom: 20px;
	}

	.elementor-widget-music_hero_banner .hero-split-meta {
		gap: 14px;
	}

	.elementor-widget-music_hero_banner .meta-item {
		min-width: 0;
		gap: 6px;
	}

	.elementor-widget-music_hero_banner .meta-icon {
		width: 34px;
		height: 34px;
	}

	.elementor-widget-music_hero_banner .meta-icon svg {
		width: 17px;
		height: 17px;
	}

	.elementor-widget-music_hero_banner .meta-label {
		font-size: 10px;
		line-height: 14px;
	}

	.elementor-widget-music_hero_banner .meta-value {
		font-size: 13px;
		line-height: 18px;
	}
}

@media (max-width: 1024px) {
	.elementor-widget-music_hero_banner .hero-split-wrap {
		min-height: auto;
		flex-wrap: wrap;
	}

	.elementor-widget-music_hero_banner .hero-split-left,
	.elementor-widget-music_hero_banner .hero-split-right {
		flex: 0 0 100%;
	}

	.elementor-widget-music_hero_banner .hero-split-left img {
		min-height: 420px;
		height: 420px;
		object-position: center 30%;
	}

	.elementor-widget-music_hero_banner .hero-split-title {
		margin: 6px 0 14px;
		padding: 4px 0 0;
		border-bottom: 0;
	}
}

@media (max-width: 767px) {
	.elementor-widget-music_hero_banner .hero-split-wrap {
		width: min(100%, 402px) !important;
		max-width: 402px !important;
		min-height: 976px;
		margin-left: auto !important;
		margin-right: auto !important;
		background: #fff;
	}

	.elementor-widget-music_hero_banner .hero-split-left {
		flex: 0 0 400px;
	}

	.elementor-widget-music_hero_banner .hero-split-left::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		height: 34%;
		background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
		pointer-events: none;
		display: block;
	}

	.elementor-widget-music_hero_banner .hero-split-left img {
		min-height: 400px;
		height: 400px;
		object-position: center 32%;
	}

	.elementor-widget-music_hero_banner .hero-split-right {
		flex: 0 0 520px;
		padding: 18px 50px 28px;
		align-items: flex-start;
		justify-content: flex-start;
	}

	.elementor-widget-music_hero_banner .hero-split-content {
		max-width: 302px;
	}

	.elementor-widget-music_hero_banner .hero-split-title {
		font-family: "Noto Serif TC", "Noto Serif", serif;
		font-size: 32px;
		line-height: 36px;
		margin: 6px 0 12px;
		padding-top: 4px;
	}

	.elementor-widget-music_hero_banner .hero-split-subtitle {
		font-size: 18px;
		line-height: 28px;
		font-weight: 500;
		border-top: 1px solid #e5e7eb;
		padding-top: 8px;
		margin-bottom: 14px;
	}

	.elementor-widget-music_hero_banner .hero-split-desc {
		font-size: 16px;
		line-height: 26px;
		margin-bottom: 14px;
	}

	.elementor-widget-music_hero_banner .hero-split-meta {
		gap: 8px 17px;
		border-top: 0.73px solid #e5e7eb;
		padding-top: 12px;
		margin-bottom: 14px;
	}

	.elementor-widget-music_hero_banner .meta-item {
		flex: 1 1 30%;
		gap: 6px;
		align-items: center;
	}

	.elementor-widget-music_hero_banner .meta-icon {
		width: 35px;
		height: 35px;
	}

	.elementor-widget-music_hero_banner .meta-icon svg {
		width: 17px;
		height: 17px;
	}

	.elementor-widget-music_hero_banner .meta-label {
		font-size: 9px;
		line-height: 15px;
	}

	.elementor-widget-music_hero_banner .meta-value {
		font-size: 15px;
		line-height: 20px;
	}

	.elementor-widget-music_hero_banner .hero-split-btn {
		width: 217px;
		min-height: 56px;
		text-align: center;
		margin: 0 0 16px;
		padding: 16px 20px;
		font-size: 16px;
		line-height: 24px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.elementor-widget-music_hero_banner .hero-req-box {
		padding: 16px;
		border-radius: 14px;
	}

	.elementor-widget-music_hero_banner .req-title {
		font-size: 16px;
		font-weight: 700;
		line-height: 24px;
		margin-bottom: 12px;
	}

	.elementor-widget-music_hero_banner .req-list li {
		gap: 8px;
		margin-bottom: 8px;
	}

	.elementor-widget-music_hero_banner .req-icon {
		width: 16px;
		height: 16px;
		margin-top: 2px;
	}

	.elementor-widget-music_hero_banner .req-icon svg {
		width: 10px;
		height: 10px;
	}

	.elementor-widget-music_hero_banner .req-text {
		font-size: 14px;
		line-height: 20px;
	}

	.elementor-widget-music_hero_banner .req-subtext {
		font-size: 12px;
		line-height: 16px;
	}
}

/* === CWY WC SUBSCRIPTIONS STYLE START === */
.cwy-wc-subscriptions-page {
	--cwy-sub-accent: var(--tutor-color-primary, var(--theme-palette-color-1, #be1e2d));
	--cwy-sub-accent-hover: var(--tutor-color-primary-hover, var(--theme-palette-color-2, #a11926));
	--cwy-sub-text: var(--tutor-color-black, #1f2937);
	--cwy-sub-muted: var(--tutor-color-muted, #6b7280);
	--cwy-sub-line: #e7eaef;
	--cwy-sub-bg: #ffffff;
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-subtitle {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--cwy-sub-muted);
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap {
	background: var(--cwy-sub-bg);
	border: 1px solid var(--cwy-sub-line);
	border-top: 3px solid var(--cwy-sub-accent);
	border-radius: 14px;
	overflow: hidden;
}

.cwy-wc-subscriptions-page .woocommerce_account_subscriptions,
.cwy-wc-subscriptions-page table.my_account_subscriptions {
	margin: 0;
	border: 0;
}

.cwy-wc-subscriptions-page .woocommerce-orders-table thead th {
	padding: 16px 20px;
	background: #f9fafb;
	border: 0;
	border-bottom: 1px solid var(--cwy-sub-line);
	font-size: 14px;
	font-weight: 700;
	color: #111827;
}

.cwy-wc-subscriptions-page .woocommerce-orders-table tbody td {
	padding: 18px 20px;
	border: 0;
	border-top: 1px solid var(--cwy-sub-line);
	font-size: 16px;
	color: var(--cwy-sub-text);
	vertical-align: middle;
}

.cwy-wc-subscriptions-page .woocommerce-orders-table tbody tr:first-child td {
	border-top: 0;
}

.cwy-wc-subscriptions-page td.subscription-id a {
	font-weight: 700;
	color: #111827;
	text-decoration: none;
}

.cwy-wc-subscriptions-page td.subscription-id a:hover {
	color: var(--cwy-sub-accent);
}

.cwy-wc-subscriptions-page td.subscription-status {
	font-weight: 700;
}

.cwy-wc-subscriptions-page tr.woocommerce-orders-table__row--status-active td.subscription-status {
	color: #047857;
}

.cwy-wc-subscriptions-page tr.woocommerce-orders-table__row--status-on-hold td.subscription-status,
.cwy-wc-subscriptions-page tr.woocommerce-orders-table__row--status-pending td.subscription-status {
	color: #b45309;
}

.cwy-wc-subscriptions-page tr.woocommerce-orders-table__row--status-cancelled td.subscription-status,
.cwy-wc-subscriptions-page tr.woocommerce-orders-table__row--status-expired td.subscription-status {
	color: #b91c1c;
}

.cwy-wc-subscriptions-page td.subscription-next-payment small {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: var(--cwy-sub-muted);
}

.cwy-wc-subscriptions-page td.subscription-actions {
	text-align: right;
	white-space: nowrap;
}

.cwy-wc-subscriptions-page table.my_account_subscriptions th.subscription-id.order-number {
	width: 14%;
}

.cwy-wc-subscriptions-page table.my_account_subscriptions th.subscription-id.order-number,
.cwy-wc-subscriptions-page table.my_account_subscriptions td.subscription-id.order-number {
	padding-inline-start: 24px !important;
	padding-left: 24px !important;
}

.cwy-wc-subscriptions-page table.my_account_subscriptions th.subscription-status.order-status {
	width: 12%;
}

.cwy-wc-subscriptions-page table.my_account_subscriptions th.subscription-actions.order-actions,
.cwy-wc-subscriptions-page table.my_account_subscriptions td.subscription-actions.order-actions {
	padding-inline-end: 24px !important;
	padding-right: 24px !important;
}

.cwy-wc-subscriptions-page td.subscription-actions .button,
.cwy-wc-subscriptions-page td.subscription-actions .woocommerce-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 112px;
	height: 44px;
	padding: 0 20px;
	margin: 0 0 0 10px;
	border-radius: 999px;
	border: 1px solid var(--cwy-sub-accent) !important;
	background: var(--cwy-sub-accent) !important;
	color: #fff !important;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none !important;
	line-height: 1;
}

.cwy-wc-subscriptions-page table.my_account_subscriptions td.subscription-actions.order-actions .button,
.cwy-wc-subscriptions-page table.my_account_subscriptions td.subscription-actions.order-actions .woocommerce-button {
	width: auto !important;
	max-width: none !important;
}

.cwy-wc-subscriptions-page td.subscription-actions .button:hover,
.cwy-wc-subscriptions-page td.subscription-actions .woocommerce-button:hover {
	background: var(--cwy-sub-accent-hover) !important;
	border-color: var(--cwy-sub-accent-hover) !important;
	color: #fff !important;
}

.cwy-wc-subscriptions-page .woocommerce-pagination {
	display: flex;
	gap: 12px;
	padding: 18px 20px 20px;
	margin: 0;
	border-top: 1px solid var(--cwy-sub-line);
}

.cwy-wc-subscriptions-page .woocommerce-pagination .button,
.cwy-wc-subscriptions-page .woocommerce-pagination .woocommerce-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	padding: 0 18px;
	border-radius: 999px;
	border: 1px solid var(--cwy-sub-accent) !important;
	background: var(--cwy-sub-accent) !important;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
}

.cwy-wc-subscriptions-page .woocommerce-pagination .button:hover,
.cwy-wc-subscriptions-page .woocommerce-pagination .woocommerce-button:hover {
	background: var(--cwy-sub-accent-hover) !important;
	border-color: var(--cwy-sub-accent-hover) !important;
	color: #fff !important;
}

.cwy-wc-subscriptions-page .no_subscriptions {
	margin: 0;
	padding: 20px;
	border: 0;
	background: #f9fafb;
	color: var(--cwy-sub-text);
	display: block;
	position: relative;
	min-height: 0;
	line-height: 1.6;
}

.cwy-wc-subscriptions-page .no_subscriptions.woocommerce-message::before,
.cwy-wc-subscriptions-page .no_subscriptions.woocommerce-info::before,
.cwy-wc-subscriptions-page .no_subscriptions.woocommerce-Message::before,
.cwy-wc-subscriptions-page .no_subscriptions.woocommerce-message::after,
.cwy-wc-subscriptions-page .no_subscriptions.woocommerce-info::after,
.cwy-wc-subscriptions-page .no_subscriptions.woocommerce-Message::after {
	content: none !important;
	display: none !important;
}

.cwy-wc-subscriptions-page .no_subscriptions .button,
.cwy-wc-subscriptions-page .no_subscriptions .woocommerce-Button {
	margin-top: 12px;
	margin-inline-start: 0 !important;
	margin-inline-end: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 16px;
	border-radius: 999px;
	background: var(--cwy-sub-accent) !important;
	border: 1px solid var(--cwy-sub-accent) !important;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
}

.cwy-wc-subscriptions-page .no_subscriptions .button:hover,
.cwy-wc-subscriptions-page .no_subscriptions .woocommerce-Button:hover {
	background: var(--cwy-sub-accent-hover) !important;
	border-color: var(--cwy-sub-accent-hover) !important;
	color: #fff !important;
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view {
	padding-bottom: 24px;
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-top-actions {
	padding: 16px 20px 0;
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-top-actions .button,
.cwy-wc-subscriptions-page .cwy-wc-subscriptions-top-actions .woocommerce-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 16px;
	border-radius: 999px;
	background: #fff !important;
	border: 1px solid var(--cwy-sub-accent) !important;
	color: var(--cwy-sub-accent) !important;
	font-weight: 700;
	text-decoration: none !important;
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-top-actions .button:hover,
.cwy-wc-subscriptions-page .cwy-wc-subscriptions-top-actions .woocommerce-button:hover {
	background: var(--cwy-sub-accent) !important;
	border-color: var(--cwy-sub-accent) !important;
	color: #fff !important;
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view h2 {
	margin: 28px 20px 14px;
	font-size: 30px;
	line-height: 1.25;
	font-weight: 700;
	color: #111827;
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view table.shop_table,
.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view .shop_table.order_details,
.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view #woocommerce-subscriptions-related-orders-table {
	width: calc(100% - 40px);
	margin: 0 20px 24px;
	border: 1px solid var(--cwy-sub-line);
	border-radius: 12px;
	overflow: hidden;
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view table.shop_table td,
.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view table.shop_table th {
	padding: 14px 16px;
	border-top: 1px solid var(--cwy-sub-line);
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view table.shop_table tr:first-child td,
.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view table.shop_table tr:first-child th {
	border-top: 0;
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view .subscription_details td:first-child {
	width: 34%;
	color: var(--cwy-sub-muted);
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view .subscription_details td:last-child {
	color: var(--cwy-sub-text);
	font-weight: 600;
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view .subscription_details td:last-child .button,
.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view .subscription_details td:last-child .woocommerce-button,
.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view #woocommerce-subscriptions-related-orders-table .button,
.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view #woocommerce-subscriptions-related-orders-table .woocommerce-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 96px;
	height: 40px;
	padding: 0 16px;
	margin: 6px 8px 6px 0;
	border-radius: 999px;
	background: var(--cwy-sub-accent) !important;
	border: 1px solid var(--cwy-sub-accent) !important;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view .subscription_details td:last-child .button:hover,
.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view .subscription_details td:last-child .woocommerce-button:hover,
.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view #woocommerce-subscriptions-related-orders-table .button:hover,
.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view #woocommerce-subscriptions-related-orders-table .woocommerce-button:hover {
	background: var(--cwy-sub-accent-hover) !important;
	border-color: var(--cwy-sub-accent-hover) !important;
	color: #fff !important;
}

.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view .subscription_details .subscription-auto-renew-toggle {
	--wcs-toggle-bg-color: var(--cwy-sub-accent);
	--wcs-toggle-border-color: var(--cwy-sub-accent);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 14px;
	border-radius: 8px;
	line-height: 1.35;
	box-sizing: border-box;
	text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--subscriptions.is-active a {
	background: var(--theme-palette-color-1, #be1e2d);
	color: #fff;
}

.tutor-dashboard .tutor-dashboard-left-menu .tutor-dashboard-menu-wc-subscriptions .tutor-dashboard-menu-item-link {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 20px;
	line-height: 1.35;
	box-sizing: border-box;
}

.tutor-dashboard .tutor-dashboard-left-menu .tutor-dashboard-menu-wc-subscriptions .tutor-dashboard-menu-item-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	min-width: 24px;
	font-size: 24px;
	line-height: 1;
}

.tutor-dashboard .tutor-dashboard-left-menu .tutor-dashboard-menu-wc-subscriptions .tutor-dashboard-menu-item-text {
	margin-left: 12px !important;
	line-height: 1.35;
}

.woocommerce-account .woocommerce-MyAccount-content .subscription_details td:last-child .button,
.woocommerce-account .woocommerce-MyAccount-content .subscription_details td:last-child .woocommerce-button,
.woocommerce-account .woocommerce-MyAccount-content #woocommerce-subscriptions-related-orders-table .button,
.woocommerce-account .woocommerce-MyAccount-content #woocommerce-subscriptions-related-orders-table .woocommerce-button {
	background: var(--theme-palette-color-1, #be1e2d) !important;
	border: 1px solid var(--theme-palette-color-1, #be1e2d) !important;
	color: #fff !important;
	border-radius: 999px;
}

.woocommerce-account .woocommerce-MyAccount-content .subscription_details td:last-child .button:hover,
.woocommerce-account .woocommerce-MyAccount-content .subscription_details td:last-child .woocommerce-button:hover,
.woocommerce-account .woocommerce-MyAccount-content #woocommerce-subscriptions-related-orders-table .button:hover,
.woocommerce-account .woocommerce-MyAccount-content #woocommerce-subscriptions-related-orders-table .woocommerce-button:hover {
	background: var(--theme-palette-color-2, #a11926) !important;
	border-color: var(--theme-palette-color-2, #a11926) !important;
	color: #fff !important;
}

@media (max-width: 991px) {
	.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap {
		border-radius: 10px;
	}

	.cwy-wc-subscriptions-page .woocommerce-orders-table tbody td {
		font-size: 15px;
		padding: 14px 16px;
	}

	.cwy-wc-subscriptions-page td.subscription-actions {
		text-align: left;
	}

	.cwy-wc-subscriptions-page td.subscription-actions .button,
	.cwy-wc-subscriptions-page td.subscription-actions .woocommerce-button {
		margin: 8px 8px 0 0;
		min-width: 96px;
		height: 40px;
		font-size: 14px;
	}

	.cwy-wc-subscriptions-page .no_subscriptions {
		padding: 16px !important;
	}

	.cwy-wc-subscriptions-page .no_subscriptions .button,
	.cwy-wc-subscriptions-page .no_subscriptions .woocommerce-Button {
		height: 38px;
		padding: 0 14px;
		margin-top: 10px;
	}

	.cwy-wc-subscriptions-page table.my_account_subscriptions th.subscription-actions.order-actions,
	.cwy-wc-subscriptions-page table.my_account_subscriptions td.subscription-actions.order-actions {
		padding-inline-end: 16px !important;
		padding-right: 16px !important;
	}

	.cwy-wc-subscriptions-page table.my_account_subscriptions th.subscription-id.order-number,
	.cwy-wc-subscriptions-page table.my_account_subscriptions td.subscription-id.order-number {
		padding-inline-start: 16px !important;
		padding-left: 16px !important;
	}

	.cwy-wc-subscriptions-page table.my_account_subscriptions td.subscription-id.order-number,
	.cwy-wc-subscriptions-page table.my_account_subscriptions td.subscription-status.order-status,
	.cwy-wc-subscriptions-page table.my_account_subscriptions td.subscription-next-payment.order-date,
	.cwy-wc-subscriptions-page table.my_account_subscriptions td.subscription-total.order-total {
		width: auto !important;
		max-width: none !important;
		white-space: normal !important;
		word-break: normal !important;
		overflow-wrap: break-word;
	}

	.cwy-wc-subscriptions-page table.my_account_subscriptions td.subscription-id.order-number a,
	.cwy-wc-subscriptions-page table.my_account_subscriptions td.subscription-status.order-status {
		white-space: nowrap !important;
		word-break: keep-all !important;
	}

	.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view h2 {
		margin: 22px 16px 12px;
		font-size: 24px;
	}

	.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view table.shop_table,
	.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view .shop_table.order_details,
	.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view #woocommerce-subscriptions-related-orders-table {
		width: calc(100% - 24px);
		margin: 0 12px 18px;
	}

	.cwy-wc-subscriptions-page .cwy-wc-subscriptions-wrap.is-detail-view .subscription_details td:first-child {
		width: auto;
	}
}

/* === CWY WC SUBSCRIPTIONS STYLE END === */

/* ── Site header：保持在頁面頂端 ───────────────────────── */
:root {
	--cwy-sticky-header-offset: 0px;
	--cwy-floating-right: calc(8px + env(safe-area-inset-right, 0px));
	--cwy-chat-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	--cwy-chat-size: 58px;
	--cwy-floating-gap: 16px;
}

body.admin-bar {
	--cwy-sticky-header-offset: 32px;
}

body:not(.tutor-screen-course-builder) #header {
	position: sticky;
	top: var(--cwy-sticky-header-offset);
	z-index: 99990;
}

@media (max-width: 782px) {
	body.admin-bar {
		--cwy-sticky-header-offset: 46px;
	}
}

/* ── Chatwoot: 移除底部白底／白條 ───────────────────────── */
#cw-bubble-holder,
.woot--bubble-holder,
#cw-bubble-holder button,
.woot--bubble-holder button {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

#cw-bubble-holder,
.woot--bubble-holder {
	position: fixed !important;
	left: auto !important;
	top: auto !important;
	right: var(--cwy-floating-right) !important;
	bottom: var(--cwy-chat-bottom) !important;
	width: var(--cwy-chat-size) !important;
	height: var(--cwy-chat-size) !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 0 !important;
	font-size: 0 !important;
	overflow: visible !important;
	pointer-events: none !important;
}

#cw-bubble-holder .woot-widget-bubble,
.woot--bubble-holder .woot-widget-bubble,
.woot-widget-bubble {
	background: #ac1f24 !important;
}

#cw-bubble-holder .woot-widget-bubble,
.woot--bubble-holder .woot-widget-bubble,
.woot-widget-bubble,
#cw-bubble-holder [class*="launcher"],
.woot--bubble-holder [class*="launcher"] {
	position: fixed !important;
	left: auto !important;
	top: auto !important;
	right: var(--cwy-floating-right) !important;
	bottom: var(--cwy-chat-bottom) !important;
	width: var(--cwy-chat-size) !important;
	height: var(--cwy-chat-size) !important;
	min-width: var(--cwy-chat-size) !important;
	min-height: var(--cwy-chat-size) !important;
	margin: 0 !important;
}

#cw-bubble-holder .woot--close,
.woot--bubble-holder .woot--close,
.woot--close.woot--hide {
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

#cw-bubble-holder .woot-widget-bubble,
.woot--bubble-holder .woot-widget-bubble,
#cw-bubble-holder button,
.woot--bubble-holder button {
	pointer-events: auto !important;
}

#cw-bubble-holder .woot-widget-bubble::before,
#cw-bubble-holder .woot-widget-bubble::after,
.woot--bubble-holder .woot-widget-bubble::before,
.woot--bubble-holder .woot-widget-bubble::after {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

/* ── Chatwoot: 手機版 launcher 穩定大小與位置 ───────────────────────── */
@media (max-width: 767px) {
	:root {
		--cwy-floating-right: calc(4px + env(safe-area-inset-right, 0px));
		--cwy-chat-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
		--cwy-chat-size: 42px;
		--cwy-floating-gap: 12px;
	}

	#cw-bubble-holder,
	.woot--bubble-holder {
		width: var(--cwy-chat-size) !important;
		height: var(--cwy-chat-size) !important;
		overflow: visible !important;
		z-index: 2147483000 !important;
		-webkit-user-select: none !important;
		user-select: none !important;
		-webkit-user-drag: none !important;
	}

	#cw-bubble-holder .woot-widget-bubble,
	.woot--bubble-holder .woot-widget-bubble,
	.woot-widget-bubble,
	#cw-bubble-holder [class*="launcher"],
	.woot--bubble-holder [class*="launcher"] {
		width: var(--cwy-chat-size) !important;
		height: var(--cwy-chat-size) !important;
		min-width: var(--cwy-chat-size) !important;
		min-height: var(--cwy-chat-size) !important;
		line-height: var(--cwy-chat-size) !important;
		border-radius: 50% !important;
		background: #ac1f24 !important;
		color: #fff !important;
		box-shadow: 0 8px 24px rgba(172, 31, 36, 0.28) !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		overflow: hidden !important;
		touch-action: none !important;
		-webkit-user-select: none !important;
		user-select: none !important;
		-webkit-user-drag: none !important;
	}

	#cw-bubble-holder .woot-widget-bubble svg,
	.woot--bubble-holder .woot-widget-bubble svg,
	.woot-widget-bubble svg,
	#cw-bubble-holder [class*="launcher"] svg,
	.woot--bubble-holder [class*="launcher"] svg {
		width: 21px !important;
		height: 21px !important;
		color: #fff !important;
	}
}


/* Chatwoot icon: keep launcher glyph centered after shrinking the bubble. */
#cw-bubble-holder .woot-widget-bubble svg,
.woot--bubble-holder .woot-widget-bubble svg,
.woot-widget-bubble svg,
#cw-bubble-holder .woot-widget-bubble img,
.woot--bubble-holder .woot-widget-bubble img,
.woot-widget-bubble img,
#cw-bubble-holder [class*="launcher"] svg,
.woot--bubble-holder [class*="launcher"] svg,
#cw-bubble-holder [class*="launcher"] img,
.woot--bubble-holder [class*="launcher"] img {
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	right: auto !important;
	bottom: auto !important;
	transform: translate(-50%, -50%) !important;
	margin: 0 !important;
	display: block !important;
}

/* ── 浮動購物車：固定位置點擊游標 ──────────────────────────────── */
#cwy-float-cart {
	user-select: none;
	-webkit-user-drag: none;
}

#cwy-float-cart a {
	touch-action: manipulation;
	cursor: pointer;
	user-select: none;
	-webkit-user-drag: none;
}

@media (hover: none),
(pointer: coarse) {
	#cwy-float-cart a {
		cursor: pointer;
	}
}

@media (max-width: 767px) {
	#cwy-float-cart[data-cwy-dragging="1"] a {
		cursor: pointer;
	}
}


/* ── Issue 2: Vimeo / 直接嵌入 iframe 修正（aspect-ratio 16:9）────── */
/* 處理非 .tutor-video-wraaper 包覆的 iframe（如 Vimeo oEmbed、介紹影片） */
.cwy-hero-media iframe {
	aspect-ratio: 16 / 9;
	height: auto !important;
	min-height: 0 !important;
}

/* .tutor-video-wraaper 內使用 position:absolute，不套用 aspect-ratio */
.cwy-hero-media .tutor-video-wraaper iframe,
.cwy-hero-media .tutor-video-wraaper video {
	aspect-ratio: unset;
}

/* ── 浮動購物車按鈕（固定右下角，置於 Chatwoot 按鈕正上方）───────── */
#cwy-float-cart {
	position: fixed;
	bottom: calc(var(--cwy-chat-bottom) + var(--cwy-chat-size) + var(--cwy-floating-gap));
	right: var(--cwy-floating-right);
	z-index: 2147482990;
	display: none;
	animation: cwy-float-cart-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Chatwoot 聊天窗：層級高於浮動購物車，避免被購物車覆蓋 */
#cw-widget-holder,
.woot-widget-holder {
	z-index: 2147483600 !important;
}

#cwy-float-cart.is-visible {
	display: block;
}

@keyframes cwy-float-cart-in {
	from {
		opacity: 0;
		transform: scale(0.6) translateY(20px);
	}

	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

#cwy-float-cart a {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ac1f24;
	color: #fff;
	text-decoration: none;
	width: var(--cwy-chat-size);
	height: var(--cwy-chat-size);
	border-radius: 50%;
	box-shadow: 0 4px 18px rgba(172, 31, 36, 0.40);
	transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
	position: relative;
	cursor: pointer;
}

#cwy-float-cart a:hover {
	box-shadow: 0 6px 24px rgba(172, 31, 36, 0.55);
	transform: translateY(-2px);
}

#cwy-float-cart .cwy-cart-icon {
	font-size: 22px;
	line-height: 1;
}

#cwy-float-cart .cwy-cart-badge {
	background: #ff4444;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	border-radius: 50%;
	width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 6px;
	right: 6px;
	border: 2px solid #fff;
}

/* 上課頁面：隱藏浮動購物車與 Chatwoot */
body.single-lesson #cwy-float-cart,
body.single-tutor_assignments #cwy-float-cart {
	display: none !important;
}

body.single-tutor_assignments #cw-bubble-holder,
body.single-tutor_assignments .woot--bubble-holder,
body.single-tutor_assignments #cw-widget-holder {
	display: none !important;
}

/* 上課頁：保留 Chatwoot 泡泡，但抬高底距避免蓋住底部 sticky 的「上一頁/下一步」列 */
body.single-lesson {
	--cwy-chat-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {

	/* 一般手機：Chatwoot 右下角 + gap 12px，購物車固定在正上方 */
	#cwy-float-cart {
		bottom: calc(var(--cwy-chat-bottom) + var(--cwy-chat-size) + var(--cwy-floating-gap));
		right: var(--cwy-floating-right);
	}

	/* 儀表板手機：抬高 Chatwoot 底距以避開 Tutor 底部選單，購物車自動跟著上移；gap 縮 2px 讓購物車略下移 */
	.tutor-screen-frontend-dashboard {
		--cwy-chat-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
		--cwy-floating-gap: 10px;
	}

	#cwy-float-cart a {
		width: var(--cwy-chat-size);
		height: var(--cwy-chat-size);
	}

	#cwy-float-cart .cwy-cart-icon {
		font-size: 17px;
	}

	#cwy-float-cart .cwy-cart-badge {
		top: 2px;
		right: 2px;
	}
}


/* ── Tutor 教室/作業頁：避免內容區內層捲動卡住，並固定上一頁/下一步列 ── */
body.single-lesson .tutor-course-topic-single-body,
body.single-tutor_assignments .tutor-course-topic-single-body,
body.single-lesson .tutor-course-spotlight-wrapper,
body.single-tutor_assignments .tutor-course-spotlight-wrapper,
body.single-lesson .tutor-course-single-content-wrapper,
body.single-tutor_assignments .tutor-course-single-content-wrapper {
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
}

body.single-lesson .tutor-single-course-content-nav,
body.single-tutor_assignments .tutor-single-course-content-nav,
body.single-lesson .tutor-course-single-content-nav,
body.single-tutor_assignments .tutor-course-single-content-nav {
	position: sticky;
	bottom: 0;
	z-index: 40;
	padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
	background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 22%, #fff 100%);
}

body.single-lesson .tutor-single-course-content-next a,
body.single-tutor_assignments .tutor-single-course-content-next a,
body.single-lesson .tutor-single-course-content-prev a,
body.single-tutor_assignments .tutor-single-course-content-prev a {
	min-height: 44px;
}

@media (max-width: 767px) {

	body.single-lesson .tutor-single-course-content-nav,
	body.single-tutor_assignments .tutor-single-course-content-nav,
	body.single-lesson .tutor-course-single-content-nav,
	body.single-tutor_assignments .tutor-course-single-content-nav {
		margin-left: -12px;
		margin-right: -12px;
		padding-left: 12px;
		padding-right: 12px;
	}
}

/* permission-denied 頁面（required-enroll）上下留白 */
.tutor-page-permission-denied {
	padding-top: 160px;
	padding-bottom: 80px;
}

/* ── Super Socializer：手機版底部分享列佔位 div 造成白條 ── */
/* heateor_ss_mobile_footer 是 spacer，本站不使用手機底部分享列，直接隱藏 */
div.heateor_ss_mobile_footer {
	display: none !important;
}

/* ── Footer 白邊 & 白底修正 ── */
/* Blocksy Customizer 把 footer post-193 套上 boxed 卡片模式（白底+左右留白）*/
/* 強制關閉 boxed 效果，讓 Elementor 紅色 footer 可以撐滿整個寬度 */
[data-block*="193"]>[class*="ct-container"]>article[class*="post"] {
	--has-boxed: var(--false) !important;
	background-color: transparent !important;
	--theme-boxed-content-spacing: 0px !important;
}

/* ── Footer 底部白條修正 ── */
/* article#post-193 的 padding-bottom 可能仍由 Blocksy 變數系統殘留，直接歸零 */
footer#footer article#post-193 {
	padding: 0 !important;
}

/* entry-content 的 margin-block-end 可能因 is-layout-constrained 規則產生間距 */
footer#footer .entry-content,
footer#footer .entry-content>* {
	margin-block-end: 0 !important;
	margin-bottom: 0 !important;
}

/* ── Tutor 登入頁：補上頂部間距（避免表單緊貼 header） ── */
/* 當未登入點擊課程/作業，Tutor 顯示 .tutor-login-wrap 登入頁，
   預設無 padding，內容會緊貼在 header 下方，補 80px 修正視覺。 */
.tutor-login-wrap {
	padding-top: 80px;
}

/* ── 前台課程編輯器：隱藏 Blocksy 頁首，讓工具列貼齊視窗頂端 ── */
body.tutor-screen-course-builder #header,
body.tutor-screen-course-builder .ct-header {
	display: none !important;
}

body.tutor-screen-course-builder,
body.tutor-screen-course-builder #main-container,
body.tutor-screen-course-builder main.site-main {
	padding-top: 0 !important;
	margin-top: 0 !important;
}


/* WooCommerce failed payment page: keep retry payment only. */
.woocommerce-thankyou-order-failed-actions .button:not(:first-child) {
	display: none !important;
}

/* Tutor dashboard enrolled course card: keep start button clickable above stretched card link. */
.enrolled-courses .cwy-dashboard-start-course-btn {
	position: relative;
	z-index: 2;
}

/* WooCommerce notices: keep top notices below the sticky site header. */
body:not(.tutor-screen-course-builder) main.site-main .woocommerce-notices-wrapper:not(:empty),
body:not(.tutor-screen-course-builder) #main .woocommerce-notices-wrapper:not(:empty) {
	position: relative;
	z-index: 30;
	margin-top: 88px;
	margin-bottom: 18px;
}

body.admin-bar:not(.tutor-screen-course-builder) main.site-main .woocommerce-notices-wrapper:not(:empty),
body.admin-bar:not(.tutor-screen-course-builder) #main .woocommerce-notices-wrapper:not(:empty) {
	margin-top: 56px;
}

@media (max-width: 767px) {

	body:not(.tutor-screen-course-builder) main.site-main .woocommerce-notices-wrapper:not(:empty),
	body:not(.tutor-screen-course-builder) #main .woocommerce-notices-wrapper:not(:empty) {
		margin-top: 76px;
	}
}

/* ── Tutor LMS Notification Bell Styling ── */
#tutor-notifications-wrapper .tutor-iconic-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px !important;
	height: 40px !important;
	border: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	color: var(--header-link-initial-color, #5b616f) !important;
	cursor: pointer !important;
	position: relative !important;
	border-radius: 50% !important;
	margin: 0 !important;
	box-shadow: none !important;
	transition: color 0.2s ease, background-color 0.2s ease !important;
}

#tutor-notifications-wrapper .tutor-iconic-btn:hover {
	color: var(--header-link-hover-color, var(--theme-palette-color-1, #1a1a1a)) !important;
	background-color: var(--header-link-hover-background, rgba(0, 0, 0, 0.05)) !important;
	opacity: 1 !important;
}

#tutor-notifications-wrapper .tutor-icon-bell-bold::before {
	content: "\e9bd" !important;
	font-size: 20px !important;
	line-height: 1 !important;
}

#tutor-notifications-wrapper .tutor-floating-badge {
	position: absolute !important;
	top: 2px !important;
	right: 2px !important;
	min-width: 18px !important;
	height: 18px !important;
	padding: 0 4px !important;
	border-radius: 9px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 10px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	color: #fff !important;
	background: var(--theme-palette-color-1, #dc2626) !important;
	box-shadow: 0 0 0 2px var(--header-background-color, #fff) !important;
	box-sizing: border-box !important;
	z-index: 2 !important;
}

/* 課程列表價格統一紅色 */
.tcmp-price-amount,
.tcmp-price-amount *,
.tcmp-price-amount .woocommerce-Price-currencySymbol,
.tcmp-price-period,
.tcmp-price-period * {
	color: #AC2024 !important;
}

/* 隱藏 header 購物車按鈕在沒有顯示價格（data-price="no"）時，由多幣別外掛產生的紅括弧與轉換價格 */
.ct-header-cart .ct-label[data-price="no"] .wmc-custom-checkout-left,
.ct-header-cart .ct-label[data-price="no"] .wmc-custom-checkout-right,
.ct-header-cart .ct-label[data-price="no"] .wmc-approximately {
	display: none !important;
}

/* 確保當 header 購物車要顯示價格（data-price="yes"）時，多幣別的排列與字型顏色不會跑版 */
.ct-header-cart .ct-label[data-price="yes"] .wmc-custom-checkout-left,
.ct-header-cart .ct-label[data-price="yes"] .wmc-custom-checkout-right,
.ct-header-cart .ct-label[data-price="yes"] .wmc-approximately {
	float: none !important;
	display: inline !important;
	color: inherit !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* ───────────────────────────────────────────────────────────
   結帳頁面自訂登入提示區塊 (cwy-checkout-login-notice)
   ─────────────────────────────────────────────────────────── */
.cwy-checkout-login-notice {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(253, 242, 242, 0.9) 0%, rgba(254, 226, 226, 0.6) 100%);
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(172, 32, 36, 0.04);
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cwy-checkout-login-notice:hover {
    box-shadow: 0 8px 25px rgba(172, 32, 36, 0.08);
    border-color: #fca5a5;
    transform: translateY(-2px);
}

.cwy-checkout-login-notice__info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    margin-right: 24px;
}

.cwy-checkout-login-notice__icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #ffffff;
    color: #AC2024;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(172, 32, 36, 0.08);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.cwy-checkout-login-notice:hover .cwy-checkout-login-notice__icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.cwy-checkout-login-notice__icon {
    width: 20px;
    height: 20px;
}

.cwy-checkout-login-notice__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cwy-checkout-login-notice__title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #7f1d1d !important;
    line-height: 1.4 !important;
}

.cwy-checkout-login-notice__subtitle {
    margin: 0 !important;
    font-size: 13px !important;
    color: #4b5563 !important;
    line-height: 1.5 !important;
}

.cwy-checkout-login-notice__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #AC2024 0%, #88191c 100%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(172, 32, 36, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    cursor: pointer;
}

.cwy-checkout-login-notice__btn:hover {
    background: linear-gradient(135deg, #88191c 0%, #6b1013 100%);
    box-shadow: 0 6px 18px rgba(172, 32, 36, 0.3);
    transform: translateX(2px);
    color: #ffffff !important;
}

.cwy-checkout-login-notice__btn-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.cwy-checkout-login-notice__btn:hover .cwy-checkout-login-notice__btn-arrow {
    transform: translateX(4px);
}

/* RWD 響應式排版 */
@media (max-width: 768px) {
    .cwy-checkout-login-notice {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 20px;
        gap: 16px;
    }
    
    .cwy-checkout-login-notice__info {
        margin-right: 0;
        align-items: flex-start;
    }
    
    .cwy-checkout-login-notice__btn {
        width: 100%;
    }
}