/*
 * ============================================================
 * _standards.css — Signs Banners Online Master Standards
 * ============================================================
 *
 * PRIME DIRECTIVE: mobile-only.
 * Breakpoints: 480px / 600px / 720px / 980px (min-width only).
 * Desktop layout is out of scope. max-width queries are illegal.
 *
 * PRESERVATION DIRECTIVE: Do not alter visual design.
 * This file adds CSS custom properties and dark-mode support
 * only. No layout, colour, or typography changes.
 *
 * LAYOUT RULE: display:grid only. display:flex is prohibited.
 *
 * ============================================================
 */

/* ============================================================
   COLOR TOKENS — LIGHT (default)
   All hardcoded colours in the codebase must reference these.
   ============================================================ */
:root {
    /* Brand */
    --color-primary:        #df0911;
    --color-primary-hover:  #a90000;
    --color-primary-border: #990000;
    --color-primary-text:   #ffffff;

    /* Backgrounds */
    --color-bg:             #ffffff;
    --color-bg-surface:     #f5f5f5;
    --color-bg-overlay:     rgba(255, 255, 255, 0.97);

    /* Text */
    --color-text:           #1a1a1a;
    --color-text-muted:     #555555;
    --color-text-inverse:   #ffffff;

    /* Links */
    --color-link:           #1a5cd4;
    --color-link-visited:   #7b2fbe;

    /* Borders & dividers */
    --color-border:         #dddddd;
    --color-border-strong:  #bbbbbb;

    /* Shadows */
    --shadow-card:          0 6px 6px rgba(0, 0, 0, 0.25);
    --shadow-modal:         0 8px 8px rgba(0, 0, 0, 0.35);

    /* Header / navigation bar */
    --color-header-bg:      #df0911;
    --color-header-text:    #ffffff;

    /* Cart & modal */
    --color-modal-bg:       #ffffff;
    --color-progress-bar:   #cdf6cd;

    /* Skeleton loader */
    --color-skeleton-base:  #e0e0e0;
    --color-skeleton-shine: #f0f0f0;

    /* Breakpoints as reference (used in JS via getComputedStyle if needed) */
    --bp-sm:  480px;
    --bp-md:  600px;
    --bp-lg:  720px;
    --bp-xl:  980px;
}

/* ============================================================
   COLOR TOKENS — DARK
   Automatically applied when OS dark mode is active.
   Visual starting point — refined progressively over time.
   ============================================================ */
@media (prefers-color-scheme: dark) {
    :root {
        /* Brand stays consistent */
        --color-primary:        #df0911;
        --color-primary-hover:  #ff2222;
        --color-primary-border: #cc0000;
        --color-primary-text:   #ffffff;

        /* Backgrounds */
        --color-bg:             #121212;
        --color-bg-surface:     #1e1e1e;
        --color-bg-overlay:     rgba(18, 18, 18, 0.97);

        /* Text */
        --color-text:           #e8e8e8;
        --color-text-muted:     #a0a0a0;
        --color-text-inverse:   #1a1a1a;

        /* Links */
        --color-link:           #66aaff;
        --color-link-visited:   #cc88ff;

        /* Borders */
        --color-border:         #333333;
        --color-border-strong:  #555555;

        /* Shadows (softer on dark) */
        --shadow-card:          0 6px 6px rgba(0, 0, 0, 0.5);
        --shadow-modal:         0 8px 8px rgba(0, 0, 0, 0.6);

        /* Header */
        --color-header-bg:      #990000;
        --color-header-text:    #ffffff;

        /* Cart & modal */
        --color-modal-bg:       #1e1e1e;
        --color-progress-bar:   #1a5c1a;

        /* Skeleton loader */
        --color-skeleton-base:  #2a2a2a;
        --color-skeleton-shine: #3a3a3a;
    }
}

/* ============================================================
   REDUCED MOTION — respect OS setting site-wide
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   CSS GRID UTILITY — THUMB-ZONE ERGONOMICS
   Primary nav and CTAs positioned in the bottom 33vh.
   Modal footers use sticky grid row.
   ============================================================ */

/* Sticky modal footer — thumb-zone CTAs */
.sbo-modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    position: sticky;
    bottom: 0;
    padding: 1rem;
    background: var(--color-modal-bg);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

/* Full-width single CTA in modal footer */
.sbo-modal-footer--single {
    grid-template-columns: 1fr;
}

/* ============================================================
   SBO 3-BUTTON ROW — CSS Grid (replaces display:table)
   Preserves identical 3-column equal-width layout.
   ============================================================ */
.sbo3btn-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 0.5rem;
    width: 100%;
    max-width: 880px;
    margin: 1.25rem auto;
    clear: both;
}

.sbo3btn {
    display: block;
    box-sizing: border-box;
    background: var(--color-primary);
    color: var(--color-primary-text);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.15;
    padding: 14px 8px;
    border-radius: 6px;
    border: 1px solid var(--color-primary-border);
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: var(--shadow-card);
}

@media (min-width: 480px) {
    .sbo3btn {
        font-size: 0.95rem;
        padding: 16px 10px;
    }
}

@media (min-width: 600px) {
    .sbo3btn {
        font-size: clamp(0.98rem, 2.4vw, 1.25rem);
        padding: 16px 14px;
        white-space: nowrap;
    }
}

.sbo3btn:visited {
    background: var(--color-primary);
    color: var(--color-primary-text) !important;
    text-decoration: none !important;
}

.sbo3btn:active {
    transition: background-color 0.18s ease, transform 0.12s ease;
    color: var(--color-primary-text) !important;
    text-decoration: none !important;
}

