/*
Theme Name: JapanDays
Theme URI: https://japandays.com/
Author: TABI SEKKEI
Description: Japan itinerary planner theme. Day-by-day trips with times, Google Maps routes, rail pass and Suica tips, shareable view and edit links, in English, Korean and Chinese. The planner engine is built in. The same zip also installs as a plugin.
Version: 3.0.4
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: japandays
Tags: full-site-editing, block-patterns, travel, translation-ready, wide-blocks
*/

:root {
	--jdt-header-h: 68px;
	--jdt-gutter: clamp(16px, 4vw, 40px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--jdt-header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01"; overflow-x: hidden; }
html.jdt-locked, html.jdt-locked body { overflow: hidden; }
img { max-width: 100%; height: auto; }
:where(a) { text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid rgba(31, 63, 168, .4); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; }
.wp-site-blocks > main { flex: 1; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Header */
.jdt-header { position: sticky; top: 0; z-index: 100; background: rgba(247, 246, 242, .88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, background-color .2s; }
.admin-bar .jdt-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .jdt-header { top: 0; } }
.jdt-header.is-scrolled { border-bottom-color: var(--wp--preset--color--line); background: rgba(247, 246, 242, .96); }
.jdt-header__bar { display: flex; align-items: center; gap: 20px; max-width: 1240px; margin: 0 auto; padding: 0 var(--jdt-gutter); min-height: var(--jdt-header-h); }
.jdt-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--wp--preset--color--ink); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.03em; flex: none; }
.jdt-brand:hover { color: var(--wp--preset--color--ink); }
.jdt-brand__mark { position: relative; width: 30px; height: 30px; border-radius: 9px; background: var(--wp--preset--color--ink); display: inline-block; overflow: hidden; }
.jdt-brand__mark span { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #E0453A; top: 9px; left: 9px; }
.jdt-brand__mark::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 2px; border-radius: 2px; background: #fff; opacity: .9; }
.jdt-nav { flex: 1; min-width: 0; }
.jdt-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.jdt-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 999px; color: var(--wp--preset--color--ink); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.jdt-nav a:hover { background: rgba(21, 23, 27, .06); color: var(--wp--preset--color--ink); }
.jdt-nav a[aria-current] { background: var(--wp--preset--color--ink); color: #fff; }
.jdt-header__tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.jdt-cta { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 10px 18px; border-radius: 999px; background: var(--wp--preset--color--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; transition: background-color .15s; }
.jdt-cta:hover { background: #18338A; color: #fff; }
.jdt-cta--block { width: 100%; min-height: 50px; font-size: 17px; }
.jdt-mytrips { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 12px; border-radius: 999px; color: var(--wp--preset--color--ink); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.jdt-mytrips:hover, .jdt-mytrips[aria-current] { background: rgba(21, 23, 27, .06); color: var(--wp--preset--color--ink); }
.jdt-mytrips__n[hidden] { display: none; }
.jdt-mytrips__n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--wp--preset--color--teal); color: #fff; font-size: 12px; font-weight: 700; }
.jdt-icon { flex: none; }
.jdt-lang { position: relative; }
.jdt-lang summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; }
.jdt-lang summary::-webkit-details-marker { display: none; }
.jdt-lang summary:hover, .jdt-lang[open] summary { background: rgba(21, 23, 27, .06); }
.jdt-lang .jd-langs { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 14px; box-shadow: 0 2px 6px rgba(21,23,27,.06), 0 24px 60px rgba(21,23,27,.16); padding: 6px; min-width: 180px; }
.jdt-lang ul, .jdt-drawer__langs ul, .jdt-footer__langs ul { list-style: none; margin: 0; padding: 0; }
.jdt-lang a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--wp--preset--color--ink); text-decoration: none; font-size: 15px; }
.jdt-lang a:hover { background: var(--wp--preset--color--bg); }
.jdt-lang a[aria-current]::after, .jdt-drawer__langs a[aria-current]::after { content: " ✓"; color: var(--wp--preset--color--accent); font-weight: 700; }
.jdt-burger { display: none; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--wp--preset--color--line); background: #fff; color: var(--wp--preset--color--ink); cursor: pointer; align-items: center; justify-content: center; padding: 0; }
.jdt-drawer { position: fixed; inset: var(--jdt-header-h) 0 0 0; z-index: 99; background: var(--wp--preset--color--bg); overflow: auto; padding: 16px var(--jdt-gutter) 40px; display: grid; gap: 20px; align-content: start; }
.jdt-drawer[hidden] { display: none; }
.admin-bar .jdt-drawer { top: calc(var(--jdt-header-h) + 46px); }
.jdt-drawer ul { list-style: none; margin: 0; padding: 0; }
.jdt-drawer nav a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--ink); text-decoration: none; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.jdt-drawer__langs ul { display: flex; flex-wrap: wrap; gap: 8px; }
.jdt-drawer__langs a { display: inline-flex; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--wp--preset--color--line); background: #fff; color: var(--wp--preset--color--ink); text-decoration: none; font-size: 15px; }
@media (max-width: 1080px) {
	.jdt-nav { display: none; }
	.jdt-burger { display: inline-flex; }
	.jdt-header__tools { margin-left: auto; }
}
@media (max-width: 640px) {
	:root { --jdt-header-h: 60px; }
	.jdt-header__bar { gap: 8px; }
	.jdt-mytrips span:not(.jdt-mytrips__n), .jdt-header__tools > .jdt-cta, .jdt-lang summary span { display: none; }
	.jdt-mytrips, .jdt-lang summary { padding: 8px 10px; }
	.jdt-brand { font-size: 18px; }
}

/* Main layout */
.jdt-main { padding-top: 0; padding-bottom: var(--wp--preset--spacing--60); }
.jdt-main--app > * { max-width: 1240px; }
.jdt-main--home { padding-bottom: 0; }
.jdt-hero-wrap { margin-top: 0 !important; }
.jdt-section { margin-block-start: var(--wp--preset--spacing--60) !important; }
.jdt-section--last { padding-bottom: var(--wp--preset--spacing--60); }
.jdt-section:empty { display: none; }
.jdt-article { padding-top: var(--wp--preset--spacing--50); }
.jdt-article .wp-block-post-title { margin-bottom: 8px; }
.jdt-date { color: var(--wp--preset--color--muted); font-size: 14px; }
.jdt-feature img { border-radius: 20px; }
.jdt-missing { padding: 16px; background: #FBF0E6; color: #9A4A12; border-radius: 12px; }
.jdt-404__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Home-only refinements of plugin components */
.jdt-main--home .jd-hero { border-radius: 0 0 clamp(20px, 3vw, 36px) clamp(20px, 3vw, 36px); }
.jdt-main--home .jd-hero__media { min-height: min(86vh, 760px); }
@media (max-width: 760px) {
	.jdt-main--home .jd-hero__media { min-height: 0; position: absolute; inset: 0; }
	.jdt-main--home .jd-hero__panel { padding: 48px 0 28px; }
	.jdt-main--home .jd-hero__media::after { background: linear-gradient(180deg, rgba(10,12,16,.45) 0%, rgba(10,12,16,.75) 100%); }
	.jd-mini__row { grid-template-columns: 1fr; }
}

/* Footer */
.jdt-footer { background: var(--wp--preset--color--night); color: rgba(255, 255, 255, .78); margin-top: auto; padding: var(--wp--preset--spacing--60) 0 32px; }
.jdt-footer a { color: rgba(255, 255, 255, .86); text-decoration: none; }
.jdt-footer a:hover { color: #fff; text-decoration: underline; }
.jdt-footer__top, .jdt-footer__bottom { max-width: 1240px; margin: 0 auto; padding: 0 var(--jdt-gutter); }
.jdt-footer__top { display: grid; gap: 32px; grid-template-columns: 1.4fr repeat(4, 1fr); }
.jdt-footer .jdt-brand { color: #fff; }
.jdt-footer .jdt-brand__mark { background: #fff; }
.jdt-footer .jdt-brand__mark::after { background: var(--wp--preset--color--night); }
.jdt-footer__brand p { margin: 14px 0 18px; font-size: 15px; max-width: 22em; }
.jdt-footer .jdt-cta { color: #fff; text-decoration: none; }
.jdt-footer__col h2 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; margin: 6px 0 14px; }
.jdt-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.jdt-footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); display: grid; gap: 14px; }
.jdt-footer__langs ul { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.jdt-footer__langs a[aria-current] { color: #fff; font-weight: 700; }
.jdt-footer__note, .jdt-footer__copy { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .64); max-width: 60em; }
@media (max-width: 960px) { .jdt-footer__top { grid-template-columns: 1fr 1fr; } .jdt-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .jdt-footer__top { grid-template-columns: 1fr; } }

@media print {
	.jdt-header, .jdt-footer, .jdt-drawer { display: none !important; }
	body { background: #fff; }
}
