﻿
.tr {
    box-shadow: 0px 2px 18px 0px rgba(0,0,0,0.5);
    display: block;
}

#risk-section .table-block {
    box-shadow: 0 0 10px #d2caca;
    border-top: 1px solid #ECF0F1 !important;
    border-right: 1px solid #ECF0F1 !important;
    border-left: 1px solid #ECF0F1 !important;
    border-bottom: 3px solid #E54D42;
    min-height: 255px;
}


.chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-width: 90%;
    height: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #fff;
    font-family: 'Open Sans', sans-serif;
    z-index: 1000;
    /* These lines handle the animation */
    opacity: 0;
    transform: scale(0);
    transform-origin: bottom right;
    pointer-events: none;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

    /* Shows the chat window with animation */
    .chat-container.show {
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
    }

/* Hides the robot launcher icon */
#robot-launcher.hide {
    opacity: 0;
    transform: scale(0);
}

/* New styles for positioning the header title and logo */
.header-title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Adjusts space between title and logo */
}

.chat-header-logo {
    /* Visual styles */
    height: 58px;
    width: 60px;
    border-radius: 50%;
    background-color: #ffffff;
    padding: 0px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    /* Positioning styles */
    position: absolute;
    top: 15px;
    left: 15px;
}

.chat-header {
    background-color: #0d6efd; /* Bootstrap Primary Blue */
    color: white;
    padding: 15px 50px;
    text-align: center;
}

    .chat-header h2 {
        margin: 0;
        font-size: 1.2rem;
        font-weight: 600;
    }

    .chat-header p {
        margin: 0;
        font-size: 0.8rem;
        opacity: 0.9;
    }

.chat-box {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.message {
    margin-bottom: 15px;
    line-height: 1.4;
    display: flex;
    font-size: 12px;
    flex-direction: column;
}

    .message p {
        margin: 0;
        padding: 10px 15px;
        display: inline-block;
        max-width: 85%;
        font-size: 12px;
        word-wrap: break-word;
    }

.bot-message {
    align-items: flex-start;
}

    .bot-message p {
        background-color: #e9e9eb;
        color: #333;
        font-size: 12px;
        border-radius: 18px 18px 18px 0;
    }

.user-message {
    align-items: flex-end;
}

    .user-message p {
        background-color: #0d6efd;
        color: white;
        border-radius: 18px 18px 0 18px;
    }

.input-container {
    display: flex;
    align-items: center;
    border-top: 1px solid #ccc;
    padding: 10px;
}

#user-input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 1rem;
}

    #user-input:focus {
        outline: none;
        border-color: #0d6efd;
    }

.input-container button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 10px;
    color: #555;
    font-size: 1.5rem;
}

    .input-container button:hover {
        color: #0d6efd;
    }
/* Style bot messages */
.bot-message p {
    margin: 6px 0;
    line-height: 1.5;
}

/* Style bullet lists inside bot messages */
.bot-message ul {
    margin: 6px 0 6px 15px; /* spacing + indent */
    padding: 0;
    list-style: none; /* remove default black dots */
}

    .bot-message ul li {
        margin: 6px 0;
        padding-left: 20px;
        position: relative;
        line-height: 1.5;
    }

        /* Add custom bullet (blue dot) */
        .bot-message ul li::before {
            content: "•";
            position: absolute;
            left: 0;
            color: #007bff; /* blue bullet */
            font-weight: bold;
        }
/* --- Robot Launcher Styles --- */
#robot-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    cursor: pointer;
    text-align: center;
}

.robot-icon {
    background-color: #0d6efd; /* Bootstrap Primary Blue */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    /* Animation */
    animation: bobbing 2s infinite ease-in-out;
}

    .robot-icon img {
        width: 172%;
        height: 168%;
        border-radius: 50%; /* This makes the image itself circular */
        object-fit: cover; /* This ensures the image covers the area without stretching */
    }

.speech-bubble {
    background-color: #f1f1f1;
    color: #333;
    padding: 8px 12px;
    border-radius: 15px;
    margin-bottom: 10px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    /* --- Styles for Hover Effect 
    opacity: 0;
    visibility: hidden;--- */
    transform: translateY(10px); /* Makes bubble slide up */
    transition: all 0.3s ease-in-out;
}

    /* Triangle for the speech bubble */
    .speech-bubble::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #f1f1f1 transparent transparent transparent;
    }

/* Bobbing animation for the robot */
@keyframes bobbing {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}


