/* 鴻炎貓坊 Add-ons｜業務推薦前台樣式
 * 範圍：業務個人頁 .hycsa-page、全站底部浮動聯絡列 .hycsa-bar
 * token 宣告在兩個 wrapper 上，不寫 :root，避免與 Blocksy 變數互撞
 */

.hycsa-page,
.hycsa-bar {
	--hycsa-blue: #a2d2ff;
	--hycsa-pink: #ffafcc;
	--hycsa-ink: #3e3a39;
	--hycsa-muted: #6b6664;
	--hycsa-border: #e6ebf0;
	--hycsa-surface: #ffffff;
	--hycsa-soft: #f3f9ff;
	--hycsa-primary: #1f7fa3;
	--hycsa-primary-hover: #196a88;
	--hycsa-line: #03853f;
	--hycsa-line-hover: #026d33;
	--hycsa-ring: rgba(31, 127, 163, 0.35);
	--hycsa-radius: 14px;
	--hycsa-radius-sm: 10px;
	--hycsa-shadow: 0 1px 2px rgba(62, 58, 57, 0.06), 0 8px 24px rgba(62, 58, 57, 0.08);
	--hycsa-ease: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	font-family: "Noto Sans TC", system-ui, -apple-system, sans-serif;
	color: var(--hycsa-ink);
	box-sizing: border-box;
}

.hycsa-page *,
.hycsa-page *::before,
.hycsa-page *::after,
.hycsa-bar *,
.hycsa-bar *::before,
.hycsa-bar *::after {
	box-sizing: inherit;
}

/* margin reset：double-class 蓋過主題的 .entry-content h1／p 等預設間距 */
.hycsa-page.hycsa-page :is(h1, h2, h3, h4, h5, h6, p, ol, ul, li, figure),
.hycsa-bar.hycsa-bar :is(p, span) {
	margin: 0;
}
.hycsa-page.hycsa-page :is(ol, ul) {
	padding: 0;
	list-style: none;
}

/* ── 個人頁 ─────────────────────────── */

.hycsa-page {
	padding: 48px 16px 72px;
	background: linear-gradient(180deg, var(--hycsa-soft) 0, var(--hycsa-surface) 420px);
}

.hycsa-profile {
	display: flex;
	justify-content: center;
}

.hycsa-card {
	position: relative;
	width: 100%;
	max-width: 480px;
	background: var(--hycsa-surface);
	border: 1px solid var(--hycsa-border);
	border-radius: 20px;
	box-shadow: var(--hycsa-shadow);
	overflow: hidden;
	text-align: center;
}

.hycsa-card__band {
	height: 112px;
	background: linear-gradient(120deg, var(--hycsa-blue) 0%, var(--hycsa-pink) 100%);
}

.hycsa-card__avatar {
	position: absolute;
	top: 40px;
	left: 50%;
	width: 144px;
	height: 144px;
	transform: translateX(-50%);
	border: 6px solid var(--hycsa-surface);
	border-radius: 50%;
	background: var(--hycsa-soft);
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(62, 58, 57, 0.12);
}

.hycsa-page.hycsa-page .hycsa-card__avatar img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.hycsa-card__initial {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-size: 48px;
	font-weight: 700;
	color: var(--hycsa-primary);
}

.hycsa-card__body {
	padding: 96px 28px 32px;
}

.hycsa-page.hycsa-page .hycsa-card__eyebrow {
	font-size: 14px;
	letter-spacing: 0.2em;
	color: var(--hycsa-muted);
}

.hycsa-page.hycsa-page .hycsa-card__name {
	margin-top: 4px;
	font-size: clamp(28px, 2vw + 20px, 34px);
	font-weight: 700;
	line-height: 1.3;
	color: var(--hycsa-ink);
}

.hycsa-card__actions {
	display: grid;
	gap: 12px;
	margin-top: 24px;
}

.hycsa-card__social {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
	gap: 12px;
}

/* 按鈕 */
.hycsa-page.hycsa-page .hycsa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: var(--hycsa-radius-sm);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color var(--hycsa-ease), border-color var(--hycsa-ease), box-shadow var(--hycsa-ease), transform var(--hycsa-ease);
}

.hycsa-btn__icon {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

.hycsa-page.hycsa-page .hycsa-btn--line {
	background: var(--hycsa-line);
	color: #fff;
}

.hycsa-page.hycsa-page .hycsa-btn--primary {
	background: var(--hycsa-primary);
	color: #fff;
}

.hycsa-page.hycsa-page .hycsa-btn--outline {
	background: var(--hycsa-surface);
	border-color: var(--hycsa-border);
	color: var(--hycsa-ink);
}

.hycsa-btn__icon--fb {
	color: #1877f2;
}

.hycsa-btn__icon--ig {
	color: #d62976;
}

.hycsa-page.hycsa-page .hycsa-btn:focus-visible,
.hycsa-page.hycsa-page .hycsa-link:focus-visible,
.hycsa-page.hycsa-page .hycsa-kitten__link:focus-visible,
.hycsa-bar.hycsa-bar a:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--hycsa-ring);
}

