﻿/* Ensure chat filmstrip matches container width */
.react-film__main {
    width: 23rem !important;
}

#botIconWrapper {
    position: fixed;
    bottom: 66px;
    right: 58px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#botLabel {
    position: relative;
    display: inline-block;
    background: #123052;
    color: #fff;
    padding: 10px 18px;
    border-radius: 18px;
    margin-bottom: 10px;
    font-size: 15px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.13);
    opacity: 0.97;
    cursor: pointer; 
    max-width: 220px;
    text-align: left;
    white-space: pre-line;
    line-height: 1.3;
}

.bot-label-hidden .bot-label { 
    display: none !important; 
}

.bot-label[aria-hidden="true"] { 
    display: none !important; 
}

#botLabel::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 0px;
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 28px solid #123052;
    border-radius: 0 0 12px 12px;
    z-index: 1;
    box-shadow: 0 4px 12px 0 rgba(18,48,82,0.13);
    transform: rotate(-45deg);
    transform-origin: top center;
}

/* Inverted background and text color for bot-label on footer (like botIcon) */

#botLabel.white-bg,
.bot-label.white-bg {
    background: #fff !important;
    color: #123052 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
}
#botLabel.white-bg::after,
.bot-label.white-bg::after {
    border-top: 28px solid #fff !important;
    box-shadow: 0 4px 12px 0 rgba(18,48,82,0.13);
}

#closeBotLabel {
    position: absolute;
    top: 4px;
    right: 9px; 
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #fff;
    z-index: 2;
    padding: 0;
    line-height: 1;
}

#botLabel.white-bg #closeBotLabel,
#botLabel.white-bg + #closeBotLabel,
#botIcon.white-bg ~ #closeBotLabel {
    color: #123052 !important;
}


#botIcon {
    position: static;
}

/* Hide label when bot icon is hidden */
#botIcon[style*="display: none"] ~ .bot-label,
#botIcon[style*="display: none"] + .bot-label {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Show label only when bot icon is visible */
#botIconWrapper .bot-label {
    display: block;
}
#botIcon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 1001;
    background-color: #123052;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: background-color 0.3s ease;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-transition: transform 0.3s ease;
    transition: transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

    #botIcon img {
        width: 30px;
        height: 30px;
        transition: transform 0.3s ease, opacity 0.2s ease;
    }

    #botIcon:hover {
        transform: scale(1.1);
    }

        #botIcon:hover img {
            transform: scale(1);
        }

/* White background for bot icon when over footer */
#botIcon.white-bg {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#chatContainer {
    position: fixed;
    z-index: 1002;
    bottom: 10px;
    right: 20px;
    width: 23rem;
    height: 80%;
    max-height: 700px;
    min-height: 300px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 16px;
    -webkit-border-radius: 16px;
    -webkit-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Media Queries for Responsive Design */
@media screen and (max-width: 768px) {
    #chatContainer {
        width: 90%;
        height: 70vh;
        right: 5%;
        left: 5%;
        bottom: 70px;
        max-height: none;
        margin: 0 auto;
    }

    #chatContainer.right {
        right: 5%;
        left: auto;
    }

    #chatContainer.left {
        left: 5%;
        right: auto;
    }

    #botIcon {
        bottom: 15px !important;
        right: 15px !important;
        left: auto !important;
        width: 45px;
        height: 45px;
        position: fixed !important;
        transform: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #botIcon.white-bg {
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }
}

