﻿
/*Chat Message Box*/
#chatWindow {
    z-index:8888;
    pointer-events: none;
}
/*#chatWindow p{
    color:black !important;
}*/
.bg-chat-head {
    padding: 0.5rem 1.5rem;
    background: linear-gradient(250deg, #246fa8, #624E7E);
}

/* Close Button Styles */
#closeButton {
    position: absolute;
    /*top: 1.1rem;*/
    right: 1.8rem;
    width: 30px;
    /*height: 30px;*/
    background: transparent;
    border: none;
    font-size: 36px;
    font-weight: bold;
    color: #FFF;
    cursor: pointer;
    outline: none;
}

    #closeButton:hover {
        color: #5c6670;
    }

body:not(.no-slimscroll) .custom-scroll {
    overflow: hidden;
}

/*scroll*/
.custom-scroll,
.custom-scrollbar {
    overflow: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

    .custom-scroll::-webkit-scrollbar-track-piece,
    .custom-scrollbar::-webkit-scrollbar-track-piece {
        background-color: transparent;
    }

    .custom-scroll::-webkit-scrollbar-thumb:vertical,
    .custom-scrollbar::-webkit-scrollbar-thumb:vertical {
        background-color: #666;
    }

    .custom-scroll::-webkit-scrollbar,
    .custom-scrollbar::-webkit-scrollbar {
        height: 4px;
        width: 4px;
    }

    .custom-scroll::-webkit-scrollbar-corner,
    .custom-scrollbar::-webkit-scrollbar-corner {
        width: 40px;
    }

    .custom-scroll::-webkit-scrollbar-thumb:vertical,
    .custom-scrollbar::-webkit-scrollbar-thumb:vertical {
        background-color: #666;
    }


/*chat*/
#chatHeader {
    font-size: 24px;
    font-weight: 600;
    color: white !important;
    background: transparent;
    padding: 5px;
    text-align: center;
    border-radius: 6px 6px 0 0;
}

#chatMessages {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
}
/* Chat Segment Styles */
.chat-segment {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    line-height: 2.2; /* 文字行距，數字越大行距越高 */
}

.chat-message p {
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    max-width: 100%;
    margin: 0;
}

.chat-segment-sent {
    align-items: flex-end;
    color: white;
}

    .chat-segment-sent .chat-message {
        background: #007bff;
        padding: 10px 15px;
        border-radius: 12px 12px 0 12px;
        max-width: 75%;
        color: white;
    }

.chat-segment-get {
    align-items: flex-start;
    margin-left: 5px;
}

    .chat-segment-get .chat-message {
        /*background-color: #f1f0f0 !important;*/
        padding: 10px 15px;
        border-radius: 12px 12px 12px 0;
        max-width: 75%;
        color: #333;
    }

.chat-segment-date {
    align-items: center;
    text-align: center;
    line-height: initial;
}

/*Button and Link*/
.copy-button {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background-color: initial; /* Blue background */
    color: #2196f3; /* Blue background */
    border: 2px solid #2196f3; /* Blue background */
    border-radius: 5px; /* Rounded corners */
    font-size: 14px; /* Font size */
    font-weight: bold; /* Bold text for visibility */
    cursor: pointer; /* Pointer cursor on hover */
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
}
    .copy-button:hover {
        color: #FFF; /* White text */
        background-color: #2196f3; /* Blue background */
        border: 2px solid #2196f3; /* Blue background */
        transform: scale(1.05); /* Slightly enlarge the button */
    }

    .copy-button:active {
        background-color: red; /* Even darker blue when clicked */
        transform: scale(0.95); /* Slightly shrink on click */
    }

    /* Responsive design */
    .copy-button:focus {
        outline: none; /* Remove focus outline */
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* Add shadow when focused */
    }

    .copy-button:disabled {
        background-color: #cccccc; /* Gray background for disabled */
        cursor: not-allowed; /* Show not-allowed cursor */
    }
.extend-button{
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background-color: #2196f3; /* Blue background */
    color: #ffffff; /* White text */
    border: 2px solid #2196f3; /* Blue border */
    border-radius: 5px; /* Rounded corners */
    font-size: 14px; /* Font size */
    cursor: pointer; /* Pointer cursor on hover */
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
}

    .extend-button:hover {
        background-color: #0a6fc2; /* Darker blue on hover */
        border: 2px solid #0a6fc2; /* Darker blue border */
        transform: scale(1.05); /* Slightly enlarge the button */
    }

    .extend-button:active {
        background-color: #003f7f; /* Even darker blue when clicked */
        transform: scale(0.95); /* Slightly shrink on click */
    }

    /* Responsive design */
    .extend-button:focus {
        outline: none; /* Remove focus outline */
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* Add shadow when focused */
    }

    .extend-button:disabled {
        background-color: #cccccc; /* Gray background for disabled */
        cursor: not-allowed; /* Show not-allowed cursor */
    }
