/* Site chrome for satchurch.lv: header, dropdown, mobile drawer, footer Element (.satfooter).
 *
 * Colours, sizes and spacing are Kadence Customizer settings (palette slots, so the colour switch flips
 * them). This file only adds what the Customizer cannot express: rounded shapes, shadows, the drawer
 * layout and the language pills. No raw hex: palette vars, color-mix hairlines, and the on-photo
 * whites of the transparent header, which are the same in both modes.
 * Excluded from LiteSpeed combine via optm-css_exc "satchurch-chrome"; must stay a real file.
 */

body{
  --chrome-tint:color-mix(in srgb, var(--global-palette1) 12%, transparent);
  --chrome-hairline:color-mix(in srgb, var(--global-palette3) 12%, transparent);
  --chrome-shadow:0 24px 48px -24px rgba(30,16,45,.45), 0 2px 8px rgba(30,16,45,.08);
  --chrome-on-photo-tint:rgba(255,255,255,.16);
  --chrome-control:40px;
}
body.color-switch-dark{--chrome-shadow:0 24px 48px -20px rgba(0,0,0,.8)}

/* --- Desktop navigation: pill hover --------------------------------------- */
body .header-navigation .header-menu-container > ul > li.menu-item > a{border-radius:999px;transition:background-color .2s ease,color .2s ease}
body .header-navigation .header-menu-container > ul > li.menu-item > a .dropdown-nav-toggle{opacity:.7}

/* Laptops (1280-1439px): tighter items keep the longest (Russian) menu on one row. */
@media (min-width:1280px) and (max-width:1439px){
  body #site-navigation .primary-menu-container > ul > li.menu-item > a{padding-left:.55em;padding-right:.55em;font-size:14px}
  body #main-header .site-header-main-section-right{gap:0}
}

/* Language switcher: globe and short code at the top level, full names in the dropdown. */
body .header-navigation .header-menu-container > ul > li.wpml-ls-menu-item > a .wpml-ls-native{font-size:0}
body .header-navigation .header-menu-container > ul > li.wpml-ls-menu-item > a .wpml-ls-native::after{
  content:attr(lang);font-size:14px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
body .header-navigation .header-menu-container > ul > li.wpml-ls-menu-item > a .nav-drop-title-wrap::before{
  content:"";display:inline-block;flex:none;width:17px;height:17px;margin-right:7px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center/contain no-repeat}
body .wpml-ls-menu-item .wpml-ls-flag{display:none}

/* --- Dropdown panel ------------------------------------------------------- */
body .header-navigation .header-menu-container ul ul.sub-menu{
  border:1px solid var(--chrome-hairline);border-radius:16px;padding:8px;box-shadow:var(--chrome-shadow)}
body .header-navigation .header-menu-container ul ul li.menu-item > a{border-radius:10px;font-weight:500}
body .header-navigation .header-menu-container ul ul ul.sub-menu{margin-left:8px}

/* --- Header actions: round icon buttons ----------------------------------- */
body .search-toggle-open-container .search-toggle-open,
body .kadence-color-palette-header-switcher .kadence-color-palette-switcher button.kadence-color-palette-toggle,
body .kadence-color-palette-mobile-switcher .kadence-color-palette-switcher button.kadence-color-palette-toggle{
  width:var(--chrome-control);height:var(--chrome-control);padding:0;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;box-shadow:none;transition:background-color .2s ease}
/* Kadence draws the colour switch as a filled chip; here it matches the search icon. */
body .kadence-color-palette-header-switcher .kadence-color-palette-switcher button.kadence-color-palette-toggle{background:transparent;color:var(--global-palette3);filter:none}
body .kadence-color-palette-header-switcher .kadence-color-palette-switcher button.kadence-color-palette-toggle:hover,
body:not(.transparent-header) .search-toggle-open-container .search-toggle-open:hover{background:var(--chrome-tint);filter:none}
body.transparent-header .kadence-color-palette-header-switcher .kadence-color-palette-switcher button.kadence-color-palette-toggle{color:var(--global-palette9)}
body.color-switch-dark.transparent-header .kadence-color-palette-header-switcher .kadence-color-palette-switcher button.kadence-color-palette-toggle{color:var(--global-palette3)}
body.transparent-header .search-toggle-open-container .search-toggle-open:hover,
body.transparent-header .kadence-color-palette-header-switcher .kadence-color-palette-switcher button.kadence-color-palette-toggle:hover{background:var(--chrome-on-photo-tint)}
body .kadence-color-palette-mobile-switcher .kadence-color-palette-switcher button.kadence-color-palette-toggle,
body .kadence-color-palette-mobile-switcher .kadence-color-palette-switcher button.kadence-color-palette-toggle:hover{
  width:44px;height:44px;background:var(--chrome-tint);color:var(--global-palette3);filter:none}
body .site-header-main-section-right{gap:4px}

/* Mobile menu button: frosted circle over the photo header, tinted circle elsewhere. */
body .mobile-toggle-open-container .menu-toggle-open{border-radius:999px}
body.mobile-transparent-header .mobile-toggle-open-container .menu-toggle-open,
body.mobile-transparent-header .mobile-toggle-open-container .menu-toggle-open:hover{
  background:var(--chrome-on-photo-tint);color:var(--global-palette9);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
body.color-switch-dark.mobile-transparent-header .mobile-toggle-open-container .menu-toggle-open{color:var(--global-palette3)}
body #mobile-header .site-header-main-section-right{gap:8px}
body #mobile-header .site-branding .site-title{text-wrap:balance;max-width:9.5em}

/* --- Mobile drawer -------------------------------------------------------- */
body #mobile-drawer .drawer-header{padding:14px 20px 0;min-height:68px;align-items:center}
body #mobile-drawer .drawer-header .menu-toggle-close{width:44px;height:44px;padding:0;box-sizing:border-box;border-radius:999px;justify-content:center}
body #mobile-drawer .drawer-content.mobile-drawer-content{display:flex;flex-wrap:wrap;align-items:center;gap:20px 12px;padding:4px 20px 40px}
body #mobile-drawer .drawer-content > .site-header-item{width:100%;margin:0}
body #mobile-drawer .drawer-content > .site-header-item:has(.header-mobile-social-wrap),
body #mobile-drawer .drawer-content > .site-header-item:has(.kadence-color-palette-mobile-switcher){width:auto}
body #mobile-drawer .drawer-content > .site-header-item:has(.kadence-color-palette-mobile-switcher){margin-left:auto}

body #mobile-drawer .header-mobile-search-bar,
body #mobile-drawer .header-mobile-search-bar form{width:100%;max-width:none}
body #mobile-drawer .search-form{position:relative}
body #mobile-drawer .search-form input.search-field{
  width:100%;height:48px;border-radius:999px;border:1px solid var(--chrome-hairline);background:var(--chrome-tint);
  padding:0 52px 0 20px;font-size:16px;color:var(--global-palette3)}
body #mobile-drawer .search-form input.search-field::placeholder{color:var(--global-palette4);opacity:.85}

body #mobile-drawer .mobile-navigation ul.menu > li.menu-item:not(.wpml-ls-menu-item) > a,
body #mobile-drawer .mobile-navigation ul.menu > li.menu-item:not(.wpml-ls-menu-item) > .drawer-nav-drop-wrap > a{
  font-family:var(--global-heading-font-family);font-size:22px;font-weight:600;letter-spacing:-.01em}
