/* Site CSS for what theme.json can't express. Keep it small: tokens and block styles belong in theme.json. */

:root { --ub-focus: var(--wp--preset--color--primary); }

/* The header template part sticks to the top (below the admin bar when signed in) */
header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
}
/* The phone's open menu is a full-screen overlay inside the header: while it's open the header goes above everything
   (floating chat and call buttons, a demo's proposal strip), or they covered its close button and first items (the
   pitch desk, P26, 2026-11-13). The menu itself: "The phone menu", below. */
header.wp-block-template-part:has(.wp-block-navigation__responsive-container.is-menu-open) { z-index: 100001; }
.ub-header { background: var(--wp--preset--color--base); border-block-end: 1px solid var(--wp--preset--color--line); }

/* Full-width sections touch each other (no root block gap between them) */
.wp-site-blocks > main > .alignfull, .entry-content > .alignfull { margin-block-start: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Links inside text stay underlined; buttons never shrink under 48 px */
.wp-element-button, .wp-block-button__link { min-block-size: 48px; display: inline-flex; align-items: center; justify-content: center; }
/* Buttons answer the pointer (design checklist, "States"): the colour change on hover is theme.json's, faded in over
   200 ms on the site's curve (custom.motion.ease, which UB Kit's transitions use too); pressed, a button sits 1 px
   lower; the keyboard's focus ring is UB Kit's. The fade runs on the way into hover only: a script's state change
   isn't animated (WooCommerce's variation form disables its button on load, which `ub check` motion saw as movement
   in the first screen). Neither under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
	:is(.wp-element-button, .wp-block-button__link):hover {
		transition-property: background-color, color, border-color;
		transition-duration: 0.2s;
		transition-timing-function: var(--wp--custom--motion--ease, cubic-bezier(0.22, 1, 0.36, 1));
	}
	:is(.wp-element-button, .wp-block-button__link):active { transform: translateY(1px); }
	.wp-block-button.is-style-ub-link > .wp-block-button__link:active { transform: none; }
}
/* A button that reads as a text link (styles/blocks/button-link.json): what a page binds a link to (the e-mail and
   phone from ub/contact: a binding fills a whole block's URL, and only a button has one; a link inside a paragraph's
   text can't be bound). In the text's flow, still a 44 px target; underlined like the theme's links until hovered. */
.wp-block-button.is-style-ub-link > .wp-block-button__link { min-block-size: 44px; justify-content: flex-start; }
.wp-block-button.is-style-ub-link > .wp-block-button__link:hover { background: transparent; text-decoration: none; }

/* Text (design checklist, "Type"): headings balance their lines, body text keeps a word from sitting alone on its last
   line; figures line up in tables, prices and totals. Zero specificity: a block's own setting wins. */
:where(h1, h2, h3, h4, h5, h6) { text-wrap: balance; }
:where(p, li, dd, blockquote, figcaption) { text-wrap: pretty; }
:where(table, .woocommerce-Price-amount, .wc-block-components-formatted-money-amount, .wc-block-formatted-money-amount, .wc-block-components-product-price) { font-variant-numeric: tabular-nums; }

/* Full-screen sections (a cover's "full height", a group's minimum height of 100vh) fit the screen a phone shows:
   100svh is the height with the browser's bars showing. 100vh is the height without them, so the section's end
   starts under the toolbar; 100dvh follows the bars as they slide, re-laying the page out while it scrolls. The
   editor writes 100vh into the block's style attribute, hence !important. Same on desktop, where the three agree. */
@supports (min-height: 100svh) {
	:is([style*="min-height:100vh"], [style*="min-height: 100vh"]) { min-height: 100svh !important; }
}

/* The header's menu (.ub-nav). From theme.json custom.header.menuBreakpoint up it sits in the bar; below it, the
   menu button opens core's overlay (functions.php writes that media query; core's own is fixed at 600 px:
   upperbiz-ro H14). A submenu's class lands on its <li> and on its inner <ul> too (core copies it), so style a
   submenu as li.my-class, never .my-class alone. */
.ub-nav .wp-block-navigation__responsive-container-open { inline-size: 2.75rem; block-size: 2.75rem; align-items: center; justify-content: center; }

/* In the overlay each submenu folds behind its own button (assets/nav.js; core keeps every submenu open there:
   upperbiz-ro H27). The parent's link and its button share a row, the submenu goes under them. Without JavaScript
   there are no buttons and every submenu stays open, as core shows it. */
.ub-nav__fold { display: none; }
.ub-nav .wp-block-navigation__responsive-container.is-menu-open li.has-child.ub-nav__folds { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 0.25rem; }
.ub-nav .wp-block-navigation__responsive-container.is-menu-open li.ub-nav__folds > .wp-block-navigation__submenu-container { flex-basis: 100%; }
.ub-nav .wp-block-navigation__responsive-container.is-menu-open li.ub-nav__folds:not(.ub-nav__open) > ul.wp-block-navigation__submenu-container { display: none; }
.ub-nav .wp-block-navigation__responsive-container.is-menu-open li.ub-nav__folds > button.wp-block-navigation-item__content.wp-block-navigation-submenu__toggle { display: none; } /* a click-only parent: the fold button carries its label */
.ub-nav .is-menu-open .ub-nav__fold {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-block-size: 2.75rem; min-inline-size: 2.75rem;
	margin: 0; padding: 0 0.5rem; border: 0; border-radius: 999px; background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.ub-nav .is-menu-open .ub-nav__fold::after {
	content: ""; inline-size: 0.5rem; block-size: 0.5rem; border: solid currentColor; border-width: 0 2px 2px 0;
	transform: translateY(-25%) rotate(45deg);
}
.ub-nav .is-menu-open .ub-nav__open > .ub-nav__fold::after { transform: translateY(25%) rotate(-135deg); }
.ub-nav .is-menu-open .ub-nav__fold:hover { background: var(--wp--preset--color--surface); }

/* The phone menu: core's overlay as a panel in the theme's colours, the way upperbiz-ro and grun-ro have theirs (User,
   2026-11-13: "dunno why we haven't used the same menu we have on upperbiz and grun tbh. it looks great but I don't
   mind having other menus"). Items from the left whatever the bar's alignment (core keeps a right-aligned menu's items
   on the right in the overlay), a larger first level with a line under each item, submenus indented under their
   parent, a 44 px close button with room under it. Colours, sizes and lines are the theme's tokens; a site restyles it
   in its own CSS. */
.ub-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: max(1rem, env(safe-area-inset-top, 0px)) var(--wp--style--root--padding-right) 2rem var(--wp--style--root--padding-left);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
}
.ub-nav .wp-block-navigation__responsive-container.is-menu-open, .ub-nav .is-menu-open * { --navigation-layout-justification-setting: flex-start; --navigation-layout-justify: flex-start; --navigation-layout-align: flex-start; }
.ub-nav .is-menu-open :is(.wp-block-navigation__responsive-container-content, .wp-block-navigation__container, .wp-block-navigation-item, .wp-block-navigation__submenu-container) { align-items: flex-start; text-align: start; }
.ub-nav .is-menu-open .wp-block-navigation__responsive-container-content { padding-block-start: 3.5rem; }
.ub-nav .is-menu-open .wp-block-navigation__container { gap: 0; inline-size: 100%; font-size: var(--wp--preset--font-size--large); font-weight: 600; }
.ub-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item { inline-size: 100%; border-block-end: 1px solid var(--wp--preset--color--line); }
.ub-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { flex: 1 1 auto; padding-block: 0.75rem; }
.ub-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container {
	gap: 0; margin-inline-start: 0.25rem; padding: 0 0 0.75rem 1rem; border-inline-start: 2px solid var(--wp--preset--color--line);
	font-size: var(--wp--preset--font-size--medium); font-weight: 500;
}
.ub-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding-block: 0.5rem; }
.ub-nav .is-menu-open .wp-block-navigation-item__description { display: none; }
.ub-nav .wp-block-navigation__responsive-container-close { inline-size: 2.75rem; block-size: 2.75rem; display: inline-flex; align-items: center; justify-content: center; }

