/* 214 Peaks plugin: map, stats, gallery, lightbox, progress, table. Colours can be overridden by the theme. */
:root {
	--p214-done: #2e9e4f;
	--p214-todo: #d64541;
	--p214-trip: #2f6fd6;
	--p214-ink: #1f2a30;
	--p214-muted: #61707a;
	--p214-line: #e3e7ea;
	--p214-card: #fff;
	--p214-radius: 10px;
}

.p214-mapwrap { margin: 1.5rem 0; }
.p214-maptools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.p214-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border: 1px solid var(--p214-line); border-radius: 999px; background: var(--p214-card); font-size: .9rem; cursor: pointer; }
.p214-chip input { accent-color: currentColor; margin: 0; }
.p214-chip--done { color: var(--p214-done); }
.p214-chip--todo { color: var(--p214-todo); }
.p214-chip--trip { color: var(--p214-trip); }
.p214-chip--route { color: #b98a55; }
.p214-chip--route i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; background: currentColor; }
.p214-chip--route b { font-weight: 600; }
.p214-wp { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); box-sizing: border-box; }
.p214-wp--n { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; color: #fff; font: 700 10px/1 system-ui, sans-serif; }
.p214-pop--wp img { cursor: zoom-in; }
.p214-chip b { color: var(--p214-ink); }
.p214-maptools select, .p214-maptools input[type="search"] { padding: .4rem .6rem; border: 1px solid var(--p214-line); border-radius: 8px; font: inherit; font-size: .9rem; background: #fff; min-width: 0; }
.p214-maptools input[type="search"] { flex: 1 1 12rem; }
.p214-map { width: 100%; min-height: 320px; border-radius: var(--p214-radius); overflow: hidden; z-index: 0; }

.p214-pop { display: grid; gap: .2rem; width: 210px; font-size: .85rem; line-height: 1.35; }
.p214-pop img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; margin-bottom: .3rem; }
.p214-pop strong { font-size: 1rem; }
.p214-pop span { color: var(--p214-muted); }
.p214-pop em { font-style: normal; font-weight: 600; }
.p214-pop .is-done { color: var(--p214-done); }
.p214-pop .is-todo { color: var(--p214-todo); }
.p214-pop a { font-weight: 600; }
.p214-tripicon span { display: block; width: 18px; height: 18px; margin: 2px; background: var(--p214-trip); border: 2px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.p214-viewbtns a { width: auto !important; padding: 0 .5rem; font-size: .8rem; font-weight: 600; }

.p214-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin: 0 0 1.5rem; padding: 1rem; background: #f4f6f7; border-radius: var(--p214-radius); }
.p214-stats div { margin: 0; }
.p214-stats dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--p214-muted); }
.p214-stats dd { margin: .15rem 0 0; font-weight: 600; color: var(--p214-ink); }
.p214-stats small { font-weight: 400; color: var(--p214-muted); }
.p214-more { margin-top: -.75rem; }

.p214-route { margin: 2rem 0; }
.p214-minimap { height: 340px; border-radius: var(--p214-radius); overflow: hidden; z-index: 0; }
.p214-route figcaption { font-size: .85rem; color: var(--p214-muted); margin-top: .4rem; }

.p214-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 220px), 1fr)); gap: .5rem; margin: 2rem 0; }
.p214-photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #e9ecee; }
.p214-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.p214-photo:hover img, .p214-photo:focus img { transform: scale(1.04); }

.p214-lightbox { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; background: rgba(10, 14, 16, .92); }
.p214-lightbox.is-open { display: flex; }
.p214-lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.p214-lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 6px; }
.p214-lightbox figcaption { color: #dfe5e8; font-size: .9rem; margin-top: .5rem; }
.p214-lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; padding: .5rem 1rem; cursor: pointer; }
.p214-lb-close { top: .5rem; right: .5rem; }
.p214-lb-prev { left: .25rem; top: 50%; transform: translateY(-50%); }
.p214-lb-next { right: .25rem; top: 50%; transform: translateY(-50%); }

.p214-progress { margin: 1.5rem 0; }
.p214-progress__big { font-size: 1.25rem; margin: 0 0 .5rem; }
.p214-progress__big b { font-size: 2.4rem; color: var(--p214-done); margin-right: .25rem; }
.p214-bar { height: 12px; background: #e6eaec; border-radius: 99px; overflow: hidden; }
.p214-bar span { display: block; height: 100%; background: var(--p214-done); border-radius: 99px; }
.p214-bar--small { height: 8px; }
.p214-books { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .45rem; }
.p214-books li { display: grid; grid-template-columns: 8.5rem 1fr 3.2rem; align-items: center; gap: .75rem; font-size: .9rem; }
.p214-books b { text-align: right; }

.p214-tablewrap { overflow-x: auto; }
.p214-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.p214-table th, .p214-table td { padding: .5rem .6rem; border-bottom: 1px solid var(--p214-line); text-align: left; }
.p214-table th { cursor: pointer; white-space: nowrap; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--p214-muted); }
.p214-table th[aria-sort="ascending"]::after { content: " ▲"; }
.p214-table th[aria-sort="descending"]::after { content: " ▼"; }
.p214-table tr.is-done td:last-child { color: var(--p214-done); font-weight: 600; }

@media (max-width: 600px) {
	.p214-books li { grid-template-columns: 6.5rem 1fr 2.8rem; }
	.p214-minimap { height: 260px; }
}

/* Written guides: tip boxes and fact tables */
.entry .p214-tip { background: #f3f0e8; border-left: 4px solid var(--gold, #b98a55); padding: .85rem 1.1rem; border-radius: 0 8px 8px 0; font-size: .98rem; }
.entry .wp-block-table { margin: 1.5rem 0; overflow-x: auto; }
.entry .wp-block-table table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.entry .wp-block-table th, .entry .wp-block-table td { border: 0; border-bottom: 1px solid #e3ded3; padding: .55rem .7rem; text-align: left; vertical-align: top; }
.entry .wp-block-table th { background: #f6f4ef; font-weight: 600; }
.entry .wp-block-table thead { border-bottom: 0; }
.entry .wp-block-table table { border: 1px solid #e3ded3; border-radius: 8px; }
.entry h2 { margin-top: 2rem; }
.entry h3 { margin-top: 1.5rem; }
