/*
Theme Name:        CoSeat
Theme URI:         https://coseat.example.com
Description:       Block theme for the CoSeat team-seat marketplace. Brand colours, Plus Jakarta Sans, a sticky header with the seat CTA, and full-width page templates for the marketplace and member workspace. Pair it with the CoSeat plugin, which holds the escrow, payments and dashboards.
Version:           1.4.4
Requires at least: 6.4
Requires PHP:      8.0
Tested up to:      6.8
Author:            CoSeat
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       coseat-theme
Tags:              block-patterns, full-site-editing, one-column, wide-blocks, custom-colors, editor-style
*/

/* Small touches theme.json can't express. */
.cst-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); background: rgb(255 255 255 / .82) !important; border-bottom: 1px solid var(--wp--preset--color--line); }
.admin-bar .cst-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .cst-header { top: 46px; } }

.cst-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.cst-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, #4F46E5, #C026D3 55%, #F97316); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: -.02em; box-shadow: 0 6px 16px -8px rgb(79 70 229 / .7); }
.cst-header .wp-block-site-title a { text-decoration: none; }

.cst-header .wp-block-navigation-item__content { font-weight: 500; color: var(--wp--preset--color--soft); transition: color .15s; }
.cst-header .wp-block-navigation-item__content:hover,
.cst-header .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--ink); }

.wp-element-button, .wp-block-button__link { transition: transform .15s ease, box-shadow .15s ease, background-color .15s; }
.wp-element-button:hover, .wp-block-button__link:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgb(15 23 42 / .45); }
.wp-element-button:active, .wp-block-button__link:active { transform: translateY(0); }
.is-style-outline > .wp-block-button__link { background: #fff; }

.cst-footer a { text-decoration: none; color: var(--wp--preset--color--soft); }
.cst-footer a:hover { color: var(--wp--preset--color--ink); }
.cst-footer .wp-block-navigation { gap: 18px; }

.cst-card { border: 1px solid var(--wp--preset--color--line); border-radius: 18px; background: #fff; }
.cst-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--wp--preset--color--indigo-50); color: var(--wp--preset--color--indigo); font-size: 13px; font-weight: 600; }

/* Plugin pages: let CoSeat sections run edge to edge inside the theme's wide width. */
.cst-app > .coseat.alignwide { margin-top: 0; }
.cst-app { padding-top: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  .wp-element-button, .wp-block-button__link { transition: none; }
  .wp-element-button:hover, .wp-block-button__link:hover { transform: none; }
}

/* Keep the footer at the bottom on short pages. */
.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1 0 auto; }

/* Legal pages */
.cst-note { padding: 14px 16px; border-radius: 14px; background: var(--wp--preset--color--indigo-50); font-size: 0.9375rem; }
.page .wp-block-post-content h2 { margin-top: 2.4rem; font-size: 1.5rem; }
.page .wp-block-post-content h3 { margin-top: 1.6rem; font-size: 1.125rem; }
.page .wp-block-post-content li { margin-bottom: .4rem; }


/* ── Theme toggle ── */
.cst-theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--wp--preset--color--line); background: transparent; color: var(--wp--preset--color--ink); cursor: pointer; transition: background-color .15s; }
.cst-theme-toggle:hover { background: color-mix(in srgb, var(--wp--preset--color--ink) 8%, transparent); }
.cst-theme-toggle:focus-visible { outline: 2px solid var(--wp--preset--color--indigo); outline-offset: 2px; }
.cst-ico-sun { display: none; }
html[data-theme="dark"] .cst-ico-sun { display: block; }
html[data-theme="dark"] .cst-ico-moon { display: none; }