/* Tables (rulotecluj-ro H10, upperbiz-ro H39): a column's word-break and core's fixed cell widths broke words mid-way
   on a phone ("Consimțămâ ntul"). Words stay whole; under 600 px the cells take their content's width and a table too
   wide scrolls sideways in its own box. Cell borders in the theme's line colour, not core's dark default. */
.wp-block-table :where(th, td) { word-break: normal; overflow-wrap: normal; hyphens: auto; border-color: var(--wp--preset--color--line, currentColor); }
@media (width < 600px) {
	.wp-block-table { overflow-x: auto; }
	.wp-block-table table.has-fixed-layout { table-layout: auto; }
}

/* ---- Rarău Retreat (direction, 2026-11-23): minimal black, grey, beige, the logo's green ---- */

/* Header: logo left; menu and the "Rezervă" button right. On phones the logo shrinks to leave room for both. */
.ub-header__end { min-inline-size: 0; }
.ub-header__book .wp-block-button__link { padding-inline: 1.25rem; }
@media (width < 600px) {
	.ub-header__logo img { inline-size: 118px; }
	.ub-header__book .wp-block-button__link { padding-inline: 0.9rem; font-size: 0.8125rem; }
}

/* A small spaced capital label above a heading (the logo's spaced capitals) */
.ub-eyebrow { font-size: var(--wp--custom--eyebrow--font-size, 0.75rem); font-weight: 500; text-transform: uppercase; letter-spacing: var(--wp--custom--eyebrow--letter-spacing, 0.18em); color: var(--wp--preset--color--muted); }
.has-deep-background-color .ub-eyebrow, .has-primary-background-color .ub-eyebrow { color: inherit; opacity: 0.8; }

