/*
  Foundational element defaults, shell layout, and theme scopes.
  Load after tokens.css and before app/component CSS. Keep component-specific
  layout in .razor.css files unless the rule defines shared shell behavior.
*/

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--ctev-type-body-family);
    font-size: var(--ctev-type-body-size);
    font-weight: var(--ctev-type-body-weight);
    line-height: var(--ctev-type-body-line-height);
    color: var(--ctev-text);
    background-color: var(--ctev-page-bg);
}

a {
    text-decoration: none;
    display: inline-block;
    color: var(--ctev-link);
}

    a:hover,
    a:focus {
        text-decoration: none;
        display: inline-block;
        color: var(--ctev-link);
    }

h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
    font-family: var(--ctev-font-display);
    color: var(--ctev-heading-text);
}

img, svg, video, canvas {
    max-width: 100%;
}

img {
    height: auto;
}

button, input, select, textarea {
    font: inherit;
}

ul,
ol {
    list-style: none;
}

#app {
    min-height: 100vh;
    min-height: 100dvh;
}

/* The shell owns visible page background because theme vars applied here do not propagate upward to body. */
.ctev-shell {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--ctev-text);
    background-color: var(--ctev-page-bg);
    /*  Bridge theme-scoped values into Bootstrap components that inherit bootstrap vars from this shell  */
    --bs-body-color: var(--ctev-text);
    --bs-link-color: var(--ctev-link);
    --bs-link-hover-color: var(--ctev-link);
}

    .ctev-shell > .navbar,
    .ctev-shell > footer {
        flex-shrink: 0;
    }

.ctev-shell_main {
    flex: 1 0 auto;
    min-width: 0;
}

    .ctev-shell_main > article {
        width: 100%;
        min-width: 0;
    }

/* Theme classes override semantic tokens for the shell subtree. */
.ctev-theme-welcome {
    --ctev-page-bg: var(--ctev-deep-blue-000);
    --ctev-text: var(--ctev-black);
    --ctev-heading-text: var(--ctev-black);
    --ctev-link: var(--ctev-blue);
    --ctev-footer-bg: var(--ctev-deep-blue-000);
    --ctev-footer-text: var(--ctev-black);
    --ctev-footer-link: var(--ctev-blue);
}

.ctev-theme-workspace {
    --ctev-page-bg: var(--ctev-deep-blue-000);
    --ctev-text: var(--ctev-black);
    --ctev-heading-text: var(--ctev-black);
    --ctev-link: var(--ctev-blue);
    --ctev-footer-bg: var(--ctev-deep-blue);
    --ctev-footer-text: var(--ctev-white);
    --ctev-footer-link: var(--ctev-teal-400);
    --ctev-panel-bg: var(--ctev-deep-blue-000);
}

.page {
    background-color: var(--ctev-page-bg);
}

.ctev-validation-message {
    display: flex;
    font-family: var(--ctev-type-body-family);
    font-size: var(--ctev-type-body-xs-size);
    font-weight: var(--ctev-type-body-regular-weight);
    color: var(--ctev-pink-600);
}

.ctev-navbar__link {
    font-family: var(--ctev-font-primary);
}

.app-icon {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: -0.125em;
    color: inherit;
}
