/*
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.3.3
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; }
