/* ============================================================
   sbcss-tool.css — Shared theme for SBCSS tool pages.
   ------------------------------------------------------------
   One stylesheet that every tool linked from improveteachingandlearning.com
   pulls in for the common SBCSS look: colors, header, footer, typography,
   container widths, shared button/card primitives.

   Each tool still has its OWN stylesheet for tool-specific styles (quiz
   cards, audit tables, dashboards, etc.). This file only covers what's
   repeated across tools.

   If you tweak the palette or the header here, it updates every tool.
   ============================================================ */

:root {
    --sbcss-blue:      #026AB0;
    --sbcss-blue-dark: #01508A;
    --sbcss-yellow:    #FFBA2D;
    --sbcss-bg:        #f0f6fb;
    --sbcss-white:     #ffffff;
    --sbcss-text:      #1a1a2e;
    --sbcss-muted:     #555;
    --sbcss-border:    #dde8f2;
}

html {
    /* Always reserve vertical scrollbar space so the page width stays
       constant whether content is short or long. */
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background-color: var(--sbcss-bg);
    color: var(--sbcss-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Shared Container ---- */
.container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

/* ---- Shared Header (blue gradient with logo on the left, title centered) ---- */
.site-header {
    background: linear-gradient(135deg, var(--sbcss-blue), var(--sbcss-blue-dark));
    color: white;
    padding: 10px 16px;
    /* Sitewide: pin the header to the top while content scrolls between
       it and the footer. Sticky (not fixed) keeps the header in the
       body's flex flow so layout below stays correct. */
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.header-logo {
    height: 52px;
    width: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.header-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
    z-index: 1;
    pointer-events: none;
}

.header-text h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.header-text .subtitle {
    margin: 2px 0 0;
    font-size: 0.9rem;
    font-weight: 400;
}

.header-spacer {
    flex-shrink: 0;
    min-width: 52px;
    display: flex;
    justify-content: flex-end;
    /* Push the spacer to the far right so any content it holds
       (e.g. a "Sign out" link) lands on the right side of the header
       rather than next to the logo. Works even though .header-text
       between them is absolutely positioned. */
    margin-left: auto;
    position: relative;
    z-index: 2;
}

@media (max-width: 900px) {
    .site-header .container {
        flex-direction: column;
        gap: 6px;
    }
    .header-text {
        position: static;
        transform: none;
        max-width: none;
        padding: 0;
    }
}

/* ---- Shared Typography ---- */
h2 {
    font-size: 1.3rem;
    color: var(--sbcss-blue-dark);
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 3px solid var(--sbcss-yellow);
    padding-bottom: 0.4rem;
    display: inline-block;
}

h3 {
    color: var(--sbcss-blue-dark);
    margin: 1rem 0 0.5rem;
    font-size: 1.1rem;
}

/* ---- Shared Footer (dark blue bar) ---- */
.site-footer {
    background-color: var(--sbcss-blue-dark);
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    padding: 18px 20px;
    font-size: 0.87rem;
    margin-top: auto;
    /* Sitewide: pin the footer to the bottom of the viewport. */
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.site-footer .container {
    max-width: none;
    padding: 0;
}

.site-footer p {
    margin: 0;
}

/* ---- Shared Buttons ---- */
.big-btn {
    background: linear-gradient(135deg, var(--sbcss-blue), var(--sbcss-blue-dark));
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 3px 10px rgba(2, 106, 176, 0.25);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.big-btn:hover,
.big-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(2, 106, 176, 0.35);
    color: white;
    text-decoration: none;
}

.secondary-btn {
    background: var(--sbcss-white);
    border: 2px solid var(--sbcss-blue);
    color: var(--sbcss-blue);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}

.secondary-btn:hover,
.secondary-btn:focus-visible {
    background: var(--sbcss-bg);
    text-decoration: none;
}

/* ---- Shared in-body link style ---- */
.body-link {
    color: var(--sbcss-blue);
    font-weight: 500;
    text-decoration: underline;
}

.body-link:hover,
.body-link:focus {
    color: var(--sbcss-blue-dark);
}

/* ---- Sign-out link (top-right of authenticated tools) ---- */
.signout-link {
    color: var(--sbcss-yellow);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: underline;
}

.signout-link:hover,
.signout-link:focus {
    color: white;
}
