/* app.css — Custom styles non coperti da Tailwind utilities */

/* Blazor form validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Blazor loading progress */
.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #f59e0b;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Blazor error boundary */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Si è verificato un errore.";
    }

/* Auth layout card styles (Login page) */
.auth-card-wrapper {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.dark .auth-card {
    background: rgba(15, 23, 42, 0.97);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.auth-card-body {
    padding: 2.5rem;
}

.auth-logo {
    height: 100px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

/* Chat sidebar CSS (mantiene stili proprietari del componente) */
.chat-sidebar {
    position: fixed;
    right: -420px;
    top: 0;
    bottom: 0;
    width: 400px;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    border-radius: 16px 0 0 16px;
}

.dark .chat-sidebar {
    background: #0f172a;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
}

.chat-sidebar.open {
    right: 0;
}

.chat-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: white;
    border-radius: 16px 0 0 0;
}

.dark .chat-sidebar-header {
    background: #0f172a;
    border-bottom-color: #1e293b;
}

.chat-sidebar-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
}

.dark .chat-sidebar-header h5 {
    color: #e2e8f0;
}

.chat-sidebar-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
}

/* QR code container */
.qr-code-container img {
    border: 5px solid #e2e8f0;
    border-radius: 12px;
}

.dark .qr-code-container img {
    border-color: #334155;
}

code {
    color: #c02d76;
}
