/* GapSense Design System */

/* Remove focus outline on h1 elements (Blazor's FocusOnNavigate sets focus on first h1 for accessibility) */
h1:focus {
    outline: none;
}

/* Custom utilities that complement Tailwind */
.glass-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
}

.glass-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.gradient-text {
    background: linear-gradient(135deg, #0f172a 0%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-pattern {
    background-color: #ffffff;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Form reset for Blazor file inputs to work with Tailwind */
input[type="file"]::file-selector-button {
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: background-color 0.15s;
}

input[type="file"]::file-selector-button:hover {
    background-color: #e2e8f0;
}

/* Markdown content styling for reports */
.prose-report h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.prose-report h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.prose-report h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose-report p {
    color: #475569;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.prose-report ul, .prose-report ol {
    color: #475569;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose-report li {
    margin-bottom: 0.5rem;
}

.prose-report table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.prose-report th {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #334155;
}

.prose-report td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    color: #475569;
}

.prose-report strong {
    font-weight: 600;
    color: #1e293b;
}

.prose-report code {
    background-color: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: 'JetBrains Mono', monospace;
    color: #334155;
}

.prose-report pre {
    background-color: #0f172a;
    color: #f1f5f9;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.prose-report pre code {
    background-color: transparent;
    padding: 0;
    color: #f1f5f9;
}

.prose-report blockquote {
    border-left: 4px solid #0ea5e9;
    padding-left: 1rem;
    font-style: italic;
    color: #475569;
    margin: 1rem 0;
}

/* Animation for streaming text */
@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.streaming-text::after {
    content: '▌';
    animation: pulse-text 1s infinite;
    color: #0ea5e9;
}

/* Card hover effect */
.card-hover {
    transition: all 0.2s;
}

.card-hover:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    border-color: #bae6fd;
    transform: translateY(-2px);
}

/* Blazor error UI */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #dc2626;
    color: white;
    padding: 1rem;
    text-align: center;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background-color: #dc2626;
    color: white;
    padding: 1rem;
}

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

/* Validation styles */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

.invalid {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

.validation-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
