/* chatbot.css - Index-only modern counselor chat widget */

.gnps-chat-widget {
    position: fixed;
    right: 9px;
    bottom: 10px;
    z-index: 102;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

.gnps-chat-widget.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.gnps-chat-launcher {
    width: 50px;
    height: 50px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 14px 24px rgba(16, 45, 77, 0.34);
    overflow: hidden;
    background: #ffffff;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.gnps-chat-widget.is-open .gnps-chat-launcher {
    opacity: 0;
    transform: scale(0.84);
    pointer-events: none;
}

.gnps-chat-launcher img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gnps-chat-panel {
    position: absolute;
    right: 0;
    bottom: 8px;
    width: min(302px, calc(100vw - 16px));
    height: clamp(380px, 58vh, 450px);
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    border-radius: 16px;
    border: 1px solid rgba(124, 157, 201, 0.42);
    background: #f7f9fd;
    box-shadow: 0 24px 40px rgba(10, 31, 53, 0.27);
    overflow: hidden;
    transform-origin: bottom right;
    opacity: 0;
    transform: translateY(14px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.gnps-chat-widget.is-open .gnps-chat-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.gnps-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px 9px;
    background: linear-gradient(135deg, #e100cf 0%, #8c00ff 52%, #5a2adf 100%);
}

.gnps-chat-agent {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.gnps-chat-agent img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.gnps-chat-agent-meta h3 {
    margin: 0;
    color: #ffffff;
    font-size: 0.86rem;
    line-height: 1.2;
}

.gnps-chat-agent-meta p {
    margin: 2px 0 0;
    color: rgba(242, 236, 255, 0.96);
    font-size: 0.66rem;
    line-height: 1.2;
}

.gnps-chat-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.gnps-chat-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.gnps-chat-messages {
    padding: 7px;
    overflow-y: auto;
    background: #f2f5fb;
    display: grid;
    gap: 8px;
    align-content: start;
    scroll-behavior: smooth;
}

.gnps-chat-messages::-webkit-scrollbar {
    width: 7px;
}

.gnps-chat-messages::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(70, 105, 150, 0.48);
}

.gnps-chat-bubble {
    max-width: 84%;
    padding: 7px 8px;
    border-radius: 12px;
    font-size: 0.73rem;
    line-height: 1.32;
    white-space: pre-wrap;
}

.gnps-chat-bubble.bot {
    justify-self: start;
    color: #1d3f60;
    background: #ffffff;
    border: 1px solid rgba(131, 165, 205, 0.46);
}

.gnps-chat-bubble.user {
    justify-self: end;
    color: #ffffff;
    background: #4868b6;
}

.gnps-chat-actions {
    margin-top: 8px;
}

.gnps-chat-contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(59, 102, 151, 0.45);
    background: #1f5f98;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
}

.gnps-chat-contact-btn:hover {
    background: #184b78;
}

.gnps-chat-typing {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid rgba(131, 165, 205, 0.46);
    border-radius: 12px;
    padding: 7px 9px;
}

.gnps-chat-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8098b7;
    animation: chatTypingDot 1s infinite ease-in-out;
}

.gnps-chat-typing span:nth-child(2) {
    animation-delay: 0.12s;
}

.gnps-chat-typing span:nth-child(3) {
    animation-delay: 0.24s;
}

@keyframes chatTypingDot {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.46;
    }
    40% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

.gnps-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 7px;
    border-top: 1px solid rgba(130, 166, 208, 0.35);
    background: #eef4fd;
    max-height: 86px;
    overflow-y: auto;
}

.gnps-chat-suggestions::-webkit-scrollbar {
    width: 6px;
}

.gnps-chat-suggestions::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: rgba(70, 105, 150, 0.42);
}

.gnps-chat-chip {
    border: 1px solid rgba(110, 152, 201, 0.5);
    border-radius: 20px;
    padding: 4px 7px;
    background: #ffffff;
    color: #19456f;
    font-size: 0.63rem;
    font-weight: 600;
    cursor: pointer;
}

.gnps-chat-chip:hover {
    background: #dfeafb;
}

.gnps-chat-input-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 5px;
    padding: 6px 7px;
    border-top: 1px solid rgba(130, 166, 208, 0.35);
    background: #edf2fa;
}

.gnps-chat-attach,
.gnps-chat-send {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.gnps-chat-attach {
    background: #d9e5f7;
    color: #2d4f78;
}

.gnps-chat-attach svg,
.gnps-chat-send svg {
    width: 16px;
    height: 16px;
}

.gnps-chat-send {
    background: #5573bf;
    color: #ffffff;
}

.gnps-chat-send:hover {
    background: #425c9a;
}

.gnps-chat-input-wrap input {
    width: 100%;
    border: 1px solid #c0d1e9;
    border-radius: 12px;
    padding: 6px 8px;
    font-size: 0.72rem;
    color: #1c4062;
    background: #ffffff;
}

.gnps-chat-input-wrap input:focus {
    border-color: #7f6cf0;
    outline: 2px solid rgba(127, 108, 240, 0.2);
}

@media (max-width: 768px) {
    .gnps-chat-widget {
        right: 8px;
        bottom: 12px;
    }

    .gnps-chat-launcher {
        width: 48px;
        height: 48px;
    }

    .gnps-chat-panel {
        width: min(305px, calc(100vw - 10px));
        bottom: 54px;
        height: min(445px, calc(100vh - 90px));
    }

    .gnps-chat-agent img {
        width: 38px;
        height: 38px;
    }

    .gnps-chat-agent-meta h3 {
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .gnps-chat-widget {
        right: 6px;
        bottom: 10px;
    }

    .gnps-chat-launcher {
        width: 44px;
        height: 44px;
    }

    .gnps-chat-panel {
        width: min(93vw, 295px);
        bottom: 54px;
        height: min(422px, calc(100vh - 68px));
        border-radius: 14px;
    }

    .gnps-chat-header {
        padding: 8px 10px 10px;
    }

    .gnps-chat-agent img {
        width: 34px;
        height: 34px;
    }

    .gnps-chat-messages {
        padding: 8px;
        gap: 7px;
    }

    .gnps-chat-bubble {
        font-size: 0.71rem;
        max-width: 88%;
    }

    .gnps-chat-suggestions {
        gap: 4px;
        padding: 6px 8px;
        max-height: 96px;
    }

    .gnps-chat-chip {
        font-size: 0.61rem;
        padding: 4px 6px;
    }

    .gnps-chat-input-wrap {
        gap: 5px;
        padding: 7px 8px;
    }

    .gnps-chat-attach,
    .gnps-chat-send {
        width: 28px;
        height: 28px;
    }
}