@media screen and (max-width: 480px) {
    #chatContainer {
        width: 100%;
        height: 100vh; /* full viewport height on mobile */
        right: 0;
        left: 0;
        bottom: 0;
        top: 0; /* ensure full coverage */
        border-radius: 0;
        -webkit-border-radius: 0;
        margin: 0;
    }

    #botIconWrapper {
        position: fixed;
        bottom: 42px !important;
        right: 42px !important;
        z-index: 1001;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #chatContent .webchat__send-box {
        height: 180px !important
    }

    #chatContainer.right {
        right: 0;
        left: 0;
    }

    #chatContainer.left {
        left: 0;
        right: 0;
    }

    #botIcon {
        bottom: 10px !important;
        right: 10px !important;
        left: auto !important;
        width: 40px;
        height: 40px;
        position: fixed !important;
        transform: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #botIcon.white-bg {
        box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    }

    .chat-header {
        border-radius: 0 !important;
        -webkit-border-radius: 0 !important;
    }
    /* Make header fixed and content scrollable on full-screen mobile */
    .chat-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 2;
        height: 56px;
    }

    #chatContent {
        position: absolute;
        top: 56px;
        bottom: 0;
        left: 0;
        right: 0;
        height: auto;
        overflow-y: auto;
    }
    /* MOBILE: stabilize send box and keep suggested actions from pushing layout */
    /* Keep send box stable: don't allow flex children to collapse; keep reasonable min-height */
    #chatContent .webchat__send-box-container {
        -webkit-box-flex: 0;
        -ms-flex: 0 0 auto !important;
        flex: 0 0 auto !important;
        min-height: 65px !important; /* matches desktop send box sizing */
        padding: 10px 12px !important;
        box-sizing: border-box;
        background: #fff !important;
    }

    /* Suggested actions: cap height and allow scrolling; prefer wrapping when possible */
    #chatContent .webchat__suggested-actions,
    #chatContent .webchat__basic-transcript .webchat__suggested-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        max-height: 120px !important; /* prevents pushing the send box */
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 6px 6px 0 6px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Make suggestion buttons compact and allow multi-column layout */
    #chatContent .webchat__suggested-action,
    #chatContent .webchat__suggested-actions__button,
    #chatContent .webchat__suggested-actions__button-text,
    #chatContent .webchat__suggested-action__text {
        /*flex: 0 0 auto !important;
        white-space: normal !important;
        max-width: calc(50% - 8px) !important; /* two per row */
        /*box-sizing: border-box !important;
        word-break: break-word !important;*/
    }

    /* Ensure the transcript area can scroll independently of suggestions/sendbox */
    #chatContent .webchat__basic-transcript {
        overflow-y: auto !important;
        max-height: calc(100vh - 56px - 120px) !important; /* header + suggested-actions approx */
    }
    /* mobile input uses default WebChat sizing */
}

.chat-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 12px 16px;
    background-color: #123052;
    border-bottom: 1px solid #123052;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    height: 55px;
    min-height: 55px;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    -webkit-border-top-left-radius: 16px;
    -webkit-border-top-right-radius: 16px;
}


.webchat__send-box-container {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}


#chatContent {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    height: calc(100% - 100px);
    -webkit-overflow-scrolling: touch;
}

    /* WebChat container styles */
    #chatContent > div {
        -webkit-box-flex: 1;
        -ms-flex: 1;
        flex: 1;
        display: -webkit-box !important;
        display: -ms-flexbox !important;
        display: flex !important;
        -webkit-box-orient: vertical !important;
        -webkit-box-direction: normal !important;
        -ms-flex-direction: column !important;
        flex-direction: column !important;
    }

    /* Transcript styles */
    #chatContent .webchat__basic-transcript {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        min-height: 0 !important;
        max-height: calc(100vh - 150px) !important;
    }

    /* Main webchat container */
    #chatContent .webchat__styled-container {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
    }

    /* Stack container */
    #chatContent .webchat__stacked-layout {
        display: -webkit-box !important;
        display: -ms-flexbox !important;
        display: flex !important;
        -webkit-box-orient: vertical !important;
        -webkit-box-direction: normal !important;
        -ms-flex-direction: column !important;
        flex-direction: column !important;
        height: 100% !important;
    }

    /* Send box container styles */
    #chatContent .webchat__send-box-container {
        -webkit-box-flex: 0;
        -ms-flex: 0 0 auto !important;
        flex: 0 0 auto !important;
        min-height: 65px !important;
        padding: 12px 16px !important;
        background: #fff !important;
        border-top: 1px solid #e9ecef !important;
        margin-top: auto !important;
        position: relative !important;
        bottom: 0 !important;
        width: 100% !important;
    }

    /* Input box styles */
    #chatContent .webchat__send-box {
        display: -webkit-box !important;
        display: -ms-flexbox !important;
        display: block !important;
        -webkit-box-align: center !important;
        -ms-flex-align: center !important;
        align-items: center !important;
        -webkit-box-pack: start !important;
        -ms-flex-pack: start !important;
        justify-content: flex-start !important;
        background: #fff !important;
        width: 100% !important;
        padding: 8px !important;
        position: relative !important;
        /* height: 180px !important */
    }

    /* Style the input text area */
    #chatContent .webchat__send-box-text-box__text-area {
        width: 100% !important;
        min-height: 24px !important;
        padding: 8px 40px 8px 12px !important;
        resize: none !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin: 0 !important;
    }


    /* Style the send button container */
    #chatContent .webchat__send-box-buttons {
        position: absolute !important;
        right: 16px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        display: -webkit-box !important;
        display: -ms-flexbox !important;
        display: flex !important;
        -webkit-box-align: center !important;
        -ms-flex-align: center !important;
        align-items: center !important;
    }

