/* Scoped to MainLayout. The build rewrites every selector here, for example
   header becomes header[b-xxxxxxxxxx], and adds that attribute to each
   element written in MainLayout.razor. */

.shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    position: sticky;
    top: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 12px 16px;
    background: #1f1b3a;
    color: #fff;
}

.brand {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    margin-right: auto;
}

nav {
    display: flex;
    gap: 4px;
}

/* NavLink is a child component. Its <a> does not get MainLayout's attribute,
   so "nav a" would match nothing. ::deep moves the attribute to nav. */
nav ::deep a {
    color: #d9d4ff;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
}

nav ::deep a.active {
    background: #6b4eff;
    color: #fff;
}

main {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 24px;
    box-sizing: border-box;
}

/* Pages render inside this main element, so ::deep reaches their h1. */
main ::deep h1 {
    border-bottom: 3px solid #6b4eff;
    padding-bottom: 4px;
}

/* No ::deep: only <p> elements written in MainLayout.razor match. */
p {
    margin: 0;
    padding: 10px 12px;
    border: 2px dashed #6b4eff;
    border-radius: 10px;
    font-size: 0.9rem;
}

footer {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px 24px;
    box-sizing: border-box;
}
