/* Tree Journal – online booking ([tree_booking]). App-style, RTL, mobile first. Scoped to .tjb / .tjb-page. */

/* Booking page: full width, no theme title or sidebar (Divi + generic themes). */
body.tjb-page #sidebar, body.tjb-page .widget-area, body.tjb-page .et_post_meta_wrapper, body.tjb-page h1.entry-title, body.tjb-page .main_title, body.tjb-page .wp-block-post-title, body.tjb-page .entry-header { display: none !important; }
body.tjb-page #left-area { width: 100% !important; padding: 0 !important; float: none !important; }
body.tjb-page #main-content .container::before { display: none !important; }
body.tjb-page #main-content .container { padding-top: 24px !important; }
body.tjb-page #main-content, body.tjb-page .entry-content { background: #f4f6f3; }

.tjb { --p:#3f7a52; --pd:#2f6142; --pl:#e7f1ea; --ink:#16241b; --t:#26302a; --m:#66716a; --b:#dfe5e0; --bg:#f4f6f3; --e:#b3261e; --f:#1a5fb4; --r:18px;
  direction: rtl; text-align: right; max-width: 560px; margin: 0 auto; padding: 4px 0 24px; color: var(--t);
  font-size: 16px; line-height: 1.55; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.tjb *, .tjb *::before, .tjb *::after { box-sizing: border-box; }
.tjb p { padding: 0; }

/* Header */
.tjb-top { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.tjb-logo { flex: none; width: 48px; height: 48px; border-radius: 16px; background: var(--p); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(63,122,82,.28); }
.tjb .tjb-title { margin: 0; font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.tjb .tjb-sub { margin: 2px 0 0; font-size: 14px; color: var(--m); }

/* Steps */
.tjb ol.tjb-steps { list-style: none; display: flex; gap: 6px; margin: 0 0 14px; padding: 0; }
.tjb ol.tjb-steps li { flex: 1; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0 0 8px; font-size: 13px; color: var(--m); border-bottom: 3px solid var(--b); list-style: none; }
.tjb ol.tjb-steps li::before { content: none; }
.tjb ol.tjb-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #fff; border: 1.5px solid var(--b); }
.tjb ol.tjb-steps li.is-on { color: var(--ink); font-weight: 700; border-color: var(--p); }
.tjb ol.tjb-steps li.is-on span { background: var(--p); border-color: var(--p); color: #fff; }
.tjb ol.tjb-steps li.is-done { border-color: var(--p); }
.tjb ol.tjb-steps li.is-done span { background: var(--pl); border-color: var(--pl); color: var(--p); }

/* Cards */
.tjb-card { background: #fff; border-radius: var(--r); padding: 16px; margin: 0 0 12px; box-shadow: 0 1px 2px rgba(22,36,27,.06), 0 8px 24px rgba(22,36,27,.06); }
.tjb-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.tjb .tjb-h { font-size: 17px; line-height: 1.3; margin: 0 0 12px; color: var(--ink); font-weight: 800; padding: 0; }
.tjb-row .tjb-h { margin: 0; }
.tjb-month { font-size: 14px; color: var(--m); }
.tjb .tjb-hint { text-align: center; color: var(--m); font-size: 14px; margin: 8px 0 0; }

/* Day strip: horizontal scroll with snap, like a calendar app */
.tjb ul.tjb-days { list-style: none; margin: 0 -16px; padding: 2px 16px 6px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tjb ul.tjb-days::-webkit-scrollbar { display: none; }
.tjb ul.tjb-days li { margin: 0; padding: 0; list-style: none; flex: none; scroll-snap-align: center; }
.tjb ul.tjb-days li::before { content: none; }
.tjb .tjb-day { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 84px; border-radius: 16px; background: var(--bg); color: var(--t); text-decoration: none; line-height: 1.15; border: 1.5px solid transparent; transition: background .15s, transform .15s; }
.tjb .tjb-day span { font-size: 12px; color: var(--m); }
.tjb .tjb-day strong { font-size: 22px; font-weight: 800; margin: 4px 0 2px; }
.tjb .tjb-day em { font-style: normal; font-size: 11px; color: var(--m); }
.tjb .tjb-day:hover { border-color: var(--p); }
.tjb .tjb-day:active { transform: scale(.96); }
.tjb .tjb-day.is-on { background: var(--p); color: #fff; box-shadow: 0 6px 14px rgba(63,122,82,.3); }
.tjb .tjb-day.is-on span, .tjb .tjb-day.is-on em { color: #dcebe0; }
.tjb .tjb-day:focus-visible, .tjb a:focus-visible { outline: 3px solid var(--f); outline-offset: 2px; }

/* Time slots + segmented choice */
.tjb .tjb-g { margin: 4px 0 8px; font-size: 13px; font-weight: 700; color: var(--m); }
.tjb .tjb-times { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 10px; }
.tjb .tjb-times input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; clip: rect(0 0 0 0); }
.tjb .tjb-times label { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px; border-radius: 14px; background: var(--bg); border: 1.5px solid transparent; cursor: pointer; font-size: 16px; font-weight: 600; direction: ltr; margin: 0; transition: background .15s, transform .15s; }
.tjb .tjb-times label:hover { border-color: var(--p); }
.tjb .tjb-times label:active { transform: scale(.97); }
.tjb .tjb-times input:checked + label { background: var(--p); color: #fff; box-shadow: 0 4px 12px rgba(63,122,82,.28); }
.tjb .tjb-times input:focus-visible + label { outline: 3px solid var(--f); outline-offset: 2px; }
.tjb .tjb-seg { grid-template-columns: 1fr 1fr; background: var(--bg); padding: 4px; border-radius: 14px; gap: 4px; margin: 6px 0 0; }
.tjb .tjb-seg label { direction: rtl; background: transparent; min-height: 42px; border-radius: 11px; font-size: 15px; }
.tjb .tjb-seg input:checked + label { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(22,36,27,.15); }

/* Fields */
.tjb .tjb-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tjb .tjb-f { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.tjb .tjb-f legend { font-weight: 700; padding: 0; }
.tjb .tjb-f input, .tjb .tjb-f textarea { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 16px; font-weight: 400; padding: 12px 14px; min-height: 50px; border: 1.5px solid transparent; border-radius: 14px; background: var(--bg); color: var(--t); -webkit-appearance: none; appearance: none; }
.tjb .tjb-f textarea { min-height: 72px; resize: vertical; }
.tjb .tjb-f input[dir=ltr] { text-align: right; }
.tjb .tjb-f input:focus, .tjb .tjb-f textarea:focus { outline: none; border-color: var(--p); background: #fff; box-shadow: 0 0 0 4px var(--pl); }
.tjb .tjb-c { display: flex; gap: 10px; align-items: flex-start; margin: 2px 0 0; font-size: 14px; color: var(--t); cursor: pointer; }
.tjb .tjb-c input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--p); }
.tjb .tjb-c a { color: var(--p); }
.tjb .tjb-help { color: var(--m); font-size: 13px; font-weight: 400; margin: 6px 0 0; }

/* Sticky action bar */
.tjb-bar { position: sticky; bottom: 0; z-index: 5; margin: 0 -8px; padding: 12px 8px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, rgba(244,246,243,0)); text-align: center; }
.tjb .tjb-btn { display: block; width: 100%; min-height: 56px; border: 0; border-radius: 16px; background: var(--p); color: #fff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 20px rgba(63,122,82,.32); transition: background .15s, transform .15s; }
.tjb .tjb-btn:hover { background: var(--pd); }
.tjb .tjb-btn:active { transform: scale(.98); }
.tjb .tjb-btn:focus-visible { outline: 3px solid var(--f); outline-offset: 2px; }

/* Messages */
.tjb .tjb-err { background: #fdecea; color: #7a1a14; padding: 12px 14px; border-radius: 14px; font-weight: 700; margin: 0 0 12px; font-size: 15px; }
.tjb-ok { text-align: center; padding: 28px 20px; }
.tjb-check { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--pl); color: var(--p); margin: 0 0 10px; }
.tjb .tjb-ok h2 { margin: 0 0 14px; font-size: 22px; font-weight: 800; color: var(--ink); padding: 0; }
.tjb .tjb-ok p { margin: 0 0 8px; }
.tjb-sum { display: flex; gap: 10px; margin: 0 0 14px; }
.tjb-sum div { flex: 1; background: var(--bg); border-radius: 14px; padding: 10px; }
.tjb-sum span { display: block; font-size: 12px; color: var(--m); }
.tjb-sum strong { font-size: 18px; color: var(--ink); }
.tjb .tjb-link { display: inline-block; margin-top: 8px; color: var(--p); font-weight: 700; text-decoration: none; }

.tjb .tjb-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 600px) {
  .tjb-card { padding: 22px; }
  .tjb ul.tjb-days { margin: 0 -22px; padding: 2px 22px 6px; }
  .tjb .tjb-times { grid-template-columns: repeat(4, 1fr); }
  .tjb .tjb-seg { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 360px) { .tjb .tjb-2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .tjb * { transition: none !important; } }

/* ---- Calm layer (1.5.0): same direction as the new home page palette ---- */
body.tjb-page #main-content, body.tjb-page .entry-content { background: #F5F4EF; }
.tjb { --p:#2F4A4C; --pd:#223839; --pl:#E4ECE8; --acc:#A97C52; --accl:#F1E8DE; --ink:#1E2627; --t:#2A3334; --m:#5B6869; --b:#E3E2DA; --bg:#F5F4EF;
  font-family: "Assistant", "Segoe UI", Arial, sans-serif; font-size: 17px; line-height: 1.7; max-width: 540px; }
.tjb .tjb-title, .tjb .tjb-h, .tjb .tjb-ok h2 { font-family: "Frank Ruhl Libre", "David Libre", Georgia, serif; font-weight: 500; letter-spacing: 0; }
.tjb .tjb-title { font-size: 28px; }
.tjb .tjb-h { font-size: 20px; }
.tjb-top { margin-bottom: 6px; }
.tjb-logo { background: var(--accl); color: var(--acc); box-shadow: none; border-radius: 50%; }
.tjb .tjb-intro { margin: 0 0 22px; color: var(--m); font-size: 16px; line-height: 1.7; }
.tjb ol.tjb-steps { margin-bottom: 18px; }
.tjb ol.tjb-steps li { border-bottom-width: 2px; font-weight: 400; }
.tjb ol.tjb-steps li.is-on { font-weight: 600; }
.tjb-card { border: 1px solid var(--b); box-shadow: none; border-radius: 22px; padding: 20px; margin-bottom: 16px; }
.tjb .tjb-day { background: #fff; border: 1px solid var(--b); border-radius: 18px; }
.tjb .tjb-day strong { font-weight: 600; }
.tjb .tjb-day.is-on { background: var(--p); border-color: var(--p); box-shadow: none; }
.tjb .tjb-day.is-on span, .tjb .tjb-day.is-on em { color: #D5E2DD; }
.tjb .tjb-times label { background: #fff; border: 1px solid var(--b); border-radius: 999px; font-weight: 500; min-height: 46px; }
.tjb .tjb-times input:checked + label { background: var(--p); border-color: var(--p); box-shadow: none; }
.tjb .tjb-seg { background: var(--bg); border: 1px solid var(--b); border-radius: 999px; }
.tjb .tjb-seg label { border: 0; border-radius: 999px; background: transparent; }
.tjb .tjb-seg input:checked + label { background: #fff; color: var(--p); box-shadow: 0 1px 3px rgba(30,38,39,.12); }
.tjb .tjb-f { font-weight: 600; }
.tjb .tjb-f input, .tjb .tjb-f textarea { background: #fff; border: 1px solid var(--b); }
.tjb .tjb-f input:focus, .tjb .tjb-f textarea:focus { border-color: var(--p); box-shadow: 0 0 0 4px var(--pl); }
.tjb-bar { background: linear-gradient(to top, var(--bg) 70%, rgba(245,244,239,0)); }
.tjb .tjb-btn { border-radius: 999px; font-weight: 600; box-shadow: none; background: var(--p); }
.tjb .tjb-btn:hover { background: var(--pd); }
.tjb .tjb-calm { color: var(--m); font-size: 14px; margin: 8px 0 0; }
.tjb-check { background: var(--accl); color: var(--acc); }
.tjb-sum div { background: var(--bg); border: 1px solid var(--b); }
.tjb .tjb-link { color: var(--p); }