.chat-header-left {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 8px;
    width: 33% !important;
}


/* iPad/Tablet Specific Styles */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    #chatContainer {
        width: 350px;
        height: 42vh;
        right: 20px;
        bottom: 20px;
    }

    #botIconWrapper {
        position: fixed;
        bottom: 54px;
        right: 42px;
        z-index: 1001;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #chatContainer.right {
        /* right: 20px; */
        left: auto;
    }

    #chatContainer.left {
        /* left: 20px; */
        right: auto;
    }

    #botIcon {
        bottom: 15px;
        right: 15px;
        left: auto;
    }

    .chat-header {
        height: 50px;
        min-height: 50px;
    }

    #chatContent {
        height: calc(100% - 110px);
    }
}

/* Landscape Mode Handling */
@media screen and (max-height: 500px) and (orientation: landscape) {
    #chatContainer {
        height: 95vh;
        bottom: 10px;
    }

    #chatContainer.right {
        /* right: 5%; */
        left: auto;
    }

    #chatContainer.left {
        /* left: 5%; */
        right: auto;
    }

    #botIcon {
        bottom: 10px;
        right: 10px;
        left: auto;
    }
}

.chat-header-info {
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertically center title+id within header */
    align-items: flex-start;  /* keep title and id left aligned */
    min-width: 0; /* allow truncation of title when container is narrow */
}

.chat-status {
    color: #4CAF50;
    font-size: 12px;
    line-height: 1;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
}

.chat-header-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.chat-header-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px; /* prevent long site titles from pushing header controls */
}

/* Inline title with Chat ID */
.chat-header-info {
    display: flex;
    flex-direction: column;
}

.chat-id {
    font-size: 10px;
    color: rgba(255,255,255,0.85);
    font-weight: 400;
    margin-top: 2px;
    line-height: 1;
}

.chat-id-row {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.chat-id-copy {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    padding: 0 2px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .chat-id-copy:focus {
        outline: 2px solid rgba(255,255,255,0.2);
        outline-offset: 2px;
    }

    .chat-id-copy .fa-copy {
        font-size: 8px;
    }

    .chat-id-copy.copied {
        color: #4CAF50;
    }
/* Tweak header left spacing for better alignment */
.chat-header-left {
    gap: 12px;
}
/* Ensure header icon doesn't shrink and remains visually aligned */
.chat-header-icon {
    flex: 0 0 auto;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 4px; /* space between switch and minimize */
}

.chat-header-minimize {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s;
}

    .chat-header-minimize:hover {
        color: #343a40;
    }

/* WebChat specific overrides */ 
/*#chatContent > * {
    height: 100%;
    width: 100%;
}*/

/* switch side button*/
.icon-switch::before {
    content: '\21C4'; /* ⇄ */
    color: #6c757d;
    margin-left: 8px; /* reduce large gap */
    margin-right: -140px;
    font-size: 20px; /* slightly smaller */
    line-height: 1;
}

.switch {
    background: none;
    border: none;
    cursor: pointer;
}

.switch:hover {
    color: #343a40;
}

.switch:focus,
.switch:active {
    outline: none;
    text-decoration: none;
    color: #343a40;
}

#chatContainer.right {
    left: auto;
}

#chatContainer.left {
    right: auto;
}

