/* custom styles for chat */
body {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(16, 92, 115, 0.08), rgba(12, 35, 64, 0) 38%),
        linear-gradient(225deg, rgba(19, 156, 134, 0.12), rgba(255, 255, 255, 0) 42%),
        #f4f7fb;
}

.chat-shell {
    overflow: hidden;
    border: 1px solid rgba(12, 35, 64, 0.08);
    border-radius: 1rem;
}

.chat-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 150px;
    padding: 1.35rem 1.5rem;
    overflow: hidden;
    color: #f8fbff;
    background:
        linear-gradient(135deg, rgba(31, 213, 177, 0.18), rgba(31, 213, 177, 0) 42%),
        linear-gradient(120deg, #061a31 0%, #123f63 54%, #0d5c60 100%);
}

.chat-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.48;
}

.chat-hero::after {
    content: "";
    position: absolute;
    top: -52px;
    right: -40px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 14px);
    transform: rotate(10deg);
    opacity: 0.55;
}

.chat-hero__content,
.chat-hero__badge {
    position: relative;
    z-index: 1;
}

.chat-hero__status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
}

.chat-hero__signal {
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 50%;
    background: #2ff5bc;
    box-shadow: 0 0 0 0 rgba(47, 245, 188, 0.55);
    animation: signal-pulse 1.8s ease-out infinite;
}

.chat-hero h4 {
    margin: 0.85rem 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
}

.chat-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.95rem;
}

.chat-hero__badge {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 4.6rem;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 0.5rem;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.05));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 16px 40px rgba(0, 0, 0, 0.18);
}

.chat-hero__badge span {
    display: grid;
    place-items: center;
    width: 3.2rem;
    aspect-ratio: 1;
    border-radius: 0.45rem;
    background: rgba(2, 13, 27, 0.32);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0;
}

@keyframes signal-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(47, 245, 188, 0.55);
    }

    70% {
        box-shadow: 0 0 0 0.55rem rgba(47, 245, 188, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(47, 245, 188, 0);
    }
}

.chat-body {
    background: #f8f9fa;
    border-radius: 0 0 0.5rem 0.5rem;
    padding: 1rem;
    min-height: 300px;
}

#user-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,.25);
}

.card {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

@media (min-width: 768px) {
    .chat-hero h4 {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .chat-hero {
        align-items: flex-start;
        min-height: 138px;
        padding: 1.1rem;
    }

    .chat-hero__badge {
        display: none;
    }
}
