@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.red-title {
    color: red;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/*#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}*/

#blazor-error-ui {
    position: fixed; /* Sit on top of the page content */
    display: none; /* Hidden by default */
    width: 100%; /* Full width (cover the whole page) */
    height: 100%; /* Full height (cover the whole page) */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.75); /* Black background with opacity */
    z-index: 1000; /* Specify a stack order in case you're using a different order for other elements */
    text-align: center;
}

    #blazor-error-ui p {
        font-size: 1.2em;
        width: 400px;
        padding: 25px;
        border-radius: 10px;
        color: white;
        background-color: #0000cd;
        border-color: white;
        border-width: 3px;
        border-style: solid;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
    }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }
.scroll-to-top-icon {
    position: fixed;
    bottom: 80px;
    right: 20px;
    font-size: 2.2rem; /* Adjust size as needed */
    color: white;
    background-color: #2cb4e9;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 1000;
    text-align: center;
    line-height: 24px; /* Align the icon vertically */
}

    .scroll-to-top-icon.show {
        display: block;
    }

.ForInput {
    width: 1.2rem;
    height: 1.1rem;
    border: 1px solid #4a4a4a; /* Slightly darker border */
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
    margin-right: 0.8rem;
}
.ql-editor{
    min-height:10vh !important;
    overflow-y:visible;
    max-height:auto;
}

/* =========================================================
   Chat Popup
   ========================================================= */

.chat-popup-container {
    --chat-primary: #0866ff;
    --chat-primary-light: #1685f8;
    --chat-primary-dark: #0057e7;
    --chat-broadcast: #0d9488;
    --chat-broadcast-dark: #0b7d73;
    --chat-ai: #7c3aed;
    --chat-ai-dark: #6d28d9;
    --chat-border: #e5e7eb;
    --chat-text: #1f2937;
    --chat-muted: #6b7280;
    --chat-background: #f8fafc;
    position: fixed;
    right: 70px;
    bottom: 20px;
    z-index: 9999;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

    .chat-popup-container,
    .chat-popup-container * {
        box-sizing: border-box;
    }



/* =========================================================
   Not Authorized App.razor
   ========================================================= */

.not-authorized-wrapper {
    width: 100%;
    min-height: 75vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #eef3f8;
    padding: 40px 24px;
    box-sizing: border-box;
}

.not-authorized-card {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    padding: 48px 42px 44px;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.14);
    animation: notAuthorizedFadeIn 0.45s ease;
    box-sizing: border-box;
}

.not-authorized-icon {
    width: 82px;
    height: 82px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: #fff0c2;
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.not-authorized-card h1 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.not-authorized-card p {
    margin: 0;
    color: #475569;
    font-size: 17px;
    line-height: 1.55;
}

.not-authorized-back {
    min-width: 150px;
    min-height: 52px;
    padding: 13px 26px;
    border: none;
    border-radius: 12px;
    background: #182235;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.25);
    transition: 0.2s ease;
}
.not-authorized-actions {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

    .not-authorized-back:hover {
        background: #0f172a;
        transform: translateY(-2px);
    }

    .not-authorized-back:active {
        transform: translateY(0);
    }

@keyframes notAuthorizedFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Main toggle button
   ========================================================= */

.chat-toggle-button {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chat-primary-light) 0%, var(--chat-primary) 100%);
    color: white;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(8, 102, 255, 0.35), 0 1px 3px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-toggle-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.chat-toggle-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(8, 102, 255, 0.42), 0 2px 4px rgba(15, 23, 42, 0.12);
}

.chat-toggle-button:active {
    transform: translateY(0);
}

.chat-toggle-button:focus-visible {
    outline: 3px solid rgba(8, 102, 255, 0.25);
    outline-offset: 3px;
}


/* =========================================================
   Chat window
   ========================================================= */

.chat-window {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: 450px;
    height: 572px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--chat-border);
    border-radius: 18px;
    background: white;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2), 0 4px 12px rgba(15, 23, 42, 0.08);
    animation: chatWindowSlideUp 0.25s ease-out;
}

.chat-window-hidden {
    display: none;
}

@keyframes chatWindowSlideUp {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================================
   Header
   ========================================================= */

.chat-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--chat-border);
    background: linear-gradient( 135deg, #ffffff 0%, #f8fafc 100% );
    color: var(--chat-text);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.chat-status-dot {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18), 0 0 8px rgba(34, 197, 94, 0.3);
}