/* Ensure bot icon stays right-aligned on desktop */
@media screen and (min-width: 1025px) {
    #botIcon {
        right: 20px;
        left: auto;
    }
}

/* Extra specific rule for mobile devices to prevent left shifting */
@media screen and (max-width: 768px) and (max-device-width: 768px) {
    #botIcon {
        position: fixed !important;
        right: 15px !important;
        left: unset !important;
        margin: 0 !important;
        transform: none !important;
        -webkit-transform: none !important;
    }
}

/* Ultra specific for very small mobile screens */
@media screen and (max-width: 480px) and (max-device-width: 480px) {
    #botIcon {
        position: fixed !important;
        right: 10px !important;
        left: unset !important;
        bottom: 10px !important;
        margin: 0 !important;
        transform: none !important;
        -webkit-transform: none !important;
    }
}

/* General chat content styles */
.chat-content,
.chat-content * {
    font-size: 0.75rem !important;
    font-family: "Inter", sans-serif !important;
    line-height: 1.4 !important;
}

/* Chat message layout: single grey border, background, and alignment */
.webchat__basic-transcript__activity {
    background: #f8f9fa !important;
    border: 1px #dee2e6 !important;
    border-radius: 26px !important;
    margin: 5px 5px !important;
    width: auto !important;
    max-width: 95% !important;
    transition: background 0.2s;
}
/* User messages align to the right */
.webchat__stacked-layout--from-user {
    align-items: flex-end !important;
    align-self: flex-end !important;
}

/* Remove all inner/extra borders from bubbles and adaptive cards */
.webchat__bubble,
.webchat__bubble--nub-on-top,
.webchat__bubble__content,
.webchat__stacked-layout__attachment,
.webchat__stacked-layout__message,
.webchat__adaptive-card-renderer .ac-adaptiveCard {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove border for the first adaptive card (button card) */
.webchat__stacked-layout__attachment-row--first .ac-adaptiveCard {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Adaptive Card Button Styles */
.ac-pushButton,
.ac-pushButton.style-default,
.ac-pushButton.ac-selectable,
.ac-pushButton.style-default.ac-selectable {
    font-weight: inherit;
    background: #123052 !important;
    color: white !important;
    border: none !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    padding: 6px 0 !important;
    margin: 0px 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    width: 88% !important;
    max-width: 100%;
    text-align: left !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: none !important;
    display: flex !important;
    justify-content: flex-start !important;
    padding-left: 14px !important;
}

    /* Keep button color and font the same on hover, focus, and after select */
    .ac-pushButton:hover,
    .ac-pushButton:focus,
    .ac-pushButton:active,
    .ac-pushButton[aria-pressed="true"] {
        background: #123052 !important;
        color: white !important;
    }

/* Remove extra spacing between buttons */
.ac-actionSet {
    gap: 0px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    border: none !important;
    background: transparent !important;
}

.webchat__bubble--from-user {
    color: #123052 !important;
    background: #e6f7ff;
    align-self: flex-end;
    font-size: 14px;
}

    .webchat__bubble--from-user .webchat__bubble__content,
    .webchat__bubble--from-user .webchat__text-content {
        color: #123052 !important;
        text-align: right;
        font-size: 12px !important;
    }

.webchat__activity-status--self,
.webchat__activity-status--slotted.webchat__activity-status--self {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

    .webchat__activity-status--self > span[aria-hidden="true"] {
        border: none !important;
        background: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

/* Remove border for all ac-pushButton (already present, but for clarity) */
.ac-pushButton,
.ac-pushButton.style-default,
.ac-pushButton.ac-selectable {
    border: none !important;
}

.webchat__suggested-action {
    border-color: #123052 !important;
    background-color: #123052 !important;
    color: white !important;
    border-radius: 20px !important;
    height: 30px !important;
}

.masked-sensitive {
/*    font-family: 'Segoe UI', Arial, sans-serif;*/
    letter-spacing: 1px;
}

.ac-columnSet {
    margin: 10px !important;
}

span[aria-hidden="true"] {
    font-size: 10px !important;
}

.webchat__auto-resize-textarea__textarea{
    font-size: 0.75rem !important;
}

/*.ac-image:not(:has(div#eyeBtnShow, div#eyeBtnHide)) {
    width: 24px !important;
}*/

/* --- 4K+ OR very tall screens --- */
@media screen and (min-width: 3200px), screen and (min-height: 1800px) {
    #chatContainer {
        width: 750px;
        height: 72vh;
        right: 28px;
        bottom: 28px;
    }

    .chat-header {
        height: 64px;
        min-height: 64px;
    }

    #chatContent .webchat__send-box-container {
        min-height: 72px !important;
        padding: 16px 20px !important;
    }

    #chatContent .webchat__send-box-buttons {
        right: 20px !important;
    }

    /* Slightly larger, crisp launcher on huge screens */
    #botIcon {
        width: 64px;
        height: 64px;
        bottom: 28px;
        right: 28px;
    }
}