.sbo3btn-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ============================================================
   HELPER UTILITIES (moved from index.php inline style)
   ============================================================ */
.textbrightner {
    filter: brightness(1.3);
}

/* ============================================================
   BNPL TOGGLE (moved from index.php inline style)
   ============================================================ */
.bnplTrim {
    position: relative;
    padding-top: 0.75rem;
    padding-bottom: 1rem;
}

.bnplText {
    display: block;
    overflow: hidden;
}

.bnplTrim.is-collapsed .bnplText {
    display: none;
}

.bnplToggle {
    display: inline;
    white-space: nowrap;
    margin-left: 0.4rem;
}

button.bnplToggle {
    background: transparent;
    border: 0;
    padding: 0;
    font: inherit;

}

/* ============================================================
   CONNECTIVITY — offline / pending state skeleton
   Smooth CSS Grid skeleton screens, zero layout shift
   ============================================================ */
@keyframes sbo-skeleton-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.sbo-skeleton {
    background: linear-gradient(
        90deg,
        var(--color-skeleton-base) 25%,
        var(--color-skeleton-shine) 50%,
        var(--color-skeleton-base) 75%
    );
    background-size: 200% 100%;
    animation: sbo-skeleton-shimmer 1.4s ease infinite;
    border-radius: 4px;
    color: transparent;
    pointer-events: none;
    user-select: none;
}

/* Button disabled / pending state */
.sbo-btn-pending {
    opacity: 0.6;
    pointer-events: none;
    transform: none !important;
    transition: opacity 0.2s ease;
}

/* Smooth success fade-in */
.sbo-fade-in {
    animation: sbo-fade-in 0.3s ease forwards;
}

@keyframes sbo-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sbo-page {
	width: 100%;
	max-width: 37.5rem;
	margin-left: auto;
	margin-right: auto;
}

.contentpad {
	padding-left: 1.25rem;
	padding-right: 1.25rem;
	box-sizing: border-box;
}
.contentpad figure img,
.contentpad figure.sboFooterVideo {
	width: calc(100% + 2.5rem);
	max-width: calc(100% + 2.5rem);
	margin-left: -1.25rem;
	margin-right: -1.25rem;
}

.discountband {
	display: block;
	width: 100%;
	max-width: 37.5rem;
	margin-left: auto;
	margin-right: auto;
	padding: 1rem 2rem;
	box-sizing: border-box;
	font-size: clamp(1.3rem, 5.33vw, 2rem);
	font-weight: bold;
	color: #ffffff;
	text-align: center;
	background: #df0911;
	box-shadow: inset 0 0.5rem 0.5rem -0.375rem rgba(0,0,0,0.45);
}

.saleband {
	display: block;
	width: 100%;
	max-width: 37.5rem;
	margin-left: auto;
	margin-right: auto;
	padding: 1rem 2rem;
	box-sizing: border-box;
	font-size: clamp(1.1rem, 4.13vw, 1.55rem);
	font-weight: bold;
	color: #ffffff;
	text-align: center;
	background: #df0911;
}

.reviewband {
	display: block;
	width: 100%;
	max-width: 37.5rem;
	margin-left: auto;
	margin-right: auto;
	padding: 1rem 2rem;
	box-sizing: border-box;
	font-size: clamp(0.9rem, 3.87vw, 1.45rem);
	font-weight: bold;
	color: #ffffff;
	text-align: center;
	background: #df0911;
	box-shadow: inset 0 0.5rem 0.5rem -0.375rem rgba(0,0,0,0.45);
}
.reviewband a,
.reviewband a:visited {
	color: #ffffff;
	text-decoration: none;
}
.reviewband .m-full { display: none; }
.reviewband .m-short { display: inline; }
@media (min-width: 30rem) {
	.reviewband .m-full { display: inline; }
	.reviewband .m-short { display: none; }
}

.typicalbuttonred,
.typicalbuttonred:visited {
	font-weight: normal;
	opacity: 1;
	transition: opacity 0.3s ease;
	display: block;
	min-width: 0;
	height: 2.75rem;
	background: #df0911;
	color: #ffffff;
	border: none;
	border-radius: 0.55rem;
	font-size: 0.9rem;
	line-height: 1;
	padding: 0.93rem 1rem 0.65rem 1rem;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
	box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,0.25);
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, 'SamsungOne', 'Roboto', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
	text-decoration: none;
}

@media (max-width: 480px) {
	.typicalbuttonred {
		padding: 0.84rem 1.09rem 0.74rem 0.91rem;
	}
}

.typicalbuttonwhite,
.typicalbuttonwhite:visited {
	font-weight: normal;
	opacity: 1;
	transition: opacity 0.3s ease;
	display: block;
	min-width: 0;
	height: 2.75rem;
	background: #ffffff;
	color: #333333;
	border: 1.5px solid #cccccc;
	border-radius: 0.55rem;
	font-size: 0.9rem;
	line-height: 1;
	padding: 0.86rem 1rem 0.58rem 1rem;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, 'SamsungOne', 'Roboto', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
	text-decoration: none;
}

@media (max-width: 480px) {
	.typicalbuttonwhite {
		padding: 0.77rem 1.09rem 0.67rem 0.91rem;
	}
}

.sbo-chevron {
	display: inline-block;
	width: 0.48em;
	height: 0.48em;
	border-right: 0.11em solid currentColor;
	border-bottom: 0.11em solid currentColor;
	transform: rotate(45deg);
	vertical-align: middle;
	position: relative;
	top: -0.18em;
	margin-left: 0.25em;
}

.sbo-chevron.open {
	transform: rotate(-135deg);
}