/* Show speech bubble on hover */
#robot-launcher:hover .speech-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}



/* Style the new close button */
#close-chat-btn {
    position: absolute;
    top: 5px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
}

    #close-chat-btn:hover {
        opacity: 1;
    }

/* Make chat header relative for button positioning */
.chat-header {
    position: relative;
}

.typing span.dots span {
    animation: blink 1.4s infinite both;
}

    .typing span.dots span:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing span.dots span:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes blink {
    0%, 80%, 100% {
        opacity: 0;
    }

    40% {
        opacity: 1;
    }
}

/* Bot message layout */
.bot-content {
    position: relative;
    display: inline-block;
    background: #f1f1f1;
    color: #000;
    padding: 10px 35px 10px 12px;
    border-radius: 15px;
    max-width: 85%;
    line-height: 1.4;
}

.speak-icon {
    position: absolute;
    right: 8px;
    top: 6px;
    background: none;
    border: none;
    font-size: 16px;
    color: #007bff;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .speak-icon:hover {
        transform: scale(1.2);
    }

.user-text, .bot-text {
    word-wrap: break-word;
}

/* Styles for the wrapper containing the bot avatar and message */
.bot-message-wrapper {
    display: flex;
    align-items: flex-start; /* Aligns avatar with the bottom of the message */
    gap: 10px; /* Creates space between the avatar and the message bubble */
}

/* Styles for the bot's avatar image */
.bot-avatar {
    height: 35px;
    width: 35px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Styles for the message timestamp */
.message-time {
    font-size: 0.75rem; /* 12px font size */
    color: #888;
    margin-top: 5px;
}

/* This existing rule ensures the timestamp is on the right for user messages */
.user-message {
    align-items: flex-end;
}

.speak-icon {
    position: absolute;
    right: 8px;
    top: 8px;
    background: none;
    border: none;
    color: #555; /* Set a base color for the icon */
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
    padding: 3px;
    line-height: 1;
    border-radius: 50%;
}

    .speak-icon:hover {
        transform: scale(1.2);
        color: #007bff; /* Color on hover */
        background-color: #f0f0f0;
    }

    /* Ensure the SVG inside the button is sized correctly */
    .speak-icon svg {
        width: 16px;
        height: 16px;
        display: block;
    }


/* --- NEW & IMPROVED CSS for Quote Form --- */

/* This is the main container for the form inside the bot message */
.quote-form-container .bot-text {
    width: 100%;
    /* Remove default paragraph margins */
    padding-top: 5px;
}

    /* Style for the introductory text */
    .quote-form-container .bot-text p {
        margin-bottom: 16px; /* Add space between intro text and form */
        font-size: 0.95em;
        line-height: 1.4;
    }

/* This is the container for one label + input field */
.quote-input-group {
    margin-bottom: 14px;
    position: relative;
}

    /* Style for the labels (Name, Email, etc.) */
    .quote-input-group label {
        display: block;
        font-size: 0.8em; /* Smaller text for the label */
        font-weight: 600;
        margin-bottom: 5px;
        color: #333;
    }

    /* Style for the text input fields */
    .quote-input-group input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #dcdcdc;
        border-radius: 8px; /* More rounded corners */
        box-sizing: border-box; /* Crucial for padding to work correctly */
        font-size: 0.9em;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

        /* Style for when the user clicks into an input field */
        .quote-input-group input:focus {
            outline: none;
            border-color: #007bff; /* Highlight with blue border */
            box-shadow: 0 0 0 2px rgba(0,123,255,0.2); /* Add a soft glow */
        }

/* Style for the 'Submit Request' button */
.quote-submit-btn {
    background-color: #007bff; /* Primary blue color */
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px; /* Match input fields */
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.2s;
}

    /* Hover effect for the button */
    .quote-submit-btn:hover {
        background-color: #0056b3; /* Darker blue on hover */
    }

    /* Style for the button when it's disabled (after submitting) */
    .quote-submit-btn:disabled {
        background-color: #a0a0a0; /* Grey out when disabled */
        cursor: not-allowed;
    }

        .quote-submit-btn:disabled:hover {
            background-color: #a0a0a0; /* No color change on hover when disabled */
        }

/* Style for the error message div */
.quote-error {
    color: #D8000C; /* Strong red for errors */
    background-color: #FFD2D2; /* Light red background */
    border: 1px solid #D8000C;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9em;
    margin-bottom: 12px;
    font-weight: 600;
}