/*
Theme Name: Snow Now
Theme URI: https://snow-now.com
Author: Harry Bowerman
Description: A simple block theme for Snow Now. Pair it with the Snow Now Forecast plugin and use the "Forecast app (full width)" page template.
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gradientwx
*/

/* Header band */
.gwx-header{background:var(--wp--preset--color--ink);color:#fff;padding:12px max(16px,env(safe-area-inset-right,0px)) 12px max(16px,env(safe-area-inset-left,0px))}
.gwx-header-inner{max-width:1440px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.gwx-brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:#fff;font-family:var(--wp--preset--font-family--display);font-weight:700;font-size:28px;line-height:1;letter-spacing:-.01em}
.gwx-brand:hover{color:#fff}
.gwx-brand svg{width:30px;height:30px;flex:none}
.gwx-brand b{color:var(--wp--preset--color--signal-light);font-weight:600;margin-left:1px}
.gwx-tagline{color:#9fb3c2;font-size:14px;margin-left:6px;font-family:var(--wp--preset--font-family--body);font-weight:400;letter-spacing:0}
@media (max-width:640px){.gwx-tagline{display:none}}
.gwx-header .wp-block-navigation{color:#fff;font-size:15px}
.gwx-header .wp-block-navigation a{color:#fff;text-decoration:none}
.gwx-header .wp-block-navigation a:hover{color:var(--wp--preset--color--signal-light)}
.gwx-header .wp-block-navigation__responsive-container.is-menu-open{background:var(--wp--preset--color--ink);color:#fff}

/* Footer band */
.gwx-footer{background:var(--wp--preset--color--ink);color:#9fb3c2;font-size:13px;padding:28px max(16px,env(safe-area-inset-right,0px)) 28px max(16px,env(safe-area-inset-left,0px));margin-top:48px}
.gwx-footer a{color:#fff}
.gwx-footer-inner{max-width:1440px;margin:0 auto;display:flex;gap:10px 24px;flex-wrap:wrap;align-items:center;justify-content:space-between}
.gwx-footer .gwx-brand{font-size:20px}
.gwx-footer .gwx-brand svg{width:22px;height:22px}
.gwx-footer p{margin:0}

/* Pages */
.gwx-main{padding:32px max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px))}
.gwx-app{padding:16px max(12px,env(safe-area-inset-right,0px)) 0 max(12px,env(safe-area-inset-left,0px))}
.gwx-app > .wp-block-post-content > *{max-width:none}
.gwx-card{background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:8px;padding:20px 24px}
.wp-block-post-title a{text-decoration:none}
.wp-block-post-date{color:var(--wp--preset--color--slate);font-size:14px}
:where(.wp-site-blocks) :focus-visible{outline:2px solid var(--wp--preset--color--signal);outline-offset:2px}

/* Forecast app sits straight under the header, with no empty band above it */
.wp-site-blocks > main:has(.snowline),
.wp-site-blocks > * + main:has(.snowline){margin-block-start:0!important;padding-top:0!important}
main:has(.snowline) .wp-block-post-title{display:none}
main:has(.snowline) .wp-block-post-content > .snowline:first-child,
main:has(.snowline) .entry-content > .snowline:first-child{margin-top:0!important}
main:has(.snowline) .wp-block-post-content > :first-child:not(.snowline):empty{display:none}
main:has(.snowline) .wp-block-post-content > :first-child{margin-top:0!important}
p:has(> .snowline){margin:0!important}

/* Header: everything on one line, menu links as pill buttons matching Saved spots / account */
.gwx-header-inner{flex-wrap:nowrap;gap:12px}
.gwx-brand{flex:0 0 auto}
.gwx-tagline{white-space:nowrap}
@media (max-width:1150px){.gwx-tagline{display:none}}
.gwx-header .wp-block-navigation{flex:none;margin-block-start:0!important;margin-top:0!important}
.gwx-header .wp-block-navigation__container{gap:8px}
.gwx-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item__content{display:inline-flex;align-items:center;height:38px;padding:0 16px;border-radius:99px;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.08);font-weight:600;font-size:14px;line-height:1;transition:background .15s}
.gwx-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item__content:hover{background:rgba(255,255,255,.18);color:#fff}
.gwx-header .wp-block-navigation__responsive-container-open{width:36px;height:36px;border-radius:99px;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.08);align-items:center;justify-content:center;color:#fff;padding:0}
.gwx-header .wp-block-navigation__responsive-container-open svg{width:20px;height:20px}
@media (max-width:640px){.gwx-header-inner{gap:8px}.gwx-brand{font-size:23px;gap:8px}.gwx-brand svg{width:26px;height:26px}}

/* Dark mode: follows the visitor's device setting automatically */
@media (prefers-color-scheme:dark){
	:root,body{
		--wp--preset--color--mist:#0b1217;
		--wp--preset--color--line:#28343f;
		--wp--preset--color--slate:#8fa1b0;
		--wp--preset--color--white:#151d24;
		color-scheme:dark;
	}
	body{background:#0b1217!important;color:#dfe7ee!important}
	:where(.wp-site-blocks) h1,:where(.wp-site-blocks) h2,:where(.wp-site-blocks) h3,:where(.wp-site-blocks) h4,:where(.wp-site-blocks) h5,:where(.wp-site-blocks) h6{color:#f2f6f9}
	:where(.wp-site-blocks) a:where(:not(.wp-element-button)){color:#e9eff4}
	:where(.wp-site-blocks) a:where(:not(.wp-element-button)):hover{color:var(--wp--preset--color--signal-light)}
	.gwx-card{background:#151d24}
	.gwx-header,.gwx-footer{border-bottom:1px solid #1d2a35}
	input,textarea,select{background:#151d24;color:#e4ecf2;border-color:#28343f}
}