.hycsa-page.hycsa-page .hycsa-btn:active {
	transform: translateY(1px);
}

@media (hover: hover) and (pointer: fine) {
	.hycsa-page.hycsa-page .hycsa-btn--line:hover {
		background: var(--hycsa-line-hover);
		color: #fff;
	}
	.hycsa-page.hycsa-page .hycsa-btn--primary:hover {
		background: var(--hycsa-primary-hover);
		color: #fff;
	}
	.hycsa-page.hycsa-page .hycsa-btn--outline:hover {
		border-color: #cfd8e1;
		background: var(--hycsa-soft);
		color: var(--hycsa-ink);
	}
	.hycsa-page.hycsa-page .hycsa-link:hover {
		color: var(--hycsa-primary-hover);
		text-decoration: underline;
	}
	.hycsa-page.hycsa-page .hycsa-kitten__link:hover {
		border-color: #cfd8e1;
		box-shadow: var(--hycsa-shadow);
	}
}

/* 小貓清單 */
.hycsa-kittens {
	width: 100%;
	max-width: 1290px;
	margin: 56px auto 0;
}

.hycsa-kittens__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 20px;
}

.hycsa-page.hycsa-page .hycsa-kittens__title {
	font-size: clamp(22px, 1.2vw + 16px, 28px);
	font-weight: 700;
	line-height: 1.3;
	color: var(--hycsa-ink);
}

.hycsa-page.hycsa-page .hycsa-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	font-size: 15px;
	font-weight: 600;
	color: var(--hycsa-primary);
	text-decoration: none;
}

.hycsa-link__icon {
	width: 16px;
	height: 16px;
}

.hycsa-kittens__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr));
	gap: 20px;
}

.hycsa-page.hycsa-page .hycsa-kitten__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--hycsa-surface);
	border: 1px solid var(--hycsa-border);
	border-radius: var(--hycsa-radius);
	overflow: hidden;
	color: var(--hycsa-ink);
	text-decoration: none;
	transition: border-color var(--hycsa-ease), box-shadow var(--hycsa-ease);
}

.hycsa-kitten__media {
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	background: var(--hycsa-soft);
	overflow: hidden;
}

.hycsa-page.hycsa-page .hycsa-kitten__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.hycsa-kitten__placeholder {
	width: 40px;
	height: 40px;
	color: var(--hycsa-blue);
}

.hycsa-kitten__meta {
	display: grid;
	gap: 6px;
	padding: 12px 14px 14px;
}

.hycsa-kitten__name {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
}

.hycsa-kitten__status {
	justify-self: start;
	padding: 2px 10px;
	border: 1px solid #ffd3e2;
	border-radius: 999px;
	background: #fff2f7;
	font-size: 13px;
	font-weight: 500;
	color: #a52d5a;
}

.hycsa-page.hycsa-page .hycsa-license {
	max-width: 1290px;
	margin: 48px auto 0;
	font-size: 13px;
	text-align: center;
	color: var(--hycsa-muted);
}

@media (max-width: 480px) {
	.hycsa-page {
		padding: 32px 16px 56px;
	}
	.hycsa-card__body {
		padding: 92px 20px 24px;
	}
	.hycsa-kittens__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	.hycsa-kitten__meta {
		padding: 10px 10px 12px;
	}
	.hycsa-kitten__name {
		font-size: 14px;
	}
}

/* ── 全站底部浮動聯絡列 ───────────────── */

.hycsa-bar {
	position: fixed;
	left: 50%;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 90; /* 低於 Blocksy offcanvas 選單與回到頂端按鈕 */
	max-width: calc(100vw - 24px);
	transform: translateX(-50%);
	font-size: 15px;
	line-height: 1.3;
	letter-spacing: 0; /* 主題對全站設了 1.6px 字距，浮動列按鈕窄，不繼承 */
	animation: hycsa-bar-in 0.28s cubic-bezier(0.2, 0, 0, 1);
}

.hycsa-bar__inner {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px;
	background: var(--hycsa-surface);
	border: 1px solid var(--hycsa-border);
	border-radius: 999px;
	box-shadow: var(--hycsa-shadow);
}

