﻿/* Custom Offcanvas Styling */
.custom-offcanvas {
    width: 300px;
    background: #1e1e1e;
    color: #fff;
    z-index: 9999;
}

.custom-offcanvas .offcanvas-header {
    border-bottom: 1px solid #2c2c2c
}

.custom-offcanvas .offcanvas-title {
    font-weight: 600;
    color: #b1b1b1;
    font-size: 15px;
    line-height: 25px;
}

    .custom-offcanvas .nav-link {
        color: #ddd;
        padding: 5px 5px !important;
        border-radius: 0px;
        transition: 0.3s;
        font-size: 13px;
        line-height: 23px;
        border-bottom: .5px solid #343434;
    }

    .custom-offcanvas .nav-link:hover {
        background: #2a2a2a;
        color: #fff;
    }

.chat-popup .offcanvas.show {
    transform: translateX(0);
}

.chat-popup .offcanvas-body {
    padding: 0;
    max-height: 100vh;
    overflow-y: auto;
}

.offcanvas-body::-webkit-scrollbar {
    width: 2px;
}

.offcanvas-body::-webkit-scrollbar-track {
    border-radius: 5px;
    background-color: #51ad5b;
    border: 1px solid #ccc;
}

.offcanvas-body::-webkit-scrollbar-thumb {
    border-radius: 0px;
    background-color: #2a2a2a;
}

/* CHAT WIDGET */
.chat-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(87deg, #58915e, #459a4e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    z-index: 9999;
    transition: all .3s ease;
    animation: chatPulse 2s infinite;
}

    .chat-widget:hover {
        transform: scale(1.08);
        box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    }

    .chat-widget i {
        pointer-events: none;
    }

    .chat-widget .fa-comment {
        font-size: 22px;
    }

    @keyframes chatPulse {
        0% {
            box-shadow: 0 0 0 0 rgba(79,172,254,0.7);
        }

        70% {
            box-shadow: 0 0 0 12px rgba(79,172,254,0);
        }

        100% {
            box-shadow: 0 0 0 0 rgba(79,172,254,0);
        }
    }

.chat-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    background: #ff3b3b;
    border-radius: 50%;
    border: 2px solid white;
}

/* POPUP */
.chat-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f1115;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s ease;
    z-index: 9999;
}

    .chat-popup.active {
        opacity: 1;
        visibility: visible;
        transform: scale(1) translateY(0);
        background-color: rgba(0, 0, 0, 0.95);
    }

    /* CONTAINER */
    .chat-popup .chatblock {
        display: flex;
        flex-direction: column;
        height: 97vh;
        justify-content: center;
        align-items: center;
        border: 1px solid #1a1a1a;
        background-color: rgba(0, 0, 0, 0.2);
        margin: 15px 0;
    }

.chatbot-btns {
    position: absolute;
    right: 30px;
    top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* CLOSE BUTTON */
.close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e1e1e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    border: 1px solid #333;
    transition: 0.3s;
}

    .close-btn.options:hover, .close-btn.options:focus {
        background: #fff;
        border-color: #fff;
        color: #000;
    }

    .close-btn:hover, .close-btn:focus {
        background: #ff4d4d;
        border-color: #ff4d4d;
        color: #fff;
    }

.new-chat-btn {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #3d9241;
    border-color: #3d9241;
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    display: none;
}

    .new-chat-btn:hover {
        background: #253863;
    }

/* WELCOME */
.welcome-section {
    padding: 10px 20px 0px;
    border-bottom: 1px solid #1a1a1a;
    position:relative;
}

    .welcome-section h1 {
        font-weight: 600;
        color: #51ad5b;
    }

    .welcome-section p {
        color: #ffffff;
    }

/* CHAT BODY */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .chat-body::-webkit-scrollbar {
        display: none;
    }

/* MESSAGE */
.message {
    max-width: 500px;
    padding: 12px 18px;
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
}

    .message p {
        color: #fff;
    }

.message-wrapper .user {
    align-self: flex-end;
    background: #296d31;
    border-radius: 12px 12px 0 12px;
    text-align:left;
}

.message-wrapper.user {
    text-align: right;
}

.message-wrapper .bot {
    align-self: flex-start;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 12px 12px 12px 0px;
}

.message.bot {
    align-self: flex-start;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 12px 12px 12px 0px;
}

.bot .message-time {
    text-align: left;
    padding-left: 5px;
    padding-top: 5px;
    font-size: 11px;
    color: #9ca3af;
}

.user .message-time {
    text-align: right;
    padding-left: 5px;
    padding-top: 5px;
    font-size: 11px;
    color: #9ca3af;
}

/* INPUT */
.chat-input {
    border-top: 1px solid #2a2a2a;
    padding: 10px 20px;
    background: #111318;
}

.chat-box {
    background: #1e1e1e;
    border-radius: 40px;
    display: flex;
    align-items: center;
    padding: 6px 15px;
    transition: 0.3s;
}

    .chat-box:focus-within {
        box-shadow: 0 0 0 2px #4CAF50;
    }

    .chat-box input {
        flex: 1;
        background: transparent;
        border: none;
        outline: none;
        color: white;
        padding: 12px;
        font-size: 15px;
    }

        .chat-box input::placeholder {
            color: #888;
        }

/* SEND BUTTON */
.send-btn {
    background: linear-gradient(135deg, #4CAF50, #2e7d32);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

    .send-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.5);
    }

    .send-btn:active {
        transform: scale(0.95);
    }

/* PROVIDER CARD */
.provider-card {
    background: #fff;
    border: 1px solid #e6eaf0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: 0.2s;
    margin: 15px 0;
}

    .provider-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    }

.provider-card-top {
    display: flex;
    gap: 14px;
}

.provider-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    overflow: hidden;
    border: 2px solid #253863;
}

    .provider-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