.chat-header-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.chat-title {
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-subtitle {
    overflow: hidden;
    color: var(--chat-muted);
    font-size: 11.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-close-button {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--chat-muted);
    font-family: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

    .chat-close-button:hover {
        background: #eef2f7;
        color: var(--chat-text);
    }

    .chat-close-button:active {
        transform: scale(0.94);
    }

    .chat-close-button:focus-visible {
        outline: 3px solid rgba(8, 102, 255, 0.18);
    }


/* =========================================================
   Messages body
   ========================================================= */

.chat-body {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 8px;
    overflow: hidden;
    background: radial-gradient( circle at top right, rgba(8, 102, 255, 0.035), transparent 34% ), var(--chat-background);
}

.chat-messages-list {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 8px 5px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    list-style: none;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}


/* Firefox scrollbar */

.chat-messages-list {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}


    /* Chrome / Edge scrollbar */

    .chat-messages-list::-webkit-scrollbar {
        width: 6px;
    }

    .chat-messages-list::-webkit-scrollbar-track {
        background: transparent;
    }

    .chat-messages-list::-webkit-scrollbar-thumb {
        border-radius: 10px;
        background: #cbd5e1;
    }

        .chat-messages-list::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }


/* =========================================================
   Empty state
   ========================================================= */

.chat-empty-state {
    margin: auto;
    padding: 20px;
    color: var(--chat-muted);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}


/* =========================================================
   Date separator
   ========================================================= */

.chat-date-separator {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 5px 0 1px;
    list-style: none;
}

    .chat-date-separator::before,
    .chat-date-separator::after {
        content: "";
        height: 1px;
        flex: 1;
        background: #e2e8f0;
    }

    .chat-date-separator span {
        flex-shrink: 0;
        margin: 0 10px;
        padding: 4px 10px;
        border: 1px solid #e2e8f0;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.92);
        color: #64748b;
        font-size: 10.5px;
        font-weight: 600;
        white-space: nowrap;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }


/* =========================================================
   Message item
   ========================================================= */

.chat-message-item {
    width: 100%;
    list-style: none;
    animation: chatMessageAppear 0.2s ease-out;
}

.chat-message-row {
    width: fit-content;
    max-width: 88%;
}

.chat-message-content {
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.chat-message-sender {
    max-width: 100%;
    margin: 0 0 4px 10px;
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   Blue Messenger-style bubble
   ========================================================= */

.chat-message-bubble {
    position: relative;
    display: inline-block;
    min-width: 38px;
    max-width: 100%;
    padding: 9px 13px;
    border-radius: 18px 18px 18px 5px;
    background: linear-gradient( 135deg, var(--chat-primary-light) 0%, var(--chat-primary) 62%, var(--chat-primary-dark) 100% );
    color: white;
    box-shadow: 0 3px 8px rgba(8, 102, 255, 0.2), 0 1px 2px rgba(15, 23, 42, 0.08);
}

    .chat-message-bubble::before {
        content: "";
        position: absolute;
        left: -4px;
        bottom: 1px;
        width: 10px;
        height: 12px;
        background: var(--chat-primary-dark);
        clip-path: polygon( 100% 0, 100% 100%, 0 100% );
    }

.chat-message-text {
    position: relative;
    z-index: 1;
    display: block;
    margin: 0;
    padding: 0;
    color: white;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.42;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-message-time {
    margin: 4px 0 0 10px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
}

@keyframes chatMessageAppear {
    from {
        opacity: 0;
        transform: translateY(7px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================================
   Footer
   ========================================================= */

.chat-footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--chat-border);
    background: rgba(249, 250, 251, 0.98);
}

.chat-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .chat-input-row .chat-input-message {
        min-width: 0;
        flex: 1;
    }

.chat-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    background: white;
    color: var(--chat-text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

    .chat-input:hover {
        border-color: #b8c0cc;
    }

    .chat-input:focus {
        border-color: var(--chat-primary);
        box-shadow: 0 0 0 3px rgba(8, 102, 255, 0.11);
    }

    .chat-input::placeholder {
        color: #9ca3af;
    }

/* =========================================================
   Chat name display / editor
   ========================================================= */

.chat-name-box {
    width: 100%;
}

.chat-name-display {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 9px 8px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: linear-gradient( 135deg, #ffffff 0%, #f8fafc 100% );
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

    .chat-name-display[hidden],
    .chat-name-editor[hidden] {
        display: none;
    }

.chat-name-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-name-label {
    color: #94a3b8;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.chat-name-value {
    overflow: hidden;
    color: #1e293b;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-name-value-empty {
    color: #94a3b8;
    font-style: italic;
    font-weight: 500;
}


/* Edit SVG button */

.chat-name-icon-button {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(8, 102, 255, 0.18);
    border-radius: 9px;
    background: rgba(8, 102, 255, 0.06);
    color: var(--chat-primary);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

    .chat-name-icon-button svg {
        width: 15px;
        height: 15px;
    }

    .chat-name-icon-button:hover {
        border-color: rgba(8, 102, 255, 0.38);
        background: rgba(8, 102, 255, 0.12);
        box-shadow: 0 2px 7px rgba(8, 102, 255, 0.13);
        transform: translateY(-1px);
    }

    .chat-name-icon-button:active {
        transform: translateY(0) scale(0.96);
    }

    .chat-name-icon-button:focus-visible {
        outline: 3px solid rgba(8, 102, 255, 0.15);
        outline-offset: 2px;
    }


/* Edit mode */

.chat-name-editor {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(8, 102, 255, 0.45);
    border-radius: 11px;
    background: white;
    box-shadow: 0 0 0 3px rgba(8, 102, 255, 0.09), 0 2px 6px rgba(15, 23, 42, 0.06);
    animation: chatNameEditorOpen 0.16s ease-out;
}

.chat-name-input {
    min-width: 0;
    height: 34px;
    flex: 1;
    padding: 0 9px;
    border: none;
    outline: none;
    background: transparent;
    color: #1e293b;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
}

    .chat-name-input::placeholder {
        color: #a1a1aa;
        font-weight: 400;
    }


/* Save and cancel buttons */

.chat-name-editor-button {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

    .chat-name-editor-button svg {
        width: 15px;
        height: 15px;
    }

.chat-name-save-button {
    background: var(--chat-primary);
    color: white;
    box-shadow: 0 2px 6px rgba(8, 102, 255, 0.22);
}

    .chat-name-save-button:hover {
        background: var(--chat-primary-dark);
        transform: translateY(-1px);
    }

.chat-name-cancel-button {
    background: #f1f5f9;
    color: #64748b;
}

    .chat-name-cancel-button:hover {
        background: #e2e8f0;
        color: #334155;
    }

.chat-name-editor-button:active {
    transform: scale(0.95);
}

.chat-name-editor-button:focus-visible {
    outline: 3px solid rgba(8, 102, 255, 0.15);
    outline-offset: 2px;
}

@keyframes chatNameEditorOpen {
    from {
        opacity: 0;
        transform: translateY(3px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================================
   Primary send button
   ========================================================= */

.chat-send-button {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: linear-gradient( 135deg, var(--chat-primary-light) 0%, var(--chat-primary) 100% );
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(8, 102, 255, 0.2);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

    .chat-send-button svg {
        width: 17px;
        height: 17px;
        flex-shrink: 0;
    }

    .chat-send-button:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 5px 12px rgba(8, 102, 255, 0.3);
    }

    .chat-send-button:active:not(:disabled) {
        transform: translateY(0) scale(0.97);
    }

    .chat-send-button:focus-visible {
        outline: 3px solid rgba(8, 102, 255, 0.2);
        outline-offset: 2px;
    }

    .chat-send-button:disabled {
        opacity: 0.45;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }


/* =========================================================
   Secondary actions: Hub4us + Ask AI
   ========================================================= */

.chat-action-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-action-button {
    height: 36px;
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: white;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

    .chat-action-button svg {
        width: 13px;
        height: 13px;
        flex-shrink: 0;
    }

.chat-action-broadcast {
    border-color: rgba(13, 148, 136, 0.32);
    background: rgba(13, 148, 136, 0.06);
    color: var(--chat-broadcast-dark);
}

    .chat-action-broadcast:hover:not(:disabled) {
        border-color: var(--chat-broadcast);
        background: rgba(13, 148, 136, 0.13);
        box-shadow: 0 2px 7px rgba(13, 148, 136, 0.12);
    }

.chat-action-ai {
    border-color: rgba(124, 58, 237, 0.32);
    background: rgba(124, 58, 237, 0.06);
    color: var(--chat-ai-dark);
}

    .chat-action-ai:hover:not(:disabled) {
        border-color: var(--chat-ai);
        background: rgba(124, 58, 237, 0.13);
        box-shadow: 0 2px 7px rgba(124, 58, 237, 0.12);
    }

.chat-action-button:active:not(:disabled) {
    transform: translateY(1px);
}

.chat-action-button:focus-visible {
    outline: 3px solid rgba(8, 102, 255, 0.16);
    outline-offset: 2px;
}

.chat-action-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

/*right messages*/
.chat-message-item.my-message .chat-message-row {
    margin-left: auto;
}

.chat-message-item.my-message .chat-message-content {
    align-items: flex-end;
}

.chat-message-item.my-message .chat-message-sender {
    margin: 0 10px 4px 0;
    text-align: right;
}

.chat-message-item.my-message .chat-message-time {
    margin: 4px 10px 0 0;
    text-align: right;
}

.chat-message-item.my-message .chat-message-bubble {
    border-radius: 18px 18px 5px 18px;
}

    .chat-message-item.my-message .chat-message-bubble::before {
        left: auto;
        right: -4px;
        background: var(--chat-primary-dark);
        clip-path: polygon(0 0, 100% 100%, 0 100%);
    }

    /*Ai Response*/

.chat-message-item.ai-message .chat-message-bubble {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 65%, #5b21b6 100%);
    box-shadow: 0 3px 9px rgba(109, 40, 217, 0.25), 0 1px 2px rgba(15, 23, 42, 0.08);
}

    .chat-message-item.ai-message .chat-message-bubble::before {
        background: #5b21b6;
    }

.chat-message-item.ai-message .chat-message-sender {
    color: #7c3aed;
    font-weight: 700;
}

/* =========================================================
   Responsive layout
   ========================================================= */

@media (max-width: 480px) {
    .chat-popup-container {
        right: 80px;
        bottom: 14px;
    }

    .chat-window {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 64px;
        width: auto;
        height: min(620px, calc(100dvh - 95px));
        border-radius: 16px;
    }

    .chat-header {
        padding: 12px 14px;
    }

    .chat-body {
        padding: 8px 6px;
    }

    .chat-footer {
        padding: 10px;
    }

    .chat-message-row {
        max-width: 94%;
    }

    .chat-action-button {
        padding: 0 6px;
    }
}


    