/* Style the first, top-level TextBlock that is a heading */
.ac-adaptiveCard > .ac-textBlock[role="heading"]:first-of-type,
.ac-adaptiveCard > .ac-container:first-of-type > .ac-textBlock[role="heading"]:first-of-type {
    color: #123052 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 10px 0px !important;
/*    margin: 0 0 10px 0 !important;*/
    border-radius: 6px !important;
/*    border-left: 4px solid #123052 !important;
    border-right: 4px solid #123052 !important;*/
}

.ac-container {
    padding: 5px !important;
    background-color: inherit !important;
}

/* feedbackCard rating number buttons */
#actionSet1 .ac-actionSet .ac-pushButton.style-default.ac-selectable,
#actionSet1 .ac-actionSet .ac-pushButton,
#actionSet2 .ac-actionSet .ac-pushButton.style-default.ac-selectable,
#actionSet2 .ac-actionSet .ac-pushButton,
#actionSet3 .ac-actionSet .ac-pushButton.style-default.ac-selectable,
#actionSet3 .ac-actionSet .ac-pushButton,
#actionSet4 .ac-actionSet .ac-pushButton.style-default.ac-selectable,
#actionSet4 .ac-actionSet .ac-pushButton,
#actionSet5 .ac-actionSet .ac-pushButton.style-default.ac-selectable,
#actionSet5 .ac-actionSet .ac-pushButton {
    font-weight: inherit;
    background: #123052 !important;
    color: white !important;
    border: none !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    padding: 6px 0 !important;
    margin: 0px 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    width: 100% !important;
    max-width: 100%;
    text-align: left !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: none !important;
    display: flex !important;
    justify-content: flex-start !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}


/* 2) Two-state color scheme (pre-click, hover, pressed) */
#actionSet1, #actionSet2, #actionSet3, #actionSet4, #actionSet5 {
  --ac-btn-pre: #e7eff7;       /* unselected default */
  --ac-btn-pre-hover: #d9e6f2; /* unselected hover/focus */
  --ac-btn-pressed: #123052;   /* pressed/selected */
}

/* Base (unselected) appearance */
#actionSet1 .ac-actionSet .ac-pushButton,
#actionSet1 .ac-actionSet .ac-pushButton.style-default.ac-selectable,
#actionSet2 .ac-actionSet .ac-pushButton,
#actionSet2 .ac-actionSet .ac-pushButton.style-default.ac-selectable,
#actionSet3 .ac-actionSet .ac-pushButton,
#actionSet3 .ac-actionSet .ac-pushButton.style-default.ac-selectable,
#actionSet4 .ac-actionSet .ac-pushButton,
#actionSet4 .ac-actionSet .ac-pushButton.style-default.ac-selectable,
#actionSet5 .ac-actionSet .ac-pushButton,
#actionSet5 .ac-actionSet .ac-pushButton.style-default.ac-selectable {
  background: var(--ac-btn-pre) !important;
  color: #123052 !important;
}

