#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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: 3.5rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.gtg-monospaced-text {
    font-family: 'Consolas', 'Courier New', monospace;
}

/* Custom Color Picker */
.ccp-root {
    position: relative;
    display: inline-block;
    font-family: 'Roboto', sans-serif;
}

.ccp-label {
    font-size: 12px;
    color: var(--mud-palette-text-secondary, #b0b0b0);
    margin-bottom: 4px;
}

.ccp-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--mud-palette-lines-default, #555);
    border-radius: 4px;
    background: var(--mud-palette-surface, #2a2a2a);
    color: var(--mud-palette-text-primary, #fff);
    cursor: pointer;
    min-width: 120px;
    font-size: 13px;
}

.ccp-trigger:hover {
    border-color: var(--mud-palette-primary, #594ae2);
}

.ccp-trigger-swatch {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-clip: padding-box;
    flex-shrink: 0;
    background-image:
        linear-gradient(45deg, #555 25%, transparent 25%),
        linear-gradient(-45deg, #555 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #555 75%),
        linear-gradient(-45deg, transparent 75%, #555 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
}

.ccp-trigger-text {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.ccp-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 2000;
}

.ccp-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 2001;
    background: var(--mud-palette-surface, #1f1f1f);
    border: 1px solid var(--mud-palette-lines-default, #444);
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    width: 240px;
    user-select: none;
}

.ccp-sv {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: 4px;
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;
}

.ccp-sv-white {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.ccp-sv-black {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
}

.ccp-sv-pointer {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 1px 4px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.ccp-hue {
    position: relative;
    width: 100%;
    height: 14px;
    margin-top: 10px;
    border-radius: 7px;
    cursor: pointer;
    background: linear-gradient(to right,
        #ff0000 0%, #ffff00 17%, #00ff00 33%,
        #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
    touch-action: none;
}

.ccp-hue-pointer {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 18px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ccp-row {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    align-items: center;
}

.ccp-hex-input {
    flex: 1;
    padding: 6px 8px;
    background: var(--mud-palette-background, #121212);
    color: var(--mud-palette-text-primary, #fff);
    border: 1px solid var(--mud-palette-lines-default, #555);
    border-radius: 4px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    outline: none;
}

.ccp-hex-input:focus {
    border-color: var(--mud-palette-primary, #594ae2);
}

.ccp-save {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid var(--mud-palette-lines-default, #555);
    background: var(--mud-palette-background, #121212);
    color: var(--mud-palette-text-primary, #fff);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccp-save:hover {
    border-color: var(--mud-palette-primary, #594ae2);
    color: var(--mud-palette-primary, #594ae2);
}

.ccp-swatches {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 12px;
}

.ccp-swatch {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: transform 0.08s ease;
}

.ccp-swatch:hover {
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.5);
}

.ccp-swatch-empty {
    background:
        linear-gradient(45deg, #2a2a2a 25%, transparent 25%),
        linear-gradient(-45deg, #2a2a2a 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #2a2a2a 75%),
        linear-gradient(-45deg, transparent 75%, #2a2a2a 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
    background-color: #1a1a1a;
    cursor: default;
}

.ccp-swatch-empty:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.15);
}

.ccp-swatch-x {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    background: #b32121;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.ccp-swatch:hover .ccp-swatch-x {
    display: flex;
}

/* Description row drag-to-reorder */
.desc-row {
    transition: outline-color 0.1s ease, background-color 0.1s ease;
    outline: 2px solid transparent;
}

.desc-row-drop {
    outline-color: var(--mud-palette-primary, #594ae2);
    background-color: rgba(89, 74, 226, 0.08);
}

.desc-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    color: var(--mud-palette-text-secondary, #aaa);
    cursor: grab;
    user-select: none;
    border-radius: 4px;
}

.desc-drag-handle:hover {
    color: var(--mud-palette-text-primary, #fff);
    background-color: rgba(255, 255, 255, 0.06);
}

.desc-drag-handle:active {
    cursor: grabbing;
}

/* Icon Picker */
.icon-picker-field {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.icon-picker-field-label {
    font-size: 12px;
    color: var(--mud-palette-text-secondary, #b0b0b0);
}

.icon-picker-field-tile {
    width: 80px;
    height: 80px;
    padding: 4px;
    border: 1px dashed var(--mud-palette-lines-default, #555);
    border-radius: 6px;
    background: var(--mud-palette-surface, #1f1f1f);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.1s ease, transform 0.08s ease;
}

.icon-picker-field-tile:hover {
    border-color: var(--mud-palette-primary, #594ae2);
    border-style: solid;
    transform: scale(1.02);
}

.icon-picker-field-tile img,
.icon-picker-field-tile video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.icon-picker-field-empty {
    color: var(--mud-palette-text-secondary, #888);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
    max-height: 540px;
    overflow-y: auto;
    padding: 4px;
}

.icon-picker-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: var(--mud-palette-background, #121212);
    border: 1px solid var(--mud-palette-lines-default, #555);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.08s ease, transform 0.08s ease;
    color: inherit;
    font-family: inherit;
}

.icon-picker-tile:hover {
    border-color: var(--mud-palette-primary, #594ae2);
    transform: scale(1.03);
}

.icon-picker-tile-current {
    border-color: var(--mud-palette-primary, #594ae2);
    box-shadow: 0 0 0 1px var(--mud-palette-primary, #594ae2) inset;
}

.icon-picker-tile img,
.icon-picker-tile video {
    width: 100%;
    height: 64px;
    object-fit: contain;
}

.icon-picker-folder-tile {
    background: rgba(89, 74, 226, 0.08);
    color: var(--mud-palette-warning, #ffb74d);
}

.icon-picker-folder-tile .icon-picker-tile-name {
    color: var(--mud-palette-text-primary, #fff);
}

.icon-picker-tile-name {
    font-size: 10px;
    line-height: 1.2;
    color: var(--mud-palette-text-secondary, #aaa);
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 2px;
}

