/*
Theme Name: Shawn Cable Weather
Theme URI: https://wxlab.com
Author: Shawn Cable
Author URI: https://wxlab.com
Description: Custom block theme for WXLab.com. Built in forecast widget and alert bar from the National Weather Service, a card style blog, and an easy to edit weather links page. Everything is editable in Appearance > Editor.
Version: 1.6.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scweather
*/

/* ---------- Type details theme.json can't express ---------- */
h1,h2,h3,h4,.wp-block-site-title,.wp-block-post-title,.wp-block-query-title,.scw-eyebrow,.wp-block-navigation{font-stretch:90%}
.scw-eyebrow{display:flex;align-items:center;gap:8px;font-weight:800;font-size:13px!important;letter-spacing:.12em;text-transform:uppercase}
.scw-eyebrow::before{content:"";width:22px;height:3px;background:var(--wp--preset--color--amber);flex:0 0 auto}

/* ---------- Header ---------- */
.scw-header{border-bottom:3px solid var(--wp--preset--color--amber)}
.scw-brandmark{display:flex;align-items:center;gap:10px;color:#fff!important;text-decoration:none!important}
.scw-brandmark svg{width:44px;height:44px;flex:0 0 auto}
.scw-brandmark>span{display:inline-flex;flex-direction:column}
.scw-brandmark .n{display:block;font-stretch:90%;font-weight:800;font-size:26px;line-height:1;letter-spacing:-.011em;white-space:nowrap}
.scw-brandmark .s{display:flex;align-items:center;gap:6px;font-weight:500;font-size:10px;letter-spacing:.29em;margin-right:-.29em;color:#DCE5F0;margin-top:4px;line-height:1;white-space:nowrap}
.scw-brandmark .s::before{content:"";flex:1;height:2px;background:#F59E0B;min-width:10px}
.scw-brandmark .c{fill:#fff;stroke:#2E4766;stroke-width:3;paint-order:stroke;stroke-linejoin:round}
.scw-brandmark .sn{fill:#FFC845}
.scw-brandmark .r{fill:none;stroke:#FFC845;stroke-width:3.2;stroke-linecap:round}
.scw-brandmark .b{fill:#F59E0B;stroke:#2E4766;stroke-width:2.2;paint-order:stroke;stroke-linejoin:round}
.scw-header .wp-block-navigation a{font-weight:800;letter-spacing:.06em;text-transform:uppercase;font-size:14px}
.scw-header .wp-block-navigation a:hover{color:var(--wp--preset--color--sun)!important;text-decoration:none}
.scw-header .wp-block-navigation .current-menu-item>a{box-shadow:inset 0 -3px 0 var(--wp--preset--color--amber)}
.scw-header .wp-block-navigation__responsive-container.is-menu-open{background:var(--wp--preset--color--harbor-deep)!important;color:#fff!important}

/* ---------- Post cards ---------- */
.scw-cards .wp-block-post{display:flex}
.scw-card{display:flex;flex-direction:column;width:100%;background:#fff;border:1px solid #D5DCE6;border-radius:4px;overflow:hidden;transition:box-shadow .15s,transform .15s}
.scw-card:hover{box-shadow:0 6px 20px rgba(27,42,61,.12);transform:translateY(-2px)}
.scw-card .wp-block-post-featured-image{margin:0}
.scw-card .wp-block-post-featured-image img{aspect-ratio:16/9;object-fit:cover;width:100%}
.scw-card .wp-block-post-featured-image:empty,.scw-card .wp-block-post-featured-image:not(:has(img)){display:none}
.scw-card-body{flex:1;display:flex;flex-direction:column}
.scw-card .wp-block-post-title a{color:var(--wp--preset--color--ink);text-decoration:none}
.scw-card .wp-block-post-title a::after{content:"";position:absolute;inset:0}
.scw-card{position:relative}
.scw-card .wp-block-post-terms a,.scw-card .wp-block-post-excerpt__more-link{position:relative;z-index:1}
.scw-card .wp-block-post-excerpt{margin-bottom:0}
.scw-card .wp-block-post-excerpt__excerpt{margin:0}
.scw-meta{text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.wp-block-post-terms a{text-decoration:none;font-weight:800;letter-spacing:.1em;text-transform:uppercase}

/* ---------- Single post ---------- */
.scw-article .wp-block-post-content>p:first-of-type{font-size:1.2rem;line-height:1.55}
.scw-article .wp-block-post-content img{border-radius:4px}
.scw-authorbox{border-left:4px solid var(--wp--preset--color--amber)}

/* ---------- Pagination ---------- */
.wp-block-query-pagination{gap:6px}
.wp-block-query-pagination-numbers .page-numbers{display:inline-block;min-width:38px;padding:6px 10px;border:1px solid #D5DCE6;border-radius:3px;background:#fff;text-align:center;text-decoration:none;font-weight:700}
.wp-block-query-pagination-numbers .page-numbers.current{background:var(--wp--preset--color--harbor);border-color:var(--wp--preset--color--harbor);color:#fff}

/* ---------- WX Links page ---------- */
.scw-links-filter{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.scw-links-filter span{font-weight:800;font-size:13px;letter-spacing:.12em;text-transform:uppercase;margin-right:4px}
.scw-links-filter button{font:inherit;font-weight:800;font-size:14px;letter-spacing:.06em;padding:7px 14px;border-radius:3px;border:1px solid #B9C5D4;background:#fff;color:#1B2A3D;cursor:pointer}
.scw-links-filter button[aria-pressed="true"]{background:#2E4766;border-color:#2E4766;color:#fff}
.scw-linkcard{background:#fff;border:1px solid #D5DCE6;border-top:3px solid var(--wp--preset--color--amber);border-radius:4px}
.scw-linkcard ul{list-style:none;padding:0;margin:0}
.scw-linkcard li{padding:5px 0;border-bottom:1px solid #EDF1F6}
.scw-linkcard li:last-child{border-bottom:0}
.scw-linkcard a{text-decoration:none;font-weight:600}
.scw-linkcard a:hover{text-decoration:underline}
.scw-st{margin:0!important;padding:6px 0;border-bottom:1px solid #EDF1F6}
.scw-st strong{display:inline-block;min-width:2.4em;font-stretch:90%;font-weight:900;color:var(--wp--preset--color--harbor)}
.scw-st a{display:inline-block;margin-right:10px;font-weight:700}
.scw-hide{display:none!important}

/* ---------- Footer ---------- */
.scw-footer a{color:#FFC845}
.scw-footer .wp-block-navigation a{color:#DCE5F0!important;font-weight:700;text-transform:uppercase;letter-spacing:.06em;font-size:13px}

/* ---------- Editor placeholders for the custom blocks ---------- */
.scw-editor-ph{background:#1B2A3D;color:#fff;border-top:3px solid #F59E0B;border-radius:4px;padding:28px;font-family:Archivo,Arial,sans-serif}
.scw-editor-ph-alert{background:#C8102E;border-top:0;padding:12px 16px}
.scw-editor-ph-in{display:flex;flex-direction:column;gap:4px}
.scw-editor-ph strong{text-transform:uppercase;letter-spacing:.08em}
.scw-footer .scw-brandmark .c,.scw-footer .scw-brandmark .b{stroke:#16222F}
.scw-footer .scw-brandmark{margin-bottom:14px}
.wp-block-query-pagination-previous,.wp-block-query-pagination-next{display:inline-block;padding:6px 14px;border:1px solid #D5DCE6;border-radius:3px;background:#fff;text-decoration:none;font-weight:800;text-transform:uppercase;letter-spacing:.06em;font-size:.85rem}
.wp-block-post-navigation-link{flex:1 1 260px;max-width:48%}
.wp-block-post-navigation-link.post-navigation-link-next{text-align:right}
.wp-block-post-navigation-link a{display:block;padding:14px 16px;background:#fff;border:1px solid #D5DCE6;border-radius:4px;text-decoration:none;color:var(--wp--preset--color--ink)}
.wp-block-post-navigation-link a:hover{border-color:var(--wp--preset--color--amber)}
.post-navigation-link__label{display:block;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--wp--preset--color--steel)}
.post-navigation-link__title{display:block;font-weight:800;font-stretch:90%;font-size:1.05rem;line-height:1.25;margin-top:2px}
@media (max-width:600px){.wp-block-post-navigation-link{max-width:100%}.wp-block-post-navigation-link.post-navigation-link-next{text-align:left}}

/* ---------- Ads ---------- */
.scw-ad{text-align:center;min-height:100px}
.scw-ad-rectangle{min-height:250px}
.scw-ad-label{display:block;font-size:10px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#7A8BA0;margin-bottom:4px}
.scw-ad-in{background:#16222F;padding:10px 14px 14px;margin:0;border-top:1px solid #2F445F}
.scw-ad-in .scw-ad-label{color:#A9B8CC}
.scw-editor-ph-ad{background:#EEF2F7;color:#1B2A3D;border:2px dashed #A9B8CC;border-top:2px dashed #A9B8CC;padding:18px}
.scw-editor-ph-fb{background:#1877F2;border-top:0}

/* ---------- Forecast page: dark, edge to edge ---------- */
.scw-front a:not(.wp-element-button){color:var(--wp--preset--color--sun)}
.scw-front .scw-card a{color:var(--wp--preset--color--ink)}
.scw-front .scw-forecast-block .scw{border-radius:0}
.scw-front .scw-ad{background:#16222F;padding:8px 0}
@media (max-width:600px){
  .scw-front{padding-left:0!important;padding-right:0!important}
  .scw-front>.scw-forecast-block{margin-left:0;margin-right:0}
  .scw-front>*:not(.scw-forecast-block){margin-left:10px!important;margin-right:10px!important}
}

/* No automatic gaps between header, page and footer (removes the white strips) */
.wp-site-blocks>*+*,.wp-block-template-part>*+*{margin-block-start:0}

/* ---------- Card text (v1.4) ---------- */
.scw-card .wp-block-post-title.scw-card-title{font-size:clamp(1.55rem,1.1rem + 1.1vw,2.05rem)!important;font-weight:800;font-stretch:82%;line-height:1.08;letter-spacing:-.01em;margin:0}
.scw-card .wp-block-post-date{font-size:.72rem!important;letter-spacing:.08em}
.scw-card .wp-block-post-excerpt,.scw-card .wp-block-post-excerpt__excerpt{line-height:1.42!important}