/* Hover/Focus while unselected */
#actionSet1 .ac-actionSet .ac-pushButton:not([aria-pressed="true"]):hover,
#actionSet1 .ac-actionSet .ac-pushButton:not([aria-pressed="true"]):focus,
#actionSet2 .ac-actionSet .ac-pushButton:not([aria-pressed="true"]):hover,
#actionSet2 .ac-actionSet .ac-pushButton:not([aria-pressed="true"]):focus,
#actionSet3 .ac-actionSet .ac-pushButton:not([aria-pressed="true"]):hover,
#actionSet3 .ac-actionSet .ac-pushButton:not([aria-pressed="true"]):focus,
#actionSet4 .ac-actionSet .ac-pushButton:not([aria-pressed="true"]):hover,
#actionSet4 .ac-actionSet .ac-pushButton:not([aria-pressed="true"]):focus,
#actionSet5 .ac-actionSet .ac-pushButton:not([aria-pressed="true"]):hover,
#actionSet5 .ac-actionSet .ac-pushButton:not([aria-pressed="true"]):focus {
  background: var(--ac-btn-pre-hover) !important;
  color: #123052 !important;
}

/* 3) Persisted selected state – works with aria-pressed OR data-selected */
#actionSet1 .ac-actionSet .ac-pushButton[aria-pressed="true"],
#actionSet1 .ac-actionSet .ac-pushButton[data-selected="true"],
#actionSet2 .ac-actionSet .ac-pushButton[aria-pressed="true"],
#actionSet2 .ac-actionSet .ac-pushButton[data-selected="true"],
#actionSet3 .ac-actionSet .ac-pushButton[aria-pressed="true"],
#actionSet3 .ac-actionSet .ac-pushButton[data-selected="true"],
#actionSet4 .ac-actionSet .ac-pushButton[aria-pressed="true"],
#actionSet4 .ac-actionSet .ac-pushButton[data-selected="true"],
#actionSet5 .ac-actionSet .ac-pushButton[aria-pressed="true"],
#actionSet5 .ac-actionSet .ac-pushButton[data-selected="true"] {
  background: var(--ac-btn-pressed) !important; /* #123052 */
  color: #ffffff !important;
}

/* Keep look when hovered/focused while selected */
#actionSet1 .ac-actionSet .ac-pushButton[aria-pressed="true"]:hover,
#actionSet1 .ac-actionSet .ac-pushButton[aria-pressed="true"]:focus,
#actionSet1 .ac-actionSet .ac-pushButton[data-selected="true"]:hover,
#actionSet1 .ac-actionSet .ac-pushButton[data-selected="true"]:focus,
#actionSet2 .ac-actionSet .ac-pushButton[aria-pressed="true"]:hover,
#actionSet2 .ac-actionSet .ac-pushButton[aria-pressed="true"]:focus,
#actionSet2 .ac-actionSet .ac-pushButton[data-selected="true"]:hover,
#actionSet2 .ac-actionSet .ac-pushButton[data-selected="true"]:focus,
#actionSet3 .ac-actionSet .ac-pushButton[aria-pressed="true"]:hover,
#actionSet3 .ac-actionSet .ac-pushButton[aria-pressed="true"]:focus,
#actionSet3 .ac-actionSet .ac-pushButton[data-selected="true"]:hover,
#actionSet3 .ac-actionSet .ac-pushButton[data-selected="true"]:focus,
#actionSet4 .ac-actionSet .ac-pushButton[aria-pressed="true"]:hover,
#actionSet4 .ac-actionSet .ac-pushButton[aria-pressed="true"]:focus,
#actionSet4 .ac-actionSet .ac-pushButton[data-selected="true"]:hover,
#actionSet4 .ac-actionSet .ac-pushButton[data-selected="true"]:focus,
#actionSet5 .ac-actionSet .ac-pushButton[aria-pressed="true"]:hover,
#actionSet5 .ac-actionSet .ac-pushButton[aria-pressed="true"]:focus,
#actionSet5 .ac-actionSet .ac-pushButton[data-selected="true"]:hover,
#actionSet5 .ac-actionSet .ac-pushButton[data-selected="true"]:focus {
  background: var(--ac-btn-pressed) !important;
  color: #ffffff !important;
}

