/* Blazor error boundary — base64 SVG cannot be expressed any other way */
.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."
}

/* Leaflet map — fixed height required for map initialisation */
#vet-map {
    height: 400px;
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid var(--mud-palette-lines-default);
}

/* Chat bubble shapes — MudBlazor has no chat component */
.chat-bubble-user {
    border-radius: 1.5rem 1.5rem 0.25rem 1.5rem;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    padding: 0.75rem 1.125rem;
    max-width: 75%;
    font-size: 0.9rem;
    line-height: 1.7;
    word-break: break-words;
    box-shadow: 0 2px 8px rgba(13, 115, 119, 0.25);
}

.chat-bubble-assistant {
    border-radius: 0.25rem 1.5rem 1.5rem 1.5rem;
    background: #ffffff;
    color: var(--mud-palette-text-primary);
    padding: 0.75rem 1.125rem;
    max-width: 80%;
    font-size: 0.9rem;
    line-height: 1.7;
    word-break: break-words;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.6);
}

/* Message row wrappers */
.chat-message-user-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.625rem;
}

.chat-message-assistant-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
    justify-content: flex-start;
}

/* Small teal circle with paw emoji — avatar for assistant messages */
.chat-avatar-assistant {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    align-self: flex-end;
}

/* Chat container (replaces inline styles on outer div in ChatWindow) */
.chat-container {
    background: #f8fafc;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

/* Welcome / empty state */
.chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem 1.5rem;
    gap: 0.625rem;
}
.chat-welcome-icon { font-size: 2.75rem; line-height: 1; }
.chat-welcome-headline {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    margin: 0;
}
.chat-welcome-sub {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    max-width: 340px;
    line-height: 1.55;
    margin: 0;
}

/* Tappable example prompt chips */
.chat-prompt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
    padding: 0 0.5rem;
}
.chat-prompt-chip {
    background: #ffffff;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 2rem;
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
    color: var(--mud-palette-text-primary);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06);
    user-select: none;
    font-family: inherit;
    outline: none;
    line-height: 1.4;
    text-align: left;
}
.chat-prompt-chip:hover {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(13, 115, 119, 0.2);
}
.chat-prompt-chip:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

/* Input area panel */
.chat-input-area {
    background: #ffffff;
    border-top: 1px solid var(--mud-palette-lines-default);
    padding: 0.875rem 1rem;
    box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.04);
}

/* Session header */
.chat-session-header {
    background: #ffffff;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.chat-session-pet-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}
.chat-session-context {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

/* Triage result banner (replaces MudChip in TriageBadge) */
.triage-result-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    border-radius: 0.75rem;
    padding: 1rem 1.125rem;
    margin-top: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}
.triage-result-banner-icon { font-size: 1.75rem; line-height: 1; flex-shrink: 0; }
.triage-result-banner-body { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.triage-result-banner-label {
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7;
}
.triage-result-banner-title { font-size: 1rem; font-weight: 700; line-height: 1.25; }
.triage-result-banner-action { font-size: 0.8rem; line-height: 1.4; opacity: 0.85; }

.triage-banner-emergency {
    background: #fef2f2; border: 2px solid #dc2626; color: #7f1d1d;
    animation: pulseBadge 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.triage-banner-urgent  { background: #fff7ed; border: 1.5px solid #ea580c; color: #7c2d12; }
.triage-banner-monitor { background: #fefce8; border: 1.5px solid #ca8a04; color: #713f12; }
.triage-banner-routine { background: #f0fdf4; border: 1.5px solid #16a34a; color: #14532d; }

/* Typing indicator */
.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mud-palette-text-disabled);
    animation: typingBounce 1.2s infinite ease-in-out;
    display: inline-block;
}
.typing-dot:nth-child(2) { animation-delay: 150ms; }
.typing-dot:nth-child(3) { animation-delay: 300ms; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40%           { transform: translateY(-6px); opacity: 1; }
}

/* Hero fade-in animation (Home.razor) */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
    animation: fadeInUp 0.55s ease both;
}

/* Triage badge pulse (Emergency only) */
@keyframes pulseBadge {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.7; }
}
.triage-badge-emergency {
    animation: pulseBadge 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Auth pages — outlined input fields (SSR replacements for MudTextField) */
.auth-outlined-field {
    position: relative;
}

.auth-field-input {
    display: block;
    width: 100%;
    height: 56px;
    padding: 18px 14px 4px 14px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--mud-palette-text-primary);
    background: transparent;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.auth-field-input:hover {
    border-color: rgba(0, 0, 0, 0.87);
}

.auth-field-input:focus {
    border: 2px solid var(--mud-palette-primary);
    padding: 17px 13px 3px 13px;
}

.auth-field-label {
    position: absolute;
    left: 14px;
    top: 17px;
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.6);
    pointer-events: none;
    background: white;
    padding: 0;
    transition: top 0.15s ease, font-size 0.15s ease, color 0.15s ease, padding 0.15s ease;
    line-height: 1;
}

/* Float the label when input has content or is focused */
.auth-field-input:focus ~ .auth-field-label,
.auth-field-input:not(:placeholder-shown) ~ .auth-field-label {
    top: -8px;
    left: 10px;
    font-size: 0.75rem;
    padding: 0 4px;
}

.auth-field-input:focus ~ .auth-field-label {
    color: var(--mud-palette-primary);
}

.auth-field-validation {
    display: block;
    font-size: 0.75rem;
    color: var(--mud-palette-error);
    margin-top: 3px;
    margin-left: 14px;
}