/* ── Dark theme: swap the palette tokens; blocks that use them follow. ── */
html[data-theme="dark"], html[data-theme="dark"] body {
  color-scheme: dark;
  --wp--preset--color--ink: #EEF2F7;
  --wp--preset--color--soft: #A6B0C3;
  --wp--preset--color--faint: #6B778C;
  --wp--preset--color--line: #263044;
  --wp--preset--color--canvas: #0B0F1A;
  --wp--preset--color--white: #121826;
  --wp--preset--color--indigo: #A5B4FC;
  --wp--preset--color--indigo-50: #1E1B4B;
}
html[data-theme="dark"] body { background: #0B0F1A; color: #EEF2F7; }
html[data-theme="dark"] .cst-header { background: rgb(11 15 26 / .82) !important; }
html[data-theme="dark"] .cst-mark { box-shadow: none; }
html[data-theme="dark"] .wp-element-button, html[data-theme="dark"] .wp-block-button__link { background: #EEF2F7; color: #0B0F1A; }
html[data-theme="dark"] .wp-element-button:hover, html[data-theme="dark"] .wp-block-button__link:hover { background: #fff; }
html[data-theme="dark"] .is-style-outline > .wp-block-button__link { background: transparent; color: #EEF2F7; }
html[data-theme="dark"] .cst-card { background: #121826; }
html[data-theme="dark"] .wp-block-navigation__responsive-container.is-menu-open { background: #0B0F1A; color: #EEF2F7; }
html[data-theme="dark"] :is(h1, h2, h3, h4, .wp-block-site-title a) { color: #EEF2F7; }
html[data-theme="dark"] .cst-footer a { color: #A6B0C3; }
html[data-theme="dark"] .cst-footer a:hover { color: #fff; }
html[data-theme="dark"] .cst-footer { background: #0E1320 !important; }

/* v1.4.0 Account avatar, header menu, Profile tab */
.cst-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: linear-gradient(135deg, #4F46E5, #C026D3 55%, #F97316); color: #fff !important; font: 700 13px/1 'Plus Jakarta Sans', system-ui, sans-serif; letter-spacing: .02em; flex: none; }
.cst-avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.cst-user { position: relative; }
.cst-user > summary { list-style: none; cursor: pointer; box-shadow: 0 0 0 2px var(--wp--preset--color--base, #fff), 0 0 0 4px transparent; transition: box-shadow .15s; }
.cst-user > summary::-webkit-details-marker { display: none; }
.cst-user > summary:hover, .cst-user[open] > summary, .cst-user > summary:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--wp--preset--color--base, #fff), 0 0 0 4px #6366F1; }
.cst-user-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 248px; padding: 8px; background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px #ECEEF2, 0 24px 48px -24px rgb(15 23 42 / .35); display: grid; gap: 2px; }
.cst-user-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid #F1F2F5; }
.cst-user-head b { display: block; font-size: 14px; color: #0F172A; }
.cst-user-head small { display: block; font-size: 12px; color: #64748B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.cst-user-menu a { display: block; padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #334155 !important; text-decoration: none !important; }
.cst-user-menu a:hover { background: #F4F5F8; color: #0F172A !important; }
.cst-user-menu a.cst-user-out { color: #BE123C !important; }
html[data-theme="dark"] .cst-user-menu { background: #111827; box-shadow: 0 0 0 1px #1F2937, 0 24px 48px -24px rgb(0 0 0 / .7); }
html[data-theme="dark"] .cst-user-head { border-color: #1F2937; }
html[data-theme="dark"] .cst-user-head b { color: #F8FAFC; }
html[data-theme="dark"] .cst-user-head small { color: #94A3B8; }
html[data-theme="dark"] .cst-user-menu a { color: #CBD5E1 !important; }
html[data-theme="dark"] .cst-user-menu a:hover { background: #1F2937; color: #fff !important; }
html[data-theme="dark"] .cst-user-menu a.cst-user-out { color: #FB7185 !important; }

/* v1.4.1 Unslop UI: opaque header, flat avatar */
.cst-header { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--wp--preset--color--base, #fff) !important; }
.cst-mark { box-shadow: none; }
.cst-avatar { background: #0F172A; }
html[data-theme="dark"] .cst-avatar { background: #E2E8F0; color: #0B0F1A !important; }
html[data-theme="dark"] .cst-header { background: #0B0F1A !important; }

/* v1.4.4 Motion for header, account menu and help panel */
.cst-header .wp-block-button__link, .cst-theme-toggle, .cst-avatar { transition: transform .25s cubic-bezier(.34, 1.4, .64, 1), background-color .2s; }
.cst-header .wp-block-button__link:hover { transform: translateY(-1px); }
.cst-header .wp-block-button__link:active, .cst-theme-toggle:active, .cst-user > summary:active { transform: scale(.94); }
.cst-theme-toggle svg { transition: transform .5s cubic-bezier(.34, 1.4, .64, 1); }
.cst-theme-toggle:hover svg { transform: rotate(-20deg); }
.cst-user[open] .cst-user-menu, .csh[open] .csh-panel { animation: cst-drop .28s cubic-bezier(.22, 1, .36, 1); transform-origin: top right; }
.csh[open] .csh-panel { transform-origin: bottom right; }
@keyframes cst-drop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .cst-header *, .cst-user *, .csh * { animation: none !important; transition: none !important; } }