/* feedbackCard end chat button */
#endChatActionSet .ac-actionSet .ac-pushButton,
#endChatActionSet .ac-actionSet .ac-pushButton.style-default.ac-selectable {
  width: 100% !important;   
  max-width: 100% !important;
  text-align: left !important;
  justify-content: flex-start !important;
  background: #123052 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 20px !important;
  font-size: 14px !important;
  padding: 6px 16px !important;       
  display: flex !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer;
  transition: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


#endChatActionSet .ac-actionSet .ac-pushButton > div {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;     
  flex: 0 0 auto !important;           
  min-width: max-content !important;  
}

#endChatActionSet .ac-actionSet {
  align-items: stretch !important;   
  gap: 0 !important;
  background: transparent !important;
  border: none !important;
}


/* AI generated response line in AI response card */
.chat-content .ac-textBlock#AIGeneratedNote,
.chat-content .ac-textBlock#AIGeneratedNote * { font-size: 8px !important; }


/* AI context in AI response card */
.chat-content #azureAIContext,
.chat-content #azureAIContext * {
  font-size: 12px !important;        
/*  line-height: 1.5 !important;     */
}

/* Justify body text and allow bullets to show (no clipping) */
.chat-content #azureAIContext {
  text-align: justify !important;
  overflow: visible !important;     
}

/* Paragraph spacing */
.chat-content #azureAIContext .webchat__render-markdown p {
  margin: 0 0 10px !important;      
  text-align: justify !important;
}
.chat-content #azureAIContext .webchat__render-markdown p:last-child {
  margin-bottom: 0 !important;
}

/* Subheadings: a <p> that contains a direct <strong> */
.chat-content #azureAIContext .webchat__render-markdown p:has(> strong) {
  margin-top: 12px !important;      
  margin-bottom: 0 !important;      
  text-align: left !important;      
  /*font-weight: 600 !important; */
  /* color: #123052 !important; */  /* optional brand color */
}

/* If a list follows a subheading, remove its top margin */
.chat-content #azureAIContext .webchat__render-markdown p:has(> strong) + ul,
.chat-content #azureAIContext .webchat__render-markdown p:has(> strong) + ol {
  margin-top: 0 !important;
}

/* Avoid gap if subheading is the first node */
.chat-content #azureAIContext .webchat__render-markdown p:has(> strong):first-child {
  margin-top: 0 !important;
}

/* Always add a line break BEFORE the final <p> (follow-up question) */
.chat-content #azureAIContext .webchat__render-markdown p:last-of-type:not(:first-of-type) {
  margin-top: 12px !important;
}
.chat-content #azureAIContext .webchat__render-markdown p:last-of-type {
  margin-bottom: 0 !important;
}

/* Lists: make sure bullets/numbers render and indent correctly */
.chat-content #azureAIContext,
.chat-content #azureAIContext .webchat__render-markdown { 
  overflow: visible !important;      
}

.chat-content #azureAIContext ul,
.chat-content #azureAIContext ol {
  list-style: revert !important;    
  list-style-position: outside !important;
  list-style-image: none !important; 
  padding-left: 1.25rem !important;
  margin: 0 0 10px !important;
}

.chat-content #azureAIContext li {
  display: list-item !important;     
  list-style: inherit !important;   
}

.chat-content #azureAIContext li::marker {
  content: initial !important;      
  color: currentColor !important;   
  font-size: inherit !important;
}

/* Better justification on narrow screens (optional) */
@supports (hyphens: auto) {
  .chat-content #azureAIContext .webchat__render-markdown p {
    hyphens: auto;
    overflow-wrap: anywhere;
  }
}


/* Title in AI response card */
.chat-content #Title,
.chat-content #Title * {
    color: #123052 !important;
    padding-top: 5px !important;
}

#chatContainer ol,
#chatContainer ul {
    list-style: auto !important;
}

.chatId {
    margin-top: -15px !important; 
    font-weight: 400 !important;
}
