/*
Theme Name: BQEAT 中華房屋品質查驗協會
Template: twentytwentyfive
Description: 中華房屋品質查驗協會官網佈景主題（Twenty Twenty-Five 子主題）。
Version: 0.1.1
Text Domain: bqeat
*/

/* ---------- base ---------- */
body { -webkit-font-smoothing: antialiased; }
.bq-eyebrow { color: var(--wp--preset--color--accent-1); font-family: var(--wp--preset--font-family--latin); letter-spacing: .18em; text-transform: uppercase; font-size: .8rem; font-weight: 600; margin-bottom: .4rem !important; }
.has-accent-1-background-color .bq-eyebrow, .bq-hero .bq-eyebrow { color: #f3d9d6; }
:where(.wp-site-blocks) img { height: auto; }

/* ---------- header ---------- */
.bq-topbar { font-size: .82rem; }
.bq-topbar a { color: inherit; text-decoration: none; }
.bq-header { position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.admin-bar .bq-header { top: 32px; }
.bq-header .bq-logo img { display: block; }
.bq-header .wp-block-navigation a { text-decoration: none; font-weight: 500; }
.bq-header .wp-block-navigation .wp-block-navigation__submenu-container { color: var(--wp--preset--color--contrast) !important; background: #fff !important; border: 0 !important; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: .4rem 0; min-width: 180px; }
.bq-header .wp-block-navigation .wp-block-navigation__submenu-container a { padding: .45rem 1rem; }
.bq-header .wp-block-navigation .wp-block-navigation__submenu-container a:hover { color: var(--wp--preset--color--accent-1); }
.bq-nav-cta > a { background: #fff; color: var(--wp--preset--color--accent-1) !important; border-radius: 999px; padding: .35rem 1rem !important; font-weight: 700 !important; }
.bq-header .wc-block-mini-cart__button, .bq-header .wc-block-customer-account a { color: #fff; }
@media (max-width: 781px) { .bq-header .bq-logo img { width: 220px !important; } .admin-bar .bq-header { top: 0; } }

/* ---------- hero & sections ---------- */
.bq-hero h1 { text-shadow: 0 2px 16px rgba(0,0,0,.25); }
.bq-section-title { margin-top: 0 !important; }
.bq-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 24px rgba(60, 20, 20, .08); height: 100%; transition: transform .2s, box-shadow .2s; }
.bq-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(60, 20, 20, .14); }
.bq-card .wp-block-image { margin: 0; }
.bq-card .wp-block-image img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.bq-card a { text-decoration: none; }
.bq-card-body { padding: 1rem 1.25rem 1.4rem; }
.bq-news-grid .wp-block-post-featured-image img { aspect-ratio: 4/3; object-fit: cover; }
.bq-news-grid .wp-block-post-title a { text-decoration: none; }
.bq-news-grid .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-1); }
.bq-page-band { border-bottom: 4px solid var(--wp--preset--color--accent-1); }

/* ---------- content ---------- */
.entry-content table, .wp-block-post-content table { border-collapse: collapse; width: 100%; }
.wp-block-post-content td, .wp-block-post-content th { border: 1px solid var(--wp--preset--color--accent-6); padding: .55rem .75rem; }
.wp-block-post-content th { background: var(--wp--preset--color--accent-3); }
.bq-price-table th { background: var(--wp--preset--color--accent-1) !important; color: #fff; }
.bq-price-table td:last-child { font-weight: 700; color: var(--wp--preset--color--accent-1); }
.wp-block-details { border: 1px solid var(--wp--preset--color--accent-6); border-radius: 10px; padding: .9rem 1.2rem; margin-bottom: .8rem; }
.wp-block-details summary { font-weight: 700; cursor: pointer; }
.wp-block-details[open] summary { color: var(--wp--preset--color--accent-1); margin-bottom: .5rem; }

/* ---------- association boxes, forms, buttons ---------- */
.bq-box { background: var(--wp--preset--color--accent-5); border: 1px solid var(--wp--preset--color--accent-6); border-left: 4px solid var(--wp--preset--color--accent-4); border-radius: 8px; padding: 1rem 1.25rem; margin: 1rem 0; }
.bq-box h3 { margin-top: 0; font-size: 1.1rem; }
.bq-box.bq-ok { border-left-color: #2e7d32; }
.bq-box.bq-warn { border-left-color: var(--wp--preset--color--accent-1); }
.bq-form label { display: block; font-weight: 600; margin-bottom: .2rem; }
.bq-form label.bq-inline { display: inline-flex; gap: .35rem; align-items: center; font-weight: 400; margin-right: 1rem; }
.bq-form input[type=text], .bq-form input[type=email], .bq-form input[type=tel], .bq-form select, .bq-form textarea { width: 100%; padding: .65rem .8rem; border: 1px solid #cfc6c4; border-radius: 6px; font: inherit; margin-top: .25rem; background: #fff; }
.bq-form fieldset { border: 1px solid var(--wp--preset--color--accent-6); border-radius: 8px; padding: .8rem 1rem; margin: 0 0 1rem; }
.bq-form .req { color: var(--wp--preset--color--accent-1); }
.bq-help { display: block; font-weight: 400; font-size: .85rem; color: var(--wp--preset--color--accent-4); }
.bq-hp { position: absolute; left: -9999px; }
.bq-line-btn { display: inline-flex; align-items: center; gap: .5rem; background: #06C755; color: #fff !important; font-weight: 700; padding: .6rem 1.2rem; border-radius: 8px; text-decoration: none; }
.bq-line-btn:hover { background: #05b04b; }
.bq-price-hint { display: block; font-size: .85em; color: var(--wp--preset--color--accent-1); margin-top: .2rem; }
.bq-price-member { color: var(--wp--preset--color--accent-1); font-weight: 700; }
.comment-notes { font-size: .9rem; color: var(--wp--preset--color--accent-4); }

/* ---------- footer ---------- */
.bq-footer a { color: inherit; text-decoration: none; }
.bq-footer a:hover { text-decoration: underline; }
.bq-footer ul { list-style: none; padding-left: 0; }
.bq-footer li { margin-bottom: .35rem; }
.bq-page-band h1 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }

/* ---------- mobile ---------- */
.bq-header .bq-logo { flex-shrink: 0; }
@media (max-width: 781px) {
	.bq-header .bq-logo img { width: 190px !important; }
	.bq-header .wp-block-group > .wp-block-group { margin-left: auto; }
	.bq-topbar p:first-child { display: none; }
	.bq-topbar .wp-block-group { justify-content: center; }
	.bq-hero h1 { font-size: clamp(2rem, 9vw, 3rem) !important; }
}

/* ---------- tablet: the full menu needs ~1100px, so collapse to the hamburger below that ---------- */
@media (max-width: 1100px) {
	.bq-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.bq-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
	.bq-header .wp-block-group > .wp-block-group { margin-left: auto; }
}
.bq-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
.bq-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { background: transparent !important; box-shadow: none; color: inherit !important; }
.bq-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a { color: #fff !important; }
.bq-header .wp-block-navigation__responsive-container.is-menu-open .bq-nav-cta > a { color: var(--wp--preset--color--accent-1) !important; }

/* ---------- phones: fit logo + menu + account + cart in one row, tighter page gutters ---------- */
@media (max-width: 600px) {
	body { --wp--style--root--padding-left: 16px; --wp--style--root--padding-right: 16px; }
	.bq-header .bq-logo img { width: 150px !important; }
	.bq-header > .wp-block-group { gap: 10px !important; }
	.bq-header .wp-block-group > .wp-block-group { gap: 4px !important; }
	.bq-topbar { font-size: .75rem; }
}
@media (max-width: 360px) {
	.bq-header .bq-logo img { width: 128px !important; }
}
/* long URLs and e-mail addresses in content must wrap instead of widening the page */
.wp-block-post-content :is(p, li, td, a), .woocommerce :is(td, th, a) { overflow-wrap: anywhere; }
/* opened mobile/tablet menu: left-aligned list, sub-items indented */
.bq-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.bq-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.bq-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { align-items: flex-start !important; text-align: left; }
.bq-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > a { font-size: 1.1rem; font-weight: 700; }
.bq-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { padding-left: 1rem !important; padding-top: .3rem !important; }
/* service cards: 2 per row on tablets instead of one tall column */
@media (min-width: 560px) and (max-width: 1100px) {
	.bq-cards { display: grid !important; grid-template-columns: 1fr 1fr; gap: 24px; }
	.bq-cards > .wp-block-column { flex-basis: auto !important; margin: 0 !important; }
}
.bq-person-role { color: var(--wp--preset--color--accent-1); font-size: .8rem; font-weight: 700; letter-spacing: .06em; }
.bq-person-name { font-size: 1.15rem; font-weight: 700; line-height: 1.4; }
.bq-person-org { font-size: .82rem; line-height: 1.45; color: var(--wp--preset--color--accent-4); margin-top: .3rem !important; }
.bq-chairman { background: var(--wp--preset--color--accent-5); border-radius: 14px; overflow: hidden; margin-bottom: 2rem; }
.bq-chairman .wp-block-media-text__content p:last-child { color: var(--wp--preset--color--accent-4); font-size: .95rem; }
/* ---------- 理監事: overview cards, structure chart, profile page ---------- */
.bq-board-group small { font-size: .8rem; font-weight: 400; color: var(--wp--preset--color--accent-4); margin-left: .6rem; }
.bq-board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 100%), 1fr)); gap: 1.2rem; margin-bottom: 2.5rem; }
.bq-person { display: flex; flex-direction: column; align-items: center; background: #fff; border: 1px solid var(--wp--preset--color--accent-6); border-radius: 14px; padding: .6rem .6rem 1rem; text-align: center; color: inherit; text-decoration: none; }
.bq-person > * { margin: 0; }
.bq-person img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; margin-bottom: .55rem; }
a.bq-person { transition: transform .2s, box-shadow .2s, border-color .2s; }
a.bq-person:hover, a.bq-person:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(60, 20, 20, .12); border-color: var(--wp--preset--color--accent-1); }
.bq-person-more { margin-top: auto !important; padding-top: .5rem; font-size: .8rem; color: var(--wp--preset--color--accent-1); }
.bq-person-more::after { content: " →"; }
.bq-tags { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; margin-top: .45rem !important; }
.bq-tags span { font-size: .75rem; line-height: 1.6; padding: 0 .5rem; border-radius: 999px; background: var(--wp--preset--color--accent-3); color: var(--wp--preset--color--accent-2); }
.bq-tags b { font-size: .85rem; font-weight: 400; color: var(--wp--preset--color--accent-4); margin-right: .2rem; }
@media (max-width: 600px) { .bq-board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .bq-person-name { font-size: 1.05rem; } }

.bq-org { display: flex; flex-direction: column; align-items: center; margin: 1.5rem 0 2.5rem; }
.bq-org-box { position: relative; box-sizing: border-box; background: #fff; border: 1px solid var(--wp--preset--color--accent-6); border-top: 3px solid var(--wp--preset--color--accent-1); border-radius: 10px; padding: .55rem 1rem; text-align: center; width: 100%; }
.bq-org-box strong { display: block; font-size: 1.05rem; }
.bq-org-box span { display: block; font-size: .82rem; color: var(--wp--preset--color--accent-4); }
.bq-org-top { width: auto; min-width: 12rem; background: var(--wp--preset--color--accent-1); color: #fff; }
.bq-org-top span { color: #f3d9d6; }
.bq-org-top::after { content: ""; position: absolute; left: 50%; top: 100%; height: 1rem; border-left: 2px solid var(--wp--preset--color--accent-6); }
.bq-org-row { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; width: 100%; max-width: 620px; padding-top: 2rem; }
.bq-org-row::before { content: ""; position: absolute; top: 1rem; left: 25%; right: 25%; border-top: 2px solid var(--wp--preset--color--accent-6); }
.bq-org-col { position: relative; display: flex; flex-direction: column; gap: 1rem; }
.bq-org-col::before { content: ""; position: absolute; bottom: 100%; left: 50%; height: 1rem; border-left: 2px solid var(--wp--preset--color--accent-6); }
.bq-org-col .bq-org-box + .bq-org-box::before { content: ""; position: absolute; bottom: 100%; left: 50%; height: 1rem; border-left: 2px solid var(--wp--preset--color--accent-6); margin-bottom: 3px; }
@media (max-width: 600px) { .bq-org-row { gap: .8rem; } .bq-org-box { padding: .5rem .5rem; } .bq-org-box strong { font-size: .95rem; } }

.bq-profile { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 2rem; align-items: center; margin-bottom: 2rem; }
.bq-profile-photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; display: block; }
.bq-profile-main > * { margin: 0 0 .85rem; }
.bq-profile-role { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.bq-profile-en { color: var(--wp--preset--color--accent-4); font-family: var(--wp--preset--font-family--latin); }
.bq-profile-org { font-size: 1.15rem; font-weight: 700; line-height: 1.5; }
.bq-profile-org span { display: block; font-size: .92rem; font-weight: 400; color: var(--wp--preset--color--accent-4); }
.bq-profile-intro { font-size: 1.05rem; border-left: 3px solid var(--wp--preset--color--accent-1); padding-left: .8rem; }
.bq-profile .bq-tags { justify-content: flex-start; align-items: center; }
.bq-badges { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.bq-badges li { font-size: .82rem; font-weight: 700; line-height: 1.5; padding: .15rem .6rem; border-radius: 6px; background: var(--wp--preset--color--accent-3); border: 1px solid var(--wp--preset--color--accent-6); color: var(--wp--preset--color--accent-2); }
.bq-badges li::before { content: "✓ "; }
.bq-profile-back { margin-top: 2.5rem !important; }
@media (max-width: 680px) { .bq-profile { grid-template-columns: minmax(0, 1fr); gap: 1rem; } .bq-profile-photo { width: 100%; max-width: 280px; margin: 0 auto; } }
.bq-member-role { background: var(--wp--preset--color--accent-1); color: #fff; font-weight: 700; font-size: .95rem; line-height: 1.5; padding: .1rem .55rem; border-radius: 3px; margin: 0 !important; }
.bq-member-links { list-style: none; padding: 0; margin-bottom: .9rem !important; }
.bq-member-links li { margin: .3rem 0; }
.bq-member-links :is(a, .bq-phone) { --bq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E"); display: inline-flex; align-items: center; gap: .75rem; color: var(--wp--preset--color--accent-1); text-decoration: none; }
.bq-member-links a:hover { text-decoration: underline; }
.bq-member-links :is(a, .bq-phone)::before { content: ""; flex: none; width: 1.15em; height: 1.15em; background: var(--wp--preset--color--accent-4); -webkit-mask: var(--bq-icon) center / contain no-repeat; mask: var(--bq-icon) center / contain no-repeat; }
.bq-member-links a[href*="facebook.com"] { --bq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z'/%3E%3C/svg%3E"); }
.bq-member-links a[href*="instagram.com"] { --bq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='2' width='20' height='20' rx='5'/%3E%3Cpath d='M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z'/%3E%3Cpath d='M17.5 6.5h.01'/%3E%3C/svg%3E"); }
.bq-member-links :is(a[href*="line.me"], a[href*="lin.ee"]) { --bq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.4 8.4 0 0 1 3.8-.9h.5a8.5 8.5 0 0 1 8 8v.5z'/%3E%3C/svg%3E"); }
.bq-member-links a[href*="youtube.com"] { --bq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z'/%3E%3Cpath d='M9.75 15.02l5.75-3.27-5.75-3.27v6.54z'/%3E%3C/svg%3E"); }
.bq-member-links a[href*="tiktok.com"] { --bq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E"); }
.bq-member-links a[href^="mailto:"] { --bq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpath d='M22 6l-10 7L2 6'/%3E%3C/svg%3E"); }
.bq-member-info { padding-left: 1.4em; line-height: 1.75; }
.bq-member-info li { margin: .15rem 0; }
.bq-member-links .bq-phone { --bq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E"); color: var(--wp--preset--color--contrast); }
/* 諮詢顧問: wide cards, photo beside the highlights */
.bq-advisors { display: grid; gap: 1.5rem; margin: 1.5rem 0 2.5rem; }
.bq-advisor { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 1.75rem; align-items: center; background: #fff; border: 1px solid var(--wp--preset--color--accent-6); border-top: 4px solid var(--wp--preset--color--accent-1); border-radius: 14px; padding: 1.5rem; }
.bq-advisor-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.bq-advisor-main > * { margin: 0 0 .75rem !important; }
.bq-advisor-main > :last-child { margin-bottom: 0 !important; }
.bq-advisor-name { font-size: 1.75rem !important; line-height: 1.25; }
.bq-advisor-name a { color: inherit; text-decoration: none; }
.bq-advisor-name a:hover { color: var(--wp--preset--color--accent-1); }
.bq-advisor .bq-tags { justify-content: flex-start; align-items: center; }
.bq-advisor-more { font-weight: 700; text-decoration: none; }
.bq-advisor-more::after { content: " →"; }
@media (max-width: 680px) { .bq-advisor { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1.1rem; } .bq-advisor-photo { max-width: 260px; margin: 0 auto; width: 100%; } }
/* 團體會員 tables */
.bq-group-table td:first-child, .bq-group-table th:first-child { width: 4em; text-align: center; }
.bq-group-table td:nth-child(2) { white-space: nowrap; width: 9em; font-family: var(--wp--preset--font-family--latin); }

/* ---------- 活動行事曆 (mu-plugins/bqeat-core/events.php) ---------- */
.bq-cal { margin: 1.5rem 0 2.5rem; }
.bq-cal-month + .bq-cal-month { margin-top: 2.5rem; }
.bq-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.bq-cal-head h3 { margin: 0; font-size: 1.35rem; }
.bq-cal-head button { display: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--wp--preset--color--accent-6); background: #fff; color: var(--wp--preset--color--accent-1); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.bq-cal-head button:hover:not(:disabled) { background: var(--wp--preset--color--accent-3); }
.bq-cal-head button:disabled { opacity: .35; cursor: default; }
.bq-cal.is-js .bq-cal-head button { display: inline-flex; align-items: center; justify-content: center; }
.bq-cal.is-js .bq-cal-month + .bq-cal-month { margin-top: 0; }
.bq-cal-grid { border: 1px solid var(--wp--preset--color--accent-6); border-radius: 10px; overflow: hidden; background: #fff; }
.bq-cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.bq-cal-row + .bq-cal-row { border-top: 1px solid var(--wp--preset--color--accent-6); }
.bq-cal-wd { padding: .4rem; text-align: center; font-size: .85rem; font-weight: 700; background: var(--wp--preset--color--accent-3); color: var(--wp--preset--color--accent-2); }
.bq-cal-day { min-height: 6.2rem; padding: .35rem .4rem; font-size: .8rem; line-height: 1.35; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.bq-cal-day + .bq-cal-day { border-left: 1px solid var(--wp--preset--color--accent-6); }
.bq-cal-day.is-blank { background: var(--wp--preset--color--accent-5); }
.bq-cal-day b { font-weight: 600; color: var(--wp--preset--color--accent-4); }
.bq-cal-day.is-today b { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--wp--preset--color--accent-1); color: #fff; }
.bq-cal-day a { display: block; padding: .15rem .35rem; border-radius: 4px; background: var(--wp--preset--color--accent-3); border-left: 3px solid var(--wp--preset--color--accent-1); color: var(--wp--preset--color--contrast); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bq-cal-day a:hover { background: var(--wp--preset--color--accent-1); color: #fff; }
.bq-cal-empty { color: var(--wp--preset--color--accent-4); margin: 1rem 0; }

.bq-events { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .75rem; }
.bq-event a { display: flex; gap: 1rem; align-items: center; padding: .75rem 1rem; background: #fff; border: 1px solid var(--wp--preset--color--accent-6); border-radius: 10px; color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.bq-event a:hover { border-color: var(--wp--preset--color--accent-1); box-shadow: 0 6px 18px rgba(60, 20, 20, .08); }
.bq-event-date { flex: 0 0 3.6rem; text-align: center; border-radius: 8px; background: var(--wp--preset--color--accent-1); color: #fff; font-size: .78rem; padding: .3rem 0 .4rem; line-height: 1.2; }
.bq-event-date b { display: block; font-size: 1.5rem; font-family: var(--wp--preset--font-family--latin); }
.bq-event-body { display: flex; flex-direction: column; min-width: 0; }
.bq-event-body strong { font-size: 1.05rem; }
.bq-event-body small { color: var(--wp--preset--color--accent-4); font-size: .88rem; }

.bq-event-meta { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0 0 1.5rem; padding: 1rem 1.25rem; background: var(--wp--preset--color--accent-5); border: 1px solid var(--wp--preset--color--accent-6); border-left: 4px solid var(--wp--preset--color--accent-1); border-radius: 8px; }
.bq-event-meta dt { font-weight: 700; color: var(--wp--preset--color--accent-2); }
.bq-event-meta dd { margin: 0; }
/* buttons under the meta box: rendered outside the block editor, so the core buttons layout isn't loaded */
.bq-event-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1.5rem; }
.bq-event-actions .is-style-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--accent-1); border: 2px solid currentColor; }

/* phones: the grid only marks days with events; the list under it has the details */
@media (max-width: 600px) {
	.bq-cal-day { min-height: 2.8rem; padding: .3rem; align-items: center; }
	.bq-cal-day a { display: none; }
	.bq-cal-day.has-events::after { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--wp--preset--color--accent-1); }
	.bq-cal-wd { font-size: .78rem; padding: .3rem 0; }
	.bq-event a { padding: .6rem .75rem; gap: .75rem; }
	.bq-event-meta { grid-template-columns: 1fr; gap: 0; }
	.bq-event-meta dd + dt { margin-top: .5rem; }
}

/* 找驗屋專家（[bq_experts]） */
.bq-experts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.bq-expert { margin: 0; }
.bq-expert p { margin: .3rem 0; }
.bq-expert .bq-help { color: #777; font-size: .85rem; }
/* 白皮書下載表單 */
.bq-wp-form { max-width: 560px; }
