/* //////////////////////////////////////////////////////////////////////////
   Tozan headless extras — search overlay + dark/light toggle
   ////////////////////////////////////////////////////////////////////////// */

/* Dark / light toggle — plain emoji, no circular chrome
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
.tz-theme-toggle {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   padding: 0;
   border: none;
   background: none;
   cursor: pointer;
   font-size: 1.4rem;
   line-height: 1;
   color: inherit;
   -webkit-tap-highlight-color: transparent;
}

.tz-theme-toggle:focus {
   outline: none;
}

.tz-theme-toggle:focus-visible {
   outline: 2px solid currentColor;
   outline-offset: 3px;
   border-radius: 2px;
}

li.header-theme {
   display: flex;
   align-items: center;
   margin-right: calc(var(--mini-gap) / 2);
}

/* Search overlay
   –––––––––––––––––––––––––––––––––––––––––––––––––––– */
.tz-search {
   position: fixed;
   inset: 0;
   z-index: 9999;
   display: flex;
   justify-content: center;
   align-items: flex-start;
   padding: clamp(48px, 12vh, 140px) 16px 16px;
   background: var(--opacity-rgba, rgba(0, 0, 0, .5));
   backdrop-filter: blur(6px);
   -webkit-backdrop-filter: blur(6px);
   animation: tz-fade .14s ease;
}

@keyframes tz-fade {
   from { opacity: 0; }
   to { opacity: 1; }
}

.tz-search-box {
   width: min(640px, 100%);
   max-height: 76vh;
   display: flex;
   flex-direction: column;
   background: var(--color-four);
   color: var(--color-font-one);
   border: var(--border);
   border-radius: var(--radius-large);
   box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
   overflow: hidden;
}

.tz-search-field {
   display: flex;
   align-items: center;
   gap: 12px;
   padding: 18px 20px;
   border-bottom: var(--border);
}

.tz-search-ico {
   display: inline-flex;
   opacity: .55;
}

.tz-search-ico svg {
   width: 18px;
   height: 18px;
   fill: currentColor;
}

.tz-search-field input {
   flex: 1;
   border: 0;
   outline: 0;
   background: transparent;
   color: inherit;
   font-size: 1.1rem;
   font-family: inherit;
}

.tz-search-field input::placeholder {
   color: var(--color-font-one);
   opacity: .45;
}

.tz-search-close {
   flex: none;
   padding: .25em .6em;
   border-radius: var(--radius-small);
   background: var(--color-three);
   color: var(--color-font-one);
   font-size: .72rem;
   letter-spacing: .04em;
   text-transform: uppercase;
   cursor: pointer;
   opacity: .8;
}

.tz-search-close:hover {
   opacity: 1;
}

.tz-search-results {
   overflow-y: auto;
   padding: 8px;
}

.tz-search-hint {
   padding: 22px 16px;
   text-align: center;
   opacity: .6;
   font-size: .95rem;
}

.tz-search-results ul {
   list-style: none;
   margin: 0;
   padding: 0;
}

.tz-search-results li a {
   display: flex;
   flex-direction: column;
   gap: 4px;
   padding: 12px 14px;
   border-radius: var(--radius-medium);
   text-decoration: none;
   color: inherit;
   transition: background-color .12s ease;
}

.tz-search-results li a:hover,
.tz-search-results li a:focus-visible {
   background: var(--color-two);
}

.tz-result-title {
   font-weight: var(--font-weight-medium, 600);
   font-size: 1rem;
   line-height: 1.3;
}

.tz-result-excerpt {
   font-size: .85rem;
   opacity: .65;
   display: -webkit-box;
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
   overflow: hidden;
}

.tz-result-tags {
   display: flex;
   flex-wrap: wrap;
   gap: 6px;
   margin-top: 2px;
}

.tz-result-tag {
   font-size: .68rem;
   padding: .15em .6em;
   border-radius: var(--radius-tag, calc(var(--radius) * 5));
   background: var(--color-three);
   opacity: .85;
}
