/* Main chatbot container */
.chatbot-help {
    position: absolute;
    top: 0px;
    right: 0;
    z-index: 5000;
    display: none;
    width: 30%;
    height: calc(100% - 10px); /* Match the application div height minus padding */
    text-align: center;
    background-image: linear-gradient(to right, #EEEEEE, #FAFAFA 20%, #FAFAFA 80%, #EEEEEE);
    border-left: solid 1px #7ea0ba;
    box-shadow: 3px 0 5px 1px #CCCCCC;
    overflow: hidden; /* Prevent scrollbars */
}

.chatbot-help:focus,
.chatbot-help-container:focus {
    outline: none;
}

.chatbot-help.active {
    z-index: 5001; /* Higher than the default 5000 */
}

/* Inner container for chatbot content */
.chatbot-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.chatbot-help-container {
    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/* Tab navigation */
.chatbot-tabs {
    position: relative;
    z-index: 10;
    padding: 10px 10px 0 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.chatbot-nav-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 0;
    border-bottom: 1px solid #dee2e6;
}

.chatbot-nav-item {
    margin-bottom: -1px;
}

.chatbot-nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    background-color: transparent;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    cursor: pointer;
}

.chatbot-nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
}

.chatbot-nav-link.active {
    color: #004E8B;
    background-color: #FFFFFF;
    border-color: #dee2e6 #dee2e6 #FFFFFF;
}

/* Tab content */
.chatbot-tab-content {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.chatbot-tab-pane {
    position: relative;
    display: none;
    flex: 1;
}

.chatbot-tab-pane.active {
    display: flex;
}

/* Iframe */
.chatbot-iframe {
    width: 100%;
    height: 100%;
    flex: 1;
    border: none;
}

/* Close button */
div.chatbot-close {
    position: static;
    background-position: 2px -557px;
}

.chatbot-close-container {
    position: absolute;
    top: 2px;
    right: 28px;
    z-index: 5002; /* Above active panels */
    display: none;
    width: 30%;
}

.chatbot-close-container:hover {
    cursor: pointer;
}

.chatbot-close-container.active {
    z-index: 5002; /* Higher than the active panel */
}

/* Intelligence link and response styling */
.pcr-intelligence-link {
    color: #004E8B;
    text-decoration: none;
}

.pcr-intelligence-link:hover {
    text-decoration: underline;
}

.chatbot-response {
    padding: 10px;
    margin-bottom: 10px;
    text-align: left;
    line-height: 1.5;
    background-color: #f9f9f9;
    border-radius: 5px;
}

/* Action buttons */
.chatbot-action-button {
    margin-top: 15px;
    text-align: center;
}

.start-chat-button {
    display: inline-block;
    padding: 8px 16px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    background-color: #004E8B;
    border-radius: 4px;
}

.start-chat-button:hover {
    background-color: #003d6f;
}

/* Unlicensed message styling */
.chatbot-unlicensed-message {
    padding: 20px;
    text-align: center;
    font-size: 16px;
    color: #555555;
}

.chatbot-unlicensed-message h3 {
    margin-bottom: 15px;
    color: #004E8B;
}

.intelligence-container {
    width: calc(100% - 10px);
    margin-top: 2em;
    margin-bottom: 0;
    text-align: center;
}
.intelligence-container h1 {
    margin-bottom: 20px;
    color: #004E8B;
}
.intelligence-container p {
    margin-bottom: 20px;
    line-height: 1.5;
}
.intelligence-container .contact-button {
    display: inline-block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    background-color: #004E8B;
    border-radius: 4px;
}
.intelligence-container .contact-button:hover {
    background-color: #003d6f;
}

.chatbot-unlicensed-message p {
    margin-bottom: 20px;
}

.chatbot-unlicensed-message .contact-button {
    display: inline-block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    background-color: #004E8B;
    border-radius: 4px;
}

/* AI Chatbot Footer Icon */
#ai-chatbot-footer-icon {
    position: absolute;
    bottom: 6px;
    right: 5px;
    z-index: 1100;
    width: 64px;
    height: 64px;
    cursor: pointer;
    transition: width 0.2s cubic-bezier(.4,2,.6,1), height 0.2s cubic-bezier(.4,2,.6,1);
}

/* Use more specific selector to avoid conflicts without !important */
div#ai-chatbot-footer-icon.ai-expanded,
#ai-chatbot-footer-icon.ai-expanded {
    z-index: 5100;
    width: 128px;
    height: 128px;
}