.provider-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 600;
    color: #253863;
    background: #f3f4f6;
    border-radius: 50%;
}

.provider-info {
    flex: 1;
}

.provider-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1f36;
}

.provider-specialty {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 5px;
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 600;
}

.provider-rating {
    margin-top: 6px;
    font-weight: 600;
    color: #f59e0b;
    font-size: 13px;
}

    .provider-rating span {
        color: #6b7280;
        font-weight: 500;
    }

.provider-address {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* SUMMARY */
.provider-summary {
    margin-top: 14px;
    padding: 10px;
    background: #f6f8fd;
    border-radius: 6px;
}

.summary-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    color: #000;
}

.summary-rating {
    font-size: 12px;
    color: #374151;
}

/* SENTIMENT */
.sentiment-section {
    margin-top: 20px;
}

.sentiment-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #000;
}

.sentiment-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sentiment-label {
    width: 60px;
    font-size: 12px;
    color: #000;
}

.sentiment-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.sentiment-positive {
    height: 100%;
    background: #22c55e;
}

.sentiment-negative {
    height: 100%;
    background: #ef4444;
}

.sentiment-percent {
    font-size: 11px;
    color: #6b7280;
}

/* PLATFORM */
.platform-section {
    margin-top: 20px;
}

.platform-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000;
}

.platform-table {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.platform-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px 8px;
    font-size: 12px;
    border-bottom: 1px solid #f1f5f9;
}

    .platform-row:last-child {
        border-bottom: none;
    }

    .platform-row:hover {
        background: #f9fafb;
    }

.platform-left {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #374151;
}

.platform-rating {
    font-weight: 600;
    color: #f59e0b;
}

.platform-reviews {
    color: #6b7280;
    font-size: 11px;
}

/* BUTTONS */
.provider-buttons {
    display: flex;
    width: 100%;
    margin-top: 14px;
    gap: 10px;
}

    .provider-buttons a {
        flex: 1;
        text-align: center;
        padding: 10px;
        background: #253863;
        color: #fff !important;
        text-decoration: none;
        border-radius: 8px;
        font-weight: 600;
        font-size: 13px;
    }

        .provider-buttons a:hover {
            background: #51ad5b;
        }

.chat-popup p, .chat-popup ul li {
    font-size: 15px;
    line-height: 26px;
    color: #ffffff;
}

.chat-popup ol, .chat-popup ul {
    padding-left: 14px;
}

.dots span {
    animation: blink 1.4s infinite;
    font-weight: bold;
}

    .dots span:nth-child(2) {
        animation-delay: 0.2s;
    }

    .dots span:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes blink {
    0%, 20% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.end-session {
    position: absolute;
    right: 20px;
    top: 22px;
    font-size: 24px;
    cursor:pointer;
}

    .end-session .fa-stop {
        color: #ad3232;
    }


.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.feedback-box {
    width: 320px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.feedback-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.feedback-subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.rating {
    text-align: center;
    font-size: 22px;
    margin-bottom: 10px;
    cursor: pointer;
}

    .rating span {
        color: #ddd;
    }

        .rating span.active {
            color: #ffc107;
        }

textarea {
    width: 100%;
    height: 60px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 12px;
    resize: none;
}

.skip-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

.submit-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}

/*Feedback*/
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.feedback-box {
    width: 320px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.feedback-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.feedback-subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.rating {
    text-align: center;
    font-size: 22px;
    margin-bottom: 10px;
    cursor: pointer;
}

    .rating span {
        color: #ddd;
    }

        .rating span.active {
            color: #ffc107;
        }

textarea {
    width: 100%;
    height: 60px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 12px;
    resize: none;
}

.skip-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

.submit-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.feedback-box {
    width: 420px; 
    max-width: 90%;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.feedback-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feedback-subtitle {
    font-size: 14px;
    margin-bottom: 18px;
}

.rating {
    font-size: 26px;
    margin-bottom: 15px;
}

textarea {
    height: 80px;
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 10px;
}

.submit-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.skip-btn {
    color: #000000;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    background-color: #efefef;
}

.text-muted {
    font-size: 11px;
}

.completed-chat-section {
    background-color: #581b1b;
    color: #fff;
    padding: 10px;
}

.text-muted-active {
    color: #51ad5b;
}

.text-completed {
    color: #6c757d;
}

.text-bold {
    font-weight:600;
}


@media(max-width:767px) {
    .chatbot-btns {
        position: relative;
        justify-content: flex-end;
        top: 8px;
        right: 0px;
        gap: 10px;
    }

    .close-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .welcome-section {
        padding: 10px 10px 0px;
    }

    .welcome-section h1 {
        font-size: 20px;
    }

        .welcome-section p {
            font-size: 12px;
            margin: 0 0 1px;
        }

    .new-chat-btn {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 6px;
    }

    .chat-popup .chatblock {
        height:85vh;
    }

    .message,
    .message p {
        font-size: 13px;
        line-height: 23px;
    }

    .chat-body {
        padding: 15px;
    }

    .message {        
        padding: 6px 14px;
    }

    .chat-box {        
        padding: 2px 15px;
    }

    .send-btn {
        width: 35px;
        height: 35px;
    }
}

/*suggested questions section*/
.suggested-questions {
    margin-top: 12px;
    border-top: 1px solid #383838;
    padding: 10px 0px;
}

.suggested-questions-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
}

.suggested-question-btn {
    display: inline-block;
    margin: 4px 6px 4px 0;
    padding: 6px 12px;
    font-size: 13px;
    background: #ffffff;
    border: 1px solid #d0d7e2;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #374151;
}

.suggested-question-btn:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    transform: translateY(-1px);
}

.suggested-question-btn:active {
    transform: scale(0.96);
}
