/*
 * Chronosystem Co., Ltd. website
 * controls.css
 *
 * Created by Kimiharu Miyakoshi on 2026/12/04.
 * Copyright © 2003-2026 Chronosystem Co., Ltd. All Rights Reserved.
 */

/* chronosystem.app's theme button, language list, policy list and cookie button (components/ThemeSwitch.tsx,
   LangMenu.tsx, PolicyMenu.tsx). Ids in the header's selectors: the theme's own rules for its menu links are that strong */
div.chrono-menu{position:relative;display:inline-flex;align-items:center}
li.chrono-menu{position:relative}
.head-contact,.head-theme,.head-lang,.theme-toggle,.cookie-toggle,.lang-pill{box-sizing:border-box;margin:0;cursor:pointer;text-decoration:none;-webkit-tap-highlight-color:transparent;font-family:Inter,"Open Sans",system-ui,sans-serif;letter-spacing:normal}

/* the header: no border, the colour of the menu around them */
#header-outer #top .head-contact,#header-outer #top .head-theme{width:40px;height:40px;padding:0 !important;border:0;border-radius:999px;background:none;display:inline-grid;place-items:center;line-height:1}
#header-outer #top .head-lang{min-height:40px;padding:8px 14px !important;border:0;border-radius:999px;background:none;display:inline-flex;align-items:center;gap:6px;font-size:14px;font-weight:500;line-height:1}
#header-outer #top .head-lang,#header-outer #top .head-lang span{letter-spacing:normal;font-family:Inter,"Open Sans",system-ui,sans-serif;text-transform:none}
#header-outer #top .head-contact svg,#header-outer #top .head-theme svg{width:20px;height:20px}
#header-outer #top .head-lang svg:first-of-type{width:18px;height:18px}
#header-outer #top .head-contact:hover,#header-outer #top .head-theme:hover,#header-outer #top .head-lang:hover,#header-outer #top :is(.head-contact,.head-theme,.head-lang):focus-visible,#header-outer #top .head-lang[aria-expanded="true"]{background:color-mix(in srgb,currentColor 12%,transparent)}
#header-outer #top .head-contact:after,#header-outer #top .head-theme:after,#header-outer #top .head-lang:after{display:none !important}
@media (min-width:1040px){#header-outer #top nav > ul.buttons > li.chrono-contact-menu-item,#header-outer #top nav > ul.buttons > li.chrono-theme-menu-item,#header-outer #top nav > ul.buttons > li.chrono-lang-menu-item{margin-left:4px !important;margin-right:0;padding:0 !important}#header-outer #top nav > ul.buttons > li.chrono-contact-menu-item{margin-left:0 !important}#header-outer #top nav > ul.buttons > li:is(.chrono-contact-menu-item,.chrono-theme-menu-item,.chrono-lang-menu-item) > a{margin:0 !important}}
/* phones: a 44px tap area each, a little tighter around them so the menu button still fits */
@media (max-width:1039px){
  #header-outer #top .head-theme{width:44px;height:44px}
  #header-outer #top .head-lang{min-height:44px;padding:8px 10px !important;gap:4px}
  #header-outer .cs-mobile-only.mobile-header li.chrono-theme-menu-item,#header-outer .cs-mobile-only.mobile-header li.chrono-lang-menu-item{margin:0 !important}
}

/* the footer's bottom row, as on chronosystem.app: the copyright, then the controls (under it, to the left, when narrow) */
#footer-outer #copyright{padding:0}
.chrono-foot-bottom{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;padding:16px 0 28px;border-top:1px solid var(--ct-border,rgba(0,0,0,.15))}
#footer-outer #copyright .chrono-foot-bottom p{margin:0;padding:0}
/* clear of the to-top button (61px from the right edge) where the container comes that close, at the bottom of the page */
@media (min-width:690px){.chrono-foot-bottom{padding-right:max(0px,calc(69px - (100vw - 100%) / 2))}}
/* icons the size of the theme button, then the language pill */
.chrono-foot-controls{display:flex;flex-wrap:wrap;align-items:center;gap:14px;color:#333333}
html[data-theme="dark"] .chrono-foot-controls{color:var(--ct-text)}
.theme-toggle,.cookie-toggle{width:44px;height:44px;padding:0;border:0;border-radius:999px;background:transparent;color:inherit;display:inline-flex;align-items:center;justify-content:center}
.lang-pill{height:46px;padding:0 16px 0 14px;border:1.5px solid color-mix(in srgb,currentColor 85%,transparent);border-radius:999px;background:transparent;color:inherit;font-size:15px;font-weight:500;line-height:1;display:inline-flex;align-items:center;gap:9px}
:is(.theme-toggle,.cookie-toggle,.lang-pill):is(:hover,:active,:focus-visible,[aria-expanded="true"]){background:color-mix(in srgb,currentColor 10%,transparent)}
:is(.theme-toggle,.cookie-toggle,.lang-pill,#to-top):focus-visible{outline:2px solid currentColor;outline-offset:2px}
/* the copyright's link colours (ids) would win over the controls' and the lists' */
#footer-outer #copyright .chrono-foot-controls a:is(.lang-pill,.policy-toggle):not(.cs-button){color:inherit !important}
#footer-outer #copyright .chrono-menu .lang-list a[role="menuitem"][href]{color:#ffffff !important}

/* the to-top button: a 44px circle where the theme's square was (same right and bottom edges), with a background of
   its own as it floats over the page */
:root body #to-top{box-sizing:border-box;width:44px;height:44px;right:17px;bottom:-7.5px;padding:0;border:1px solid var(--ct-border,rgba(0,0,0,.15));border-radius:999px !important;background:#ffffff;color:#333333;box-shadow:none;overflow:visible}
html[data-theme="dark"] body #to-top{background:var(--ct-surface);color:var(--ct-text)}
:root body #to-top:before,:root body #to-top:after{display:none}
:root body #to-top svg{position:absolute;top:50%;left:50%;width:20px;height:20px;transform:translate(-50%,-50%)}
/* !important: the theme paints the hover #333333 !important, hiding the dark arrow in light mode */
:root body #to-top:is(:hover,:active,:focus-visible){background:color-mix(in srgb,currentColor 10%,#ffffff) !important}
html[data-theme="dark"] body #to-top:is(:hover,:active,:focus-visible){background:color-mix(in srgb,currentColor 10%,var(--ct-surface)) !important}

/* the lists: black, as on chronosystem.app, in either theme */
.lang-list{position:absolute;z-index:1000000;min-width:200px;margin:0;padding:8px 0;background:#000000;border:1px solid #2a2a28;border-radius:18px;box-shadow:0 12px 40px rgba(0,0,0,.5);text-align:start;font-family:Inter,"Open Sans",system-ui,sans-serif}
.lang-list[hidden]{display:none}
[data-side="bottom"] > .lang-list{top:calc(100% + 10px)}
[data-side="top"] > .lang-list{bottom:calc(100% + 10px)}
[data-align="end"] > .lang-list{right:0}
[data-align="start"] > .lang-list{left:0}
:root .chrono-menu .lang-list a[role="menuitem"][href],:root #header-outer .chrono-menu .lang-list a[role="menuitem"][href]{display:block;padding:12px 26px;font-size:16px;font-weight:400;line-height:1.4;letter-spacing:normal;color:#ffffff !important;opacity:1 !important;text-decoration:none;text-transform:none;white-space:nowrap;outline:none}
:root .chrono-menu .lang-list a[role="menuitem"][href]:is(:hover,:focus),:root #header-outer .chrono-menu .lang-list a[role="menuitem"][href]:is(:hover,:focus){background:#2a2a28}
:root .chrono-menu .lang-list a[role="menuitem"][aria-current]{font-weight:600}
