﻿@import url('lib/tailwindcss/dist/preflight.css');

html {
    min-height: 100vh;
}

html, .main-background-gradient {
    background: linear-gradient(to bottom, rgb(225 227 233), #f4f4f4 25rem);
}

/*html::after {
    pointer-events: none;
    z-index: 9999;
}*/

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html::after {
    content: '';
    background-image: linear-gradient(to right, #3a4ed5, #3acfd5 15%, #d53abf 85%, red);
    width: 100%;
    height: 2px;
    position: fixed;
    top: 0;
    pointer-events: none; /* ✅ critical */
    z-index: 9999; /* optional */
}

h1, .mud-typography-h1 {
    font-size: 2.4rem;
    line-height: 2.5rem;
    font-weight: 400;
    /*color: #001395;*/
}

    h1:focus {
        outline: none;
    }

@media (max-width: 768px) {
    .h1-compact {
        font-size: 1.8rem;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

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

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

.no-wrap-button {
    white-space: nowrap;
}

.btn-default {
    display: flex;
    padding: 0.25rem 0.75rem;
    gap: 0.25rem;
    align-items: center;
    border-radius: 0.25rem;
    border: 1px solid #9CA3AF;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 600;
    background-color: #D1D5DB;
}

    .btn-default:hover {
        background-color: #E5E7EB;
    }

.btn-subtle {
    display: flex;
    padding: 0.25rem 0.75rem;
    gap: 0.25rem;
    align-items: center;
    border-radius: 0.25rem;
    border: 1px solid #D1D5DB;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

    .btn-subtle:hover {
        border-color: #93C5FD;
        background-color: #DBEAFE;
    }

.page-width {
    max-width: 960px; /* match the table + message width */
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.chat-page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    position: relative;
}

.chat-content-scrollable {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 90px;
}

.chat-footer-sticky {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: var(--mud-palette-surface);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 599px) {
    .chat-content-scrollable {
        padding-bottom: 100px;
    }
}

/* All your guide sections */
.guide-section {
    margin-top: 12px;
    scroll-margin-top: 72px; /* 64px toolbar + a little breathing space */
}

#top {
    scroll-margin-top: 72px;
}

/* Fixed floating container that uses MudBlazor elevation */
.back-to-top-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.25rem 0.5rem;
}

/* Light theme (MudBlazor default) */
body.mud-theme-default .back-to-top-container,
body:not(.mud-theme-dark) .back-to-top-container {
    background-color: rgba(255, 255, 255, 0.80); /* frosted white */
}

/* Dark theme */
body.mud-theme-dark .back-to-top-container {
    background-color: rgba(18, 18, 18, 0.80); /* frosted dark */
}

/* Inner MudButton styling so it looks clean on transparent surface */
.back-to-top-button {
    text-transform: none; /* "Back to top" instead of ALL CAPS */
    font-weight: 600;
    padding-inline: 0.9rem;
    padding-block: 0.4rem;
}

    .back-to-top-button .mud-button-start-icon {
        margin-right: 0.3rem;
    }

/* AppBar */
/* Auto-gradient from MudTheme palette variables */
.appbar-auto-gradient {
    background-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    background-image: linear-gradient(90deg, #3acfd5, #3acfd5);
    /*background-image: linear-gradient(90deg, var(--mud-palette-primary), var(--mud-palette-secondary));*/
}

@supports (color: color-mix(in srgb, white, black)) {
    .appbar-auto-gradient {
        background-image: linear-gradient( 90deg, #3acfd5, color-mix(in srgb, var(--mud-palette-primary) 55%, var(--mud-palette-secondary) 45%), #3acfd5 );
    }
}

.glow-appbar {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.12), 0 0 16px color-mix(in srgb, var(--mud-palette-secondary) 40%, transparent);
}

@supports not (color: color-mix(in srgb, white, black)) {
    .glow-appbar {
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.12), 0 0 16px rgba(0, 150, 136, 0.25);
    }
}

/* AppBar menu item hover effects */
.mud-appbar .mud-button-root {
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

    .mud-appbar .mud-button-root:hover {
        color: #b5feff;
        text-shadow: 0 0 6px var(--mud-palette-primary), 0 0 18px #d6fdff, 0 0 36px #3acfd5;
    }

    .mud-appbar .mud-button-root.mud-button-text-primary {
        color: var(--mud-palette-primary);
    }

/* ===============================
   HERO CAROUSEL (single definition)
   =============================== */

.landing-carousel {
    height: 200px;
}

    /* Make each slide match the carousel height (not the viewport) */
    .landing-carousel .mud-carousel-item {
        height: 100%;
        min-height: 0; /* key: remove the 100vh behavior */
    }

        /* Ensure the inner wrapper also stretches */
        .landing-carousel .mud-carousel-item > * {
            height: 100%;
        }

.carousel-slide {
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* prevents spill in 200px hero */
}

.carousel-overlay {
    background: rgba(0,0,0,0.45);
    padding: clamp(0.75rem, 2vw, 1.5rem);
    border-radius: 16px;
    color: white;
    text-align: center;
    max-width: 92%;
    margin: 0 auto;
}

.landing-carousel .mud-icon-root.mud-svg-icon {
    color: #e8feff !important;
    filter: drop-shadow(0 0 8px rgba(58, 207, 213, 0.8));
}

/* ===============================
   HERO RESPONSIVE TEXT (LARGER)
   =============================== */

.hero-title {
    font-size: clamp(1.7rem, 4.8vw, 3.2rem);
    line-height: 1.08;
    font-weight: 700;
    margin: 0;
    /* Clean wrapping */
    text-wrap: balance;
    /* Controls wrapping width */
    max-width: 28ch;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    line-height: 1.2;
    font-weight: 600;
    margin-top: 0.5rem;
    text-wrap: balance;
    max-width: 34ch;
    margin-left: auto;
    margin-right: auto;
}

/* Extra safety for very narrow phones */
@media (max-width: 420px) {
    .hero-title {
        max-width: 20ch;
    }

    .hero-subtitle {
        max-width: 26ch;
    }
}

/* Image with glow effect */
.glow-image {
    border-radius: 12px;
    box-shadow: 0 0 8px rgb(26, 95, 100, 0.35), 0 0 18px rgb(10, 39, 41, 0.35), 0 0 28px #b5feff;
    height: 300px;
    object-fit: contain;
}

.lds-ellipsis div {
    background: var(--mud-palette-primary);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation-duration: 0.8s;
}

/// Scenario cards with hover lift and glow
/* Smooth transition */
.scenario-card {
    transition: all 0.25s ease-in-out;
    border: 2px solid transparent; /* prevents layout shift */
}

/* Glow effect on hover */
.scenario-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 12px rgba(58, 207, 213, 0.7), 0 0 24px rgba(58, 78, 213, 0.5);
    border-color: rgba(58, 207, 213, 0.6);
}