/* Footer: brand and three columns, the company line and legal links under a thin rule */
.ub-footer__top { display: grid; gap: var(--wp--preset--spacing--50); grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.ub-footer__top > * { margin-block: 0; }
.ub-footer__title { font-family: var(--wp--preset--font-family--body); font-size: var(--wp--custom--eyebrow--font-size, 0.75rem); font-weight: 500; text-transform: uppercase; letter-spacing: 0.18em; opacity: 0.8; margin-block-end: 0.75rem; }
.ub-footer__tagline { max-inline-size: 22rem; opacity: 0.85; }
.ub-footer__rule { opacity: 0.2; border: 0; block-size: 1px; }
.ub-footer__nav { text-transform: none; letter-spacing: 0; font-size: var(--wp--preset--font-size--medium); }
.ub-footer .is-style-ub-link .wp-block-button__link { color: inherit; text-transform: none; letter-spacing: 0; font-size: var(--wp--preset--font-size--medium); }
.ub-footer__company p { margin: 0; }

/* The /stil/ page's swatches and site-map table (private page) */
.ub-swatches { gap: 0.75rem; }
.ub-swatch { min-block-size: 9rem; padding: 1rem; display: flex; align-items: flex-end; border: 1px solid var(--wp--preset--color--line); }
.ub-swatch p { margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.45; }
.ub-sitemap { font-size: var(--wp--preset--font-size--small); }
.ub-sitemap :where(th, td) { padding: 0.6rem 0.75rem; vertical-align: top; text-align: start; }
.ub-sitemap thead { border-block-end: 2px solid var(--wp--preset--color--ink); }

/* A button styled as a text link keeps the text's case (the buttons' capitals are for real buttons) */
.wp-block-button.is-style-ub-link > .wp-block-button__link { text-transform: none; letter-spacing: 0; font-size: inherit; font-weight: inherit; }

/* The house rules beside the booking calendar: a plain list with thin lines, no bullets */
.ub-rules { list-style: none; padding-inline-start: 0; }
.ub-rules li { padding-block: 0.6rem; border-block-end: 1px solid var(--wp--preset--color--line); }
.ub-rules li:last-child { border-block-end: 0; }
@media (width < 600px) {
	.ub-sitemap thead { display: none; }
	.ub-sitemap :is(table, tbody, tr, td) { display: block; }
	.ub-sitemap tr { padding-block: 0.6rem; border-block-end: 1px solid var(--wp--preset--color--line); }
	.ub-sitemap td { border: 0; padding: 0.1rem 0; }
	.ub-sitemap td:first-child { font-weight: 600; }
}

/* Table lines in the theme's line colour: core's `.wp-block-table td { border: 1px solid }` (and the header's 3 px rule)
   reset the colour to the text's, after the starter's zero-specificity rule above (batch 2, /zona/'s distances). */
.wp-block-table.wp-block-table :is(th, td, thead, tfoot) { border-color: var(--wp--preset--color--line); }

/* The menu marks the page you're on (QA Q4): a thin line under it in the bar; in the phone menu, the green. */
.ub-nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.45em; }
.ub-nav .is-menu-open .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content { text-decoration: none; color: var(--wp--preset--color--primary); }
/* The phone menu at Tomi's 15 px (menu: 14 px on desktop, 15 px on phones), in the bar's spaced capitals (QA Q9) */
.ub-nav .is-menu-open .wp-block-navigation__container { font-size: 0.9375rem; font-weight: 500; }
