﻿html, body {
    height: 100%;
    margin: 0;
}

body {
    position: relative;
    z-index: 0;
}

.tyn-chat-form-textarea {
    width: 100%;
    min-height: 38px;
    padding: 10px;
    margin-right: 20px;
    border: 0;
    border-style: none;
    border-width: 0;
    border-color: transparent;
    border-radius: 0.25rem;
    background-color: #e9ecef;
    color: #212529;
    font-size: 0.875rem;
    outline: none;
    box-shadow: none;
    resize: vertical;
    transition: all 0.3s ease;
}

.tyn-chat-form-textarea:focus {
    border: 0;
    border-style: none;
    border-width: 0;
    border-color: transparent;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.tyn-chat-form-enter {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.sticky-assistant {
    position: sticky;
    top: 0;
    z-index: 10;
}

.tyn-reply-text {
    color: #fff;
}

.tyn-reply-text p {
    margin-top: 5px !important;
    margin-bottom: 5px !important;
}

.tyn-reply-text ul {
    margin-top: 0px !important;
    margin-bottom: 15px !important;
    list-style: disc !important;
    padding-left: 1.2rem !important;
    display: block !important;
}

.tyn-reply-text li {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    display: list-item !important;
}

/* Ensure full height layout for the chat body */
.tny-chat-body {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    overflow: hidden; 
}

/* Scrollable chat content area */
.tny-chat-content {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    min-height: 0 !important; 
}

/* Prompt area stays at bottom */
.tny-chat-prompt {
    flex-shrink: 0 !important;
    z-index: 10 !important;
    background: white; 
}

/* Full-width form inside the prompt */
.tyn-chat-form {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Ensure the inner row stretches but aligns left */
.tyn-chat-form .row {
    width: 100%;
    max-width: none;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Match Contact Section styling */
.tyn-chat-form .bg-transparent {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.rate-card {
    min-width: 325px;
    max-width: 325px;
}

.rate-category {
    white-space: normal;
    overflow: visible !important;

}

@media (max-width: 576px) {
    .suggestion-button {
        width: 100%;
    }
}

.dynamic-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 0.75rem;
    min-width: 40px;
    min-height: 40px;
    color: #fff !important;
    border: 2px solid #dee2e6 !important;
}

/* Dark mode adjustment */
[data-bs-theme="dark"] .dynamic-circle
{
    background-color: #343a40;
    color: #fff !important;
    border: 1px solid #495057 !important;
}

.modal {
    z-index: 9998 !important;
    position: fixed;
}

.modal-backdrop {
    z-index: 9997 !important;
}

.no-spinners::-webkit-inner-spin-button,
.no-spinners::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.no-spinners {
    -moz-appearance: textfield;
}

.dot-typing {
    display: inline-block;
    white-space: nowrap;
    vertical-align: middle;
    min-width: 20px;
}

.dot-typing::after {
    content: '';
    display: inline-block;
    animation: dot-flash 1.5s infinite steps(3, start);
}

@keyframes dot-flash {
    0% {
        content: ' ';
    }

    33% {
        content: '. ';
    }

    66% {
        content: '. .';
    }

    100% {
        content: '. . .';
    } 
}

.powered-by {
    padding-bottom: 15px;
    font-size: 0.8rem;
}

.powered-logo {
    max-height: 40px;
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.btn-chat {
    --bs-btn-color: #475569;
    --bs-btn-bg: #ebebeb;
    --bs-btn-border-color: #ebebeb;
    --bs-btn-hover-color: #2f3034;
    --bs-btn-hover-bg: #cecccc;
    --bs-btn-hover-border-color: #cecccc;
    --bs-btn-focus-shadow-rgb: 227, 230, 233;
    --bs-btn-active-color: #2f3034;
    --bs-btn-active-bg: #bfdbfe;
    --bs-btn-active-border-color: #bfdbfe;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #475569;
    --bs-btn-disabled-bg: #ffffff;
    --bs-btn-disabled-border-color: #ffffff;
}

[data-bs-theme=dark] .btn-chat {
    --bs-btn-color: #94a3b8;
    --bs-btn-bg: #203047;
    --bs-btn-border-color: #203047;
    --bs-btn-hover-color: #2563eb;
    --bs-btn-hover-bg: #bfdbfe;
    --bs-btn-hover-border-color: #bfdbfe;
    --bs-btn-focus-shadow-rgb: 49, 65, 88;
    --bs-btn-active-color: #2563eb;
    --bs-btn-active-bg: #bfdbfe;
    --bs-btn-active-border-color: #bfdbfe;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #475569;
    --bs-btn-disabled-bg: #e2e8f0;
    --bs-btn-disabled-border-color: #e2e8f0;
}

.image-link:hover {
    color: #2f3034 !important;
}

[data-bs-theme=dark] .image-link:hover {
    color: #fff !important;
}

/* Welcome page light mode hover */
.welcome-hover-card:hover {
    background-color: #ccc;
    color: #fff;
    transition: background-color 0.2s ease-in-out;
}

.welcome-hover-card:hover p {
    color: #fff;
}

/* Welcoem page dark mode: override background and text color */
[data-bs-theme="dark"] .welcome-hover-card:hover {
    background-color: transparent !important;
    color: inherit !important; /* fallback for general text */
}

[data-bs-theme="dark"] .welcome-hover-card:hover p {
    color: #fff !important;
}

/* Active Chats Display Over Chat Icon (#) */
.badge-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.chat-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(45%,-45%);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font: 700 12px/18px system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
}

@media (min-width:992px) {
    .chat-badge {
        min-width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 13px;
    }
}