body #mobile-drawer .mobile-navigation ul.sub-menu li.menu-item > a,
body #mobile-drawer .mobile-navigation ul.sub-menu li.menu-item > .drawer-nav-drop-wrap > a{color:var(--global-palette4);padding-left:2px}
body #mobile-drawer .mobile-navigation ul.sub-menu ul.sub-menu{padding-left:14px}
body #mobile-drawer .mobile-navigation .drawer-nav-drop-wrap .drawer-sub-toggle{
  width:40px;height:40px;padding:0;justify-content:center;align-self:center;border:0;border-radius:999px;background:var(--chrome-tint)}
body #mobile-drawer .mobile-navigation ul.sub-menu .drawer-nav-drop-wrap,
body #mobile-drawer .mobile-navigation ul.sub-menu li > a{border-bottom:0}

/* Languages: the WPML menu item becomes a row of pills (LV EN RU). */
body #mobile-drawer .mobile-navigation li.wpml-ls-menu-item{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:16px 0 4px;border:0}
body #mobile-drawer .mobile-navigation li.wpml-ls-menu-item > .drawer-nav-drop-wrap{border:0;display:contents}
body #mobile-drawer .mobile-navigation li.wpml-ls-menu-item .drawer-sub-toggle{display:none}
body #mobile-drawer .mobile-navigation li.wpml-ls-menu-item > ul.sub-menu,
body #mobile-drawer .mobile-navigation li.wpml-ls-menu-item > ul.sub-menu > li{display:contents}
body #mobile-drawer .mobile-navigation ul.menu > li.wpml-ls-menu-item a{
  width:auto;min-width:56px;min-height:40px;padding:0 16px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--chrome-hairline);border-radius:999px;font-family:inherit;font-size:14px;font-weight:600;letter-spacing:.04em}
body #mobile-drawer .mobile-navigation li.wpml-ls-current-language > .drawer-nav-drop-wrap > a,
body #mobile-drawer .mobile-navigation li.wpml-ls-current-language > a{background:var(--chrome-tint);border-color:transparent}
body #mobile-drawer .mobile-navigation li.wpml-ls-menu-item a .wpml-ls-native{font-size:0}
body #mobile-drawer .mobile-navigation li.wpml-ls-menu-item a .wpml-ls-native::after{content:attr(lang);font-size:14px;text-transform:uppercase}

/* Visit text + directions button read as one card. */
body #mobile-drawer .mobile-html{border-radius:20px 20px 0 0;padding:18px 20px 4px;background:var(--chrome-tint);color:var(--global-palette4);font-size:16px;line-height:1.55}
body #mobile-drawer .mobile-html p{margin:0}
body #mobile-drawer .mobile-html strong{color:var(--global-palette3)}
body #mobile-drawer .drawer-content > .site-header-item:has(.mobile-html){margin-bottom:-20px}
body #mobile-drawer .mobile-header-button2-wrap{width:100%;border-radius:0 0 20px 20px;padding:14px 20px 20px;background:var(--chrome-tint)}
body #mobile-drawer .mobile-header-button2-wrap .button{border-radius:999px;font-weight:600}

/* --- Footer Element ------------------------------------------------------- */
.satfooter{color:var(--global-palette4);font-size:15px;line-height:1.6}
.satfooter p{margin:0 0 .6em}
.satfooter a{color:var(--global-palette4);text-decoration:none}
.satfooter a:hover,
.satfooter a:focus-visible{color:var(--global-palette1);text-decoration:underline;text-underline-offset:3px}
.satfooter ul.wp-block-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.satfooter p a + a{margin-left:16px}
