.List.List--link .Item span {
    display: none;
}
.List.List--link .Item span[data-icon],
.List.List--link .Item span[data-image] {
    display: flex;
}
.List.List--link .Item.Item--category {
    svg, span {
        display: none;
    }
    background-color: var(--border-color) !important;
    border-bottom: 1px solid rgb(68, 68, 68) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    text-transform: capitalize;
    position: sticky;
    top: 0;
    z-index: 10;
} 
.List.List--root .Item.Item--category {
    display: none;
}
/* Link list: no list-style, border at bottom of each item */
.List.List--link {
    list-style: none;
    padding: 0;
    margin: 0;
}
.List.List--link .Item {
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    padding: 0.75rem 1rem;
    margin: 0;
    line-height: 2rem;
}

.List.List--link .Item {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.List.List--link h3 {
    flex-grow: 1;
    font-weight: normal;
    font-size: 1.25rem;
    margin: 0px;
}

.List.List--link .Item svg {
    align-self: center;
    min-width: 1.25rem;
    max-width: 1.25rem;
}
.List.List--link .Item span {
    display: none;
    aspect-ratio: 1/1;
    height: 2rem;
    margin-right: 0.5rem;
}
/* 3-column grid for root list with equal width columns */
.List.List--root {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    padding: 0;
    list-style-type: none;
    margin: 3rem 1rem;
}
.List .Item span {
    background-image: var(--image);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.List.List--root .Item span[data-initials]::before {
    content: attr(data-initials-content);

    font-size: 3rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 2rem;
    pointer-events: none;
    font-weight: 500;
}
.List .Item span[data-icon]::before {
    content: var(--icon);
    font-family: 'Material Symbols Outlined';

    display: flex;
    align-items: center;
    justify-content: center;

    inset: 0;
    width: 100%;
    height: 100%;
}
    .List.List--link .Item span[data-icon]::before {
        font-size: 2.15rem;
    }
    .List.List--root .Item span[data-icon]::before {
            position: absolute;
    font-size: 6rem;
        color: white;
    text-align: center;
    line-height: 2rem;
    pointer-events: none;
    font-weight: 100;
}

.List.List--root h3 {
    font-size: 1.25rem;
    text-align: center;
    width: 100%;
    word-break: break-word;
    margin: 0.5rem 0;
    padding: 0;
}

.List.List--root {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;     
}
.List.List--root .Item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.List.List--root .Item span {
    display: block;
    width: 100%;
    aspect-ratio: 1/1;
    background-color: var(--primary);
    border-radius: 0.5rem;
}


/* Show Header__Logo when main has .Link--root and is a peer of .Header */
.Header:has(~ .Main .List--root) .Header__Logo,
.Header:has(~ .Main .List--root) .Header__Bow {
    display: block;
}
.Header:has(~ .Main .List--root) .Header__Navigation {
    display: none;
}

.List.List--root svg {
    display: none;
}
.Webview {
    border: none;
    width: 100%;
    height: 100%;
}

*[onclick] {
    cursor: pointer;
}



/* Global variables and base styles */
:root {
    /* Colors */
    --primary: #336799;
    --secondary: #1f2937;
    --text-color: #333;
    --bg-color: #f0f0f0;
    --border-color: #e0e0e0;
    
    /* Typography */
    --font-family: 'Roboto', 'Inter', Arial, sans-serif;
    
    /* Layout */
    --header-height: 4rem;
    --header-logo-height: 5rem;
    --header-bow-height: 2rem;
    --footer-height: 4rem;
    --avatar-size: 4rem;
}

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #3c3c3c;
    font-family: var(--font-family);
}

/* Application container */
application {
    height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

@media screen and (min-width: 768px) {
    application {
        width: 500px;
        margin: 0 auto;
    } 
}

/* Interactive elements */
button, 
.Header__Action, 
.Footer__NavItem {
    background: transparent;
    border: none;
    box-shadow: none;
    outline: none;
    cursor: pointer;
    color: inherit;
    padding: 0.5rem;
    font: inherit;
    text-align: center;
}

button:focus, 
.Header__Action:focus, 
.Footer__NavItem:focus {
    outline: none;
}

/* Header styles */
.Header {
    z-index: 100;
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative;
}

.Header > section {
    background-color: var(--secondary);
    color: white;
    font-size: 1.5rem;
}

.Header__Navigation {
    display: flex;
    justify-content: start;
    align-items: center;
    height: var(--header-height);
    overflow: hidden;
}

.Header__Title {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.Header__Logo {
    display: none;
}

.Header__Logo img {
    max-height: calc(100% - 0.5rem);
    width: auto;
    margin: 0;
    padding: 0.5rem 0;
}

.Header__Bow {
    display: none;
    width: 100%;
    color: var(--secondary);
    height: 2rem;
    position: absolute;
    bottom: calc(1px + -2rem);
    z-index: 10;
}

/* Root template specific styles */
.root .Header__Navigation {
    display: none;
}

.root .Header__Logo {
    display: block;
}

.root .Header__Bow {
    display: block;
}

/* Main content area */
main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.Content {
    flex: 1;
}

.Content__Panel {
    padding: 1rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 1.5rem 0.75rem;
}

.root .Content > div:not(.Content__Panel) {
    margin: 1.5rem 0.75rem;
}

/* Grid styles for root template */
.Grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 0;
    list-style-type: none;
    margin: 3rem 0.75rem;
    font-size: 1.25rem;
}

.Grid li {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Avatar styling */
.Grid--avatar {
    aspect-ratio: 1/1;
    background-size: cover;
    background-position: center;
    color: var(--color, transparent);
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--primary);
    background-image: var(--image);
}

/* Avatar image type variations */
.Grid--avatar[style*="--image"] {
    --color: transparent;
}

.Grid--avatar[data-image-type="ico"] {
    background-size: 70%;
    background-repeat: no-repeat;
}



/* List component styles */
._List {
    padding: 0;
    list-style-type: none;
    background-color: white;
    margin: 0;
    font-size: 1.25rem;
}

._List li {
    background-color: white;
    width: 100%;
    padding: 0.75rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: row;
    align-items: center;
}

/* List avatar styles */
._List--avatar {
    aspect-ratio: 1/1;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: var(--image);
    height: var(--avatar-size);
    width: var(--avatar-size);
    display: none;
}

._List--avatar[style*="--image"] {
    display: block;
}

._List--avatar-initials {
    background-color: var(--primary);
    color: white;
    font-weight: bold;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.3rem;
}

/* List content styles */
._List__Content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex-grow: 1;
}

._List__Title {
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.2;
}

._List__Subtitle {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.2;
}

._List__Category {
    color: #6b7280;
    font-size: 0.8rem;
    font-style: italic;
}

/* Category header */
.CategoryItem {
    background-color: var(--border-color) !important;
    border-bottom: 1px solid rgb(68, 68, 68) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    text-transform: capitalize;
    position: sticky;
    top: 0;
    z-index: 10;
}

.CategoryItem__Header {
    width: 100%;
}

/* Banner components */
.Banner {
    width: 100%;
}

/* Image banner */
.Banner--withImage {
    position: relative;
    height: 16rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    .Banner--withImage {
        height: 20rem;
    }
}

.Banner__Image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Avatar banner */
.Banner--withAvatar {
    display: flex;
    padding: 1.5rem;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
}

.Banner--withAvatar .Banner__Title {
    padding-left: 0;
    padding-right: 0;
}

.Banner__Avatar {
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 9999px;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin-right: 1rem;
    flex-shrink: 0;
}

.Banner__Title {
    font-size: 1.25rem;
    padding-left: 1rem;
    padding-right: 1rem;
    font-weight: 700;
    color: var(--secondary);
}

.Banner__Subtitle {
    color: #4b5563;
}

/* Component banner and header */
.Component__Banner {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.Component__Header {
    padding: 1rem 1.5rem;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
}

.Component__Title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0 0 0.5rem 0;
}

.Component__Subtitle,
.Component__Category {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.4;
}

/* Fields component */
.Fields {
    padding: 1rem;
}

.Fields__Container {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: none;
}

.Fields__Container:has(.Fields__Value:not(:empty)) {
    display: block;
}

.Fields__Item {
    margin-bottom: 0.75rem;
}

.Fields__Item:last-child {
    margin-bottom: 0;
}

.Fields__Item:has(.Fields__Value:empty) {
    display: none;
}

.Fields__Label {
    color: #6b7280;
    font-weight: 500;
    display: block;
}

.Fields__Label::first-letter {
    text-transform: uppercase;
}

.Fields__Description {
   
    background: white;

    padding: 1.5rem;
    font-size: 1.1rem;
    color: #1f2937;
}

/* Footer styles */
.Footer {
    background-color: var(--secondary);
    color: white;
    padding: 0;
}

.Footer__Navigation {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

/* Button styles */
#reloadButton,
.Button {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 0.5rem;
}

#reloadButton:hover,
.Button:hover {
    background-color: #285a8e;
}

#reloadButton:active,
.Button:active {
    background-color: #1e456b;
}

#reloadButton:disabled,
.Button:disabled {
    background-color: #b0b0b0;
    cursor: not-allowed;
}

/* Toast notification */
.Toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2000;
}

.Toast--visible {
    opacity: 1;
    visibility: visible;
}

