/*
 * PasswordGenerator's own styles. The look comes from the Zavanto design system: tokens in zavanto/css/tokens.css
 * and the zv- components in zavanto/css/components.css (both copied from Zavanto/Design, see design/zavanto/README.md).
 * This file only adds page layout, icons and what the mockup has that the components lack. The generator's own
 * styles are in PasswordGenerator.Client/Tool/PasswordTool.razor.css. Token names only, never colour values.
 * No external fonts or CDNs: the CSP only allows files from this site.
 */

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

html {
    -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
    margin: 0;
}

h1:focus, [tabindex="-1"]:focus {
    outline: none;
}

p {
    margin: 0;
}

a {
    color: var(--accent-ink);
}

    a:hover {
        text-decoration-thickness: 2px;
    }

a.zv-btn {
    text-decoration: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

code {
    font-family: var(--font-mono);
}

/* Icons (PasswordGenerator.Client/Shared/Icon.razor): 2px line, round ends, currentColor. */

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-bold {
    stroke-width: 2.4;
}

.zv-feature-icon .icon {
    width: 22px;
    height: 22px;
}

/* Error and 404 pages: one narrow column. */

.narrow {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.page-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.page-intro {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .page-intro h1 {
        font-size: 36px;
        line-height: 42px;
        font-weight: 700;
        letter-spacing: -0.01em;
    }

.lead {
    font-size: 18px;
    line-height: 28px;
    color: var(--ink-muted);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4);
}

/* Home page: sections page-max wide, space-9 apart (the mockup's 56px top and 88px bottom). */

.home {
    display: flex;
    flex-direction: column;
    gap: var(--space-9);
    padding-top: calc(56px - var(--space-7));
    padding-bottom: calc(var(--space-9) - 56px);
}

.zv-hero, .zv-section {
    width: 100%;
}

/* Hero: the text on the left, the generator on the right (below on narrow screens). */
.pg-hero {
    align-items: flex-start;
}

.pg-hero-text {
    flex: 1 1 400px;
    padding-top: var(--space-3);
}

.pg-hero-text .zv-hero-lead {
    max-width: 520px;
}

.pg-hero-tool {
    flex: 1 1 400px;
    min-width: 0;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

.pg-tool-notice {
    margin-top: var(--space-4);
}

.pg-tool-notice[hidden] {
    display: none;
}

.zv-notice .icon {
    width: 22px;
    height: 22px;
}

.zv-notice .zv-notice-body {
    font-size: 15px;
    line-height: 1.5;
}

.pg-share {
    margin: var(--space-4) var(--space-1) 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 15px;
    color: var(--ink-muted);
}

    .pg-share a {
        font-weight: 600;
    }

.zv-cta .zv-btn-primary {
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .home {
        gap: var(--space-8);
        padding-top: 0;
    }

    .page-intro h1 {
        font-size: 30px;
        line-height: 36px;
    }

    .zv-compare {
        padding: var(--space-5);
    }

    .zv-cta {
        padding: var(--space-6) var(--space-5);
    }
}

@media (prefers-reduced-motion: reduce) {
    .zv-faq summary svg {
        transition: none;
    }
}

/* Blazor */

#blazor-error-ui {
    background: var(--warning-soft);
    color: var(--ink);
    border-top: 1px solid var(--warning-line);
    bottom: 0;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