.chat-link {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    color: #7453a6; /* Purple color */
    text-decoration: none; /* Remove underline */
    font-size: 14px; /* Font size */
    font-weight: bold; /* Bold text for visibility */
    border: 2px solid #7453a6; /* Border matching the text color */
    border-radius: 5px; /* Slightly rounded corners */
    background-color: transparent; /* Transparent background */
    text-align: center;
    transition: all 0.3s ease; /* Smooth transitions */
    cursor: pointer; /* Pointer cursor on hover */
}

    .chat-link:hover {
        background-color: #7453a6; /* Purple background on hover */
        color: #ffffff; /* White text on hover */
        border-color: #7453a6; /* Match border with background */
        transform: scale(1.05); /* Slightly enlarge on hover */
    }

    .chat-link:active {
        background-color: #5e3b84; /* Darker purple when clicked */
        color: #ffffff; /* Keep white text */
        border-color: #5e3b84; /* Match border with background */
        transform: scale(0.95); /* Slightly shrink on click */
    }

    .chat-link:focus {
        outline: none; /* Remove default focus outline */
        box-shadow: 0 0 5px rgba(116, 83, 166, 0.5); /* Add a glow effect */
    }

    .chat-link:disabled {
        color: #cccccc; /* Gray color for disabled state */
        border-color: #cccccc; /* Match border to text color */
        background-color: transparent; /* Keep background transparent */
        cursor: not-allowed; /* Not-allowed cursor */
        pointer-events: none; /* Disable interactions */
    }


/* Timestamp Style */
.fw-300 {
    font-weight: 300;
    color: #888;
    font-size: 12px;
    margin-top: 5px;
}

.time-stamp {
    width: 100px;
    text-align: center;
    font-weight: 400;
    margin: 15px 0;
    font-size: 14px;
    color: #555;
    display: inline-block;
    background: #f2f2f2;
    padding: 8px 16px;
    border-radius: 12px;
}

#chatInput {
    display: flex;
}

    #chatInput input {
        flex: 1;
        padding: 5px;
        border: 1px solid #007bff;
        border-radius: 4px;
    }

    #chatInput button {
        padding: 5px;
        background: #007bff;
        color: white;
        border: none;
        border-radius: 4px;
        margin-left: 5px;
        cursor: pointer;
    }

#typingIndicator {
    height: 40px; /* 固定高度避免被覆蓋 */
    position: relative;
    color: grey;
    font-style: italic;
    padding: 5px;
    left: 20px;
    margin-top: 10px;
    opacity: 0;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 0 0 5px;
    /*background: grey;*/
    background: #0099ff;
    border-radius: 50%;
    opacity: 0.2;
    animation: blink 1.5s infinite;
}

    .dot:nth-child(1) {
        animation-delay: 0s;
    }

    .dot:nth-child(2) {
        animation-delay: 0.3s;
    }

    .dot:nth-child(3) {
        animation-delay: 0.6s;
    }

.flex-row {
    -webkit-box-orient: horizontal !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: row !important;
    flex-direction: row !important;
}
.align-items-end {
    -webkit-box-align: end !important;
    -ms-flex-align: end !important;
    align-items: flex-end !important;
}
.btn-send {
    color: #fff;
    background-color: #2196F3;
    border-color: #2196F3;
    -webkit-box-shadow: 0 2px 6px 0 rgba(33, 150, 243, 0.5);
    box-shadow: 0 2px 6px 0 rgba(33, 150, 243, 0.5);
    margin-bottom:5px;
}
    .btn-send:hover {
        color: #fff;
        background-color: #0a6fc2;
        border-color: #0a6fc2;
    }

.btn-attach {
    color: #2196F3;
    background-color: white;
}
    .btn-attach:hover {
        color: #0a6fc2;
        background-color: white;
    }
.btn-trash {
    color: red;
    background-color: white;
}
    .btn-trash:hover {
        color: darkred;
        background-color: white;
        border-color: darkred;
    }
    .btn-trash:active {
        color: darkred;
        background-color: white;
        border-color: darkred;
    }

@keyframes blink {
    0%, 100% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.modal-dialog {
    transform: translate(0, 0);
}
.modal-dialog-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    border-width: 0px;
}

.modal-dialog.modal-slide-in {
    animation: slideInRight 0.5s ease-out;
}

.modal-dialog.modal-slide-out {
    animation: slideOutRight 0.5s ease-out;
}

.modal-content {
    pointer-events: auto;
}


/*floating-Button*/
.floating-button {
    z-index:8888;
    position: fixed;
    bottom: 60px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: white;
    color: black;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

    .floating-button:hover {
        color: white;
        background: linear-gradient(45deg, cyan, blue, violet);
        background-size: 200% 200%;
        animation: wave-rotate-animation 2s ease infinite;
    }

    .floating-button i {
        transition: color 0.3s ease;
    }

@keyframes wave-rotate-animation {
    0% {
        background-position: 0% 50%;
    }

    25% {
        background-position: 50% 100%;
    }

    50% {
        background-position: 100% 50%;
    }

    75% {
        background-position: 50% 0%;
    }

    100% {
        background-position: 0% 50%;
    }
}