.hycsa-bar.hycsa-bar .hycsa-bar__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var(--hycsa-border);
	border-radius: 999px;
	background: var(--hycsa-surface);
	color: var(--hycsa-ink);
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: none;
	transition: background-color var(--hycsa-ease), border-color var(--hycsa-ease), transform var(--hycsa-ease);
}

.hycsa-bar.hycsa-bar .hycsa-bar__btn--line {
	border-color: var(--hycsa-line);
	background: var(--hycsa-line);
	color: #fff;
}

.hycsa-bar__icon {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

.hycsa-bar__btn--fb .hycsa-bar__icon {
	color: #1877f2;
}

.hycsa-bar__btn--ig .hycsa-bar__icon {
	color: #d62976;
}

.hycsa-bar__short {
	display: none;
}

.hycsa-bar.hycsa-bar .hycsa-bar__who {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	max-width: 180px;
	min-height: 44px;
	padding-right: 12px;
	margin-right: 2px;
	border-right: 1px solid var(--hycsa-border);
	color: var(--hycsa-ink);
	text-decoration: none;
}

.hycsa-bar__avatar {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--hycsa-soft);
	overflow: hidden;
	font-weight: 700;
	color: var(--hycsa-primary);
}

.hycsa-bar.hycsa-bar .hycsa-bar__avatar img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.hycsa-bar__text {
	display: grid;
	min-width: 0;
}

.hycsa-bar__role {
	font-size: 12px;
	color: var(--hycsa-muted);
}

.hycsa-bar__name {
	overflow: hidden;
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.hycsa-bar.hycsa-bar .hycsa-bar__btn:active {
	transform: translateY(1px);
}

@media (hover: hover) and (pointer: fine) {
	.hycsa-bar.hycsa-bar .hycsa-bar__btn:hover {
		border-color: #cfd8e1;
		background: var(--hycsa-soft);
		color: var(--hycsa-ink);
	}
	.hycsa-bar.hycsa-bar .hycsa-bar__btn--line:hover {
		border-color: var(--hycsa-line-hover);
		background: var(--hycsa-line-hover);
		color: #fff;
	}
	.hycsa-bar.hycsa-bar .hycsa-bar__who:hover .hycsa-bar__name {
		text-decoration: underline;
	}
}

/* 讓位：頁尾最後一列多留底部空間、回到頂端按鈕在手機上移到浮動列上方 */
body.hycsa-has-bar #footer > :last-child {
	padding-bottom: 88px;
}

/* 手機：滿寬、三顆按鈕平均分配 */
@media (max-width: 782px) {
	.hycsa-bar {
		left: 12px;
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		max-width: none;
		transform: none;
	}
	.hycsa-bar.hycsa-bar .hycsa-bar__btn {
		flex: 1 1 0;
		min-width: 0;
		gap: 6px;
		padding: 0 8px;
		font-size: 14px;
	}
	.hycsa-bar__icon {
		width: 18px;
		height: 18px;
	}
	.hycsa-bar.hycsa-bar .hycsa-bar__who {
		flex: 0 1 auto;
		max-width: 132px;
	}
	body.hycsa-has-bar .ct-back-to-top {
		bottom: calc(84px + env(safe-area-inset-bottom, 0px));
	}
}

@media (max-width: 420px) {
	.hycsa-bar__long {
		display: none;
	}
	.hycsa-bar__short {
		display: inline;
	}
}

/* 業務模式多了頭像與名字，窄螢幕改用短標籤 */
@media (max-width: 560px) {
	.hycsa-bar.has-person .hycsa-bar__long {
		display: none;
	}
	.hycsa-bar.has-person .hycsa-bar__short {
		display: inline;
	}
	.hycsa-bar.hycsa-bar.has-person .hycsa-bar__btn {
		gap: 4px;
		padding: 0 6px;
		font-size: 13px;
	}
	.hycsa-bar.has-person .hycsa-bar__inner {
		gap: 6px;
	}
	.hycsa-bar.has-person .hycsa-bar__role {
		display: none;
	}
	.hycsa-bar.hycsa-bar.has-person .hycsa-bar__who {
		gap: 8px;
		max-width: 104px;
		padding-right: 8px;
		margin-right: 0;
	}
	.hycsa-bar.has-person .hycsa-bar__avatar {
		width: 32px;
		height: 32px;
	}
	.hycsa-bar.has-person .hycsa-bar__name {
		font-size: 14px;
	}
}

@keyframes hycsa-bar-in {
	from {
		opacity: 0;
		translate: 0 12px;
	}
	to {
		opacity: 1;
		translate: 0 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hycsa-bar,
	.hycsa-page *,
	.hycsa-bar * {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* ── 業務模式：店家電話改成 LINE 連結（插入在既有內容中，沿用所在段落的字色） ── */
a.hycsa-phone-line.hycsa-phone-line {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}
