/* WordPress 端補充：prototype 沒有的元素（管理列、表單回饋、法務／FAQ／404／文章頁、Cookie 同意列）。
   色彩沿用各頁 CSS 的 :root 變數。 */

/* 登入時管理列固定在頂端，sticky 導覽列要讓開；600px 以下管理列會隨頁面捲走 */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media screen and (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* ── 表單送出狀態 ── */
.form-status { margin-top: 1rem; padding: 0.75rem 1rem; border-radius: 0.5rem; font-size: 0.9375rem; line-height: 1.6; background: var(--cloud); color: var(--text-body); }
.form-status:empty { display: none; }
.form-status.is-success { background: #ecfdf3; color: #166534; }
.form-status.is-error { background: #fef2f2; color: #b91c1c; }
main form button[type="submit"]:disabled { opacity: 0.6; cursor: progress; transform: none; }

/* ── 法務頁、文章內文 ── */
.prose { max-width: 48rem; font-size: 1rem; line-height: 1.8; color: var(--text-body); }
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2.5rem; font-size: 1.375rem; line-height: 1.35; color: var(--text-heading); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.375rem; }
.prose a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text-heading); }
.prose img { max-width: 100%; height: auto; border-radius: 0.5rem; }

/* ── FAQ：沿用服務卡「See what this includes」的下拉樣式 ── */
.faq-wrap { max-width: 56rem; }
.faq-group + .faq-group { margin-top: 3rem; }
.faq-group h2 { font-size: 1.25rem; color: var(--text-heading); margin-bottom: 1rem; }
.faq-item { border-top: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.125rem 0; font-weight: 600; line-height: 1.5; color: var(--text-heading); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ''; width: 0.5rem; height: 0.5rem; flex: none; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s ease; }
.faq-item[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-item summary:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.faq-item p { max-width: 48rem; padding-bottom: 1.25rem; line-height: 1.8; color: var(--text-body); }

/* ── 404 ── */
.notfound-label { margin-top: 2.5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--text-muted); }
.notfound-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.notfound-links a { padding: 0.625rem 1rem; border: 1px solid var(--border); border-radius: 0.5rem; font-weight: 500; color: var(--text-heading); }
.notfound-links a:hover { border-color: var(--navy); }

/* ── 文章列表 ── */
.post-list { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr)); }
.post-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: 0.75rem; }
.post-card time { font-size: 0.8125rem; color: var(--text-muted); }
.post-card h2 { margin: 0.5rem 0; font-size: 1.125rem; line-height: 1.4; color: var(--text-heading); }
.post-card p { line-height: 1.7; color: var(--text-body); }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; }
.post-nav a { font-weight: 600; color: var(--navy); }

/* ── Cookie 同意列（隱藏時 visibility:hidden，按鈕不會被 Tab 鍵選到）── */
#lb-cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; padding: 1rem 2rem; background: var(--navy); color: rgba(241,245,249,0.85); box-shadow: 0 -4px 24px rgba(0,0,0,0.18); transform: translateY(100%); visibility: hidden; transition: transform 0.4s ease, visibility 0s linear 0.4s; }
#lb-cookie-banner.lb-cookie-show { transform: none; visibility: visible; transition: transform 0.4s ease; }
#lb-cookie-banner p { flex: 1 1 20rem; font-size: 0.875rem; line-height: 1.6; }
#lb-cookie-banner a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.lb-cookie-btns { display: flex; gap: 0.75rem; }
#lb-cookie-banner button { padding: 0.5rem 1.25rem; border-radius: 0.5rem; font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
#lb-cookie-accept { background: #fff; color: var(--navy); border: 1px solid #fff; }
#lb-cookie-decline { background: transparent; color: rgba(241,245,249,0.85); border: 1px solid rgba(241,245,249,0.35); }
@media (max-width: 480px) {
  #lb-cookie-banner { padding: 1rem; }
  .lb-cookie-btns { width: 100%; }
  .lb-cookie-btns button { flex: 1; }
}

/* ── 浮動聯絡鈕（v1 功能與位置沿用，配色改成新版深藍）── */
.floating-contact { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }
.floating-options { display: none; flex-direction: column; align-items: flex-end; gap: 0.75rem; }
.floating-options.open { display: flex; }
.floating-btn { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 1rem; border-radius: 9999px; border: 1px solid var(--border); background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.15); font-size: 0.875rem; font-weight: 500; color: var(--text-body); transition: border-color 0.2s, color 0.2s; }
.floating-btn:hover { border-color: var(--navy); color: var(--navy); }
.floating-btn svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.floating-toggle { display: flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; border: none; border-radius: 9999px; background: var(--navy); color: #fff; box-shadow: 0 8px 24px rgba(26,43,69,0.35); cursor: pointer; }
.floating-toggle:hover { filter: brightness(1.2); }
.floating-toggle svg { width: 1.5rem; height: 1.5rem; }
.bounce-periodic { animation: bounceTwice 20s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .bounce-periodic { animation: none; } }
@keyframes bounceTwice {
  0%, 100% { transform: translateY(0); }
  3%        { transform: translateY(-9px); }
  5.5%      { transform: translateY(0); }
  7%        { transform: translateY(-4px); }
  9%        { transform: translateY(0); }
}
