/* Environment-driven storefront theme layer.
   Layout/spacing/DOM stay untouched; this file only consumes theme tokens. */

html { background: var(--theme-page-bg, #fff); }

body,
button,
input,
select,
textarea {
    font-family: var(--theme-font-family, 'MyCustomFont', Tahoma, sans-serif);
}

body { background: var(--theme-page-bg, #fff); }

.cw-header {
    background: var(--theme-header-bg, var(--white));
    box-shadow: var(--theme-header-shadow, none);
}

.cw-subheader {
    background: var(--theme-subheader-bg, var(--white));
}

.cw-search,
.cw-icon-btn,
.cw-auth-btn {
    background: var(--theme-control-bg, var(--surface));
}

.cw-search:focus-within { background: var(--theme-control-bg, var(--white)); }

.cw-footer {
    background: var(--theme-footer-bg, var(--surface));
}

.cw-bottom-nav {
    background: var(--theme-nav-bg, var(--white));
}


.cw-site-report-modal__form input,
.cw-site-report-modal__form textarea {
    background: var(--surface);
}

/* Common card surfaces used by the storefront. These overrides are
   deliberately limited to color/shadow/radius tokens; dimensions stay as-is. */

body[data-shop-theme]:not([data-shop-theme="1"]) .cw-seo__box,
body[data-shop-theme]:not([data-shop-theme="1"]) .cw-footer__badge,
body[data-shop-theme]:not([data-shop-theme="1"]) .cw-footer__phone,
body[data-shop-theme]:not([data-shop-theme="1"]) .cw-social,
body[data-shop-theme]:not([data-shop-theme="1"]) .cw-search,
body[data-shop-theme]:not([data-shop-theme="1"]) .cw-icon-btn,
body[data-shop-theme]:not([data-shop-theme="1"]) .cw-auth-btn {
    box-shadow: var(--theme-shadow);
}

body[data-shop-theme]:not([data-shop-theme="1"]) .cw-seo__box,
body[data-shop-theme]:not([data-shop-theme="1"]) .cw-footer__badge,
body[data-shop-theme]:not([data-shop-theme="1"]) .cw-footer__phone,
body[data-shop-theme]:not([data-shop-theme="1"]) .cw-social,
body[data-shop-theme]:not([data-shop-theme="1"]) .cw-site-report-modal__dialog {
    border-radius: var(--radius-md);
}

body[data-shop-theme]:not([data-shop-theme="1"]) .cw-search__submit,
body[data-shop-theme]:not([data-shop-theme="1"]) .cw-footer__report-link,
body[data-shop-theme]:not([data-shop-theme="1"]) .cw-site-report-modal__submit {
    border-radius: var(--radius-sm);
}

body[data-shop-theme]:not([data-shop-theme="1"])[data-shop-header-style="outlined"] .cw-header {
    box-shadow: inset 0 -1px 0 var(--brand);
}

body[data-shop-theme]:not([data-shop-theme="1"])[data-shop-header-style="minimal"] .cw-header {
    border-bottom-color: transparent;
}

body[data-shop-theme]:not([data-shop-theme="1"])[data-shop-header-style="tinted"] .cw-header {
    background: var(--theme-subheader-bg, var(--white));
}

body[data-shop-theme]:not([data-shop-theme="1"])[data-shop-header-style="soft"] .cw-subheader {
    box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--brand) 8%, transparent);
}

/* Small, safe visual distinction for tinted header themes without touching
   the header's dimensions or responsive behaviour. */
.cw-header .cw-topbar,
.cw-header .cw-subheader__inner {
    background: transparent;
}
