/* Iris sidebar override */
.mud-drawer {
    background-color: #26215C !important;
}

.mud-nav-link {
    color: #CECBF6 !important;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s;
}

    .mud-nav-link:hover {
        background: #3D3870 !important;
        color: #FFFFFF !important;
    }

    .mud-nav-link.active {
        background: #4A4499 !important;
        color: #FFFFFF !important;
        border-left-color: #EF9F27;
    }

    .mud-nav-link .mud-icon-root {
        color: inherit !important;
    }

/* Target the pseudo-element that renders the required asterisk */
.mud-input-required .mud-input-label::after,
.mud-input-required .mud-input-outlined-border legend::after {
    color: red !important;
}

/* Appbar */
.mud-appbar {
    background-color: #ffffff !important;
    color: #26215C !important;
}

/* Blazor error footer */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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;
}

/* Error boundary */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxL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2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

/* Drag-and-drop */
.mud-drop-item-dragging {
    opacity: 0.5;
    box-shadow: var(--mud-elevation-4);
}

.drag-target {
    outline: 2px dashed var(--mud-palette-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Strength bar */
.iris-password-strength {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.iris-password-strength--visible {
    display: flex;
}

.iris-password-strength-bar {
    display: flex;
    gap: 4px;
    flex: 1;
}

.iris-password-strength-segment {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--mud-palette-lines-default);
    transition: background 0.2s ease;
}

.iris-strength--weak {
    background: #e53935;
}

.iris-strength--fair {
    background: #fb8c00;
}

.iris-strength--strong {
    background: #7cb342;
}

.iris-strength--very-strong {
    background: #2e7d32;
}

.iris-password-strength-label {
    font-size: 11px;
    min-width: 64px;
    text-align: right;
    color: var(--mud-palette-text-secondary);
}

/* Rules list — hidden until focused */
.iris-password-rules {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 2px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}

.iris-password-rules--visible {
    max-height: 200px;
    opacity: 1;
}

.iris-password-rule {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.iris-password-rule-icon--neutral,
.iris-password-rule-icon--met,
.iris-password-rule-icon--unmet {
    font-size: 13px;
    flex-shrink: 0;
    display: none;
}

.iris-password-rule--neutral .iris-password-rule-icon--neutral {
    display: inline;
    color: var(--mud-palette-text-disabled);
}

.iris-password-rule--neutral .mud-typography {
    color: var(--mud-palette-text-disabled);
}

.iris-password-rule--met .iris-password-rule-icon--met {
    display: inline;
    color: var(--mud-palette-success);
}

.iris-password-rule--met .mud-typography {
    color: var(--mud-palette-success);
}

.iris-password-rule--unmet .iris-password-rule-icon--unmet {
    display: inline;
    color: var(--mud-palette-error);
}

.iris-password-rule--unmet .mud-typography {
    color: var(--mud-palette-error);
}

/* Tooltip */
.iris-tooltip-anchor {
    position: relative;
    display: inline-flex;
    align-items: center;
}

    .iris-tooltip-anchor::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        background: rgba(30, 27, 60, 0.95);
        color: #fff;
        font-size: 11px;
        line-height: 1.5;
        padding: 6px 10px;
        border-radius: 6px;
        width: 260px;
        white-space: normal;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.15s ease;
        z-index: 100;
    }

    .iris-tooltip-anchor::before {
        content: '';
        position: absolute;
        bottom: calc(100% + 2px);
        left: 50%;
        transform: translateX(-50%);
        border: 5px solid transparent;
        border-top-color: rgba(30, 27, 60, 0.95);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.15s ease;
        z-index: 100;
    }

    .iris-tooltip-anchor:hover::after,
    .iris-tooltip-anchor:hover::before {
        opacity: 1;
    }