* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    background-color: #f5f5f5;
}

.chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 525px;
    height: 675px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    /* border: 1px solid rgba(255, 255, 255, 0.2); */
    backdrop-filter: blur(10px);
}

.chat-container.fullscreen {
    width: 90vw;
    height: 90vh;
    bottom: 5vh;
    right: 5vw;
    border-radius: 20px;
}

.chat-container.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.2);
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-title i {
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 50%;
}

.chat-actions button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    margin-left: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.chat-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
}

.message {
   
    padding: 15px 15px;
    border-radius: 20px;
    position: relative;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.message .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.bot {
    align-self: flex-start;
    background-color: #ffffff;
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    color: white;
    flex-direction: row-reverse;
}

.message-time {
    font-size: 0.7rem;
    margin-top: 5px;
    opacity: 0.7;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 10px;
    position: relative;
    background: white;
    border-radius: 0 0 20px 20px;
    align-items: center;
}

.chat-input input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #BBDEFB;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
    font-size: 1.4rem;
}

.chat-input input:focus {
    border-color: #1E88E5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.chat-input button {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.2);
}

.chat-faq-container {
    padding: 8px;
    background-color: white;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.faq-item {
    margin: 0;
    padding: 6px 12px;
    background-color: #E8F4FE;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #1565C0;
    border: 1px solid #BBDEFB;
    flex: 0 0 auto;
}

.faq-item:hover {
    background-color: #1E88E5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #1E88E5;
}

.faq-item p {
    font-size: 12px;
    color: inherit;
    margin: 0;
    white-space: nowrap;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 150px;
    height: 40px;
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(30, 136, 229, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    transform: scale(1.2) translateX(-5px);
    box-shadow: 0 15px 30px rgba(30, 136, 229, 0.4);
}

.chat-toggle i {
    font-size: 1.8rem;
}
.icon-container{
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
    margin-bottom: 4px;
    font-size: 16px;

}
.icon-container i:hover{
    color: blue;
    transform: scale(1.2) 1s;
}

/* Animasi */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Query untuk Mobile */
@media screen and (max-width: 768px) {
    .chat-container {
        width: 95vw;
        height: 80vh;
        right: 2.5vw;
        bottom: 2.5vh;
    }

    .chat-container.fullscreen {
        width: 95vw;
        height: 95vh;
        right: 2.5vw;
        bottom: 2.5vh;
    }

    .message {
        max-width: 90%;
    }

    .message .avatar {
        width: 40px;
        height: 40px;
    }

    .chat-input input {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .chat-input button {
        width: 40px;
        height: 40px;
    }

    .faq-item {
        padding: 5px 10px;
        font-size: 11px;
    }

    .chat-toggle {
        width: 60px;
        height: 60px;
    }

    .chat-toggle i {
        font-size: 1.5rem;
    }
}

/* Media Query untuk Mobile Landscape */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .chat-container {
        height: 90vh;
    }
}



/* Center the loader */
#chat-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    /* Ubah margin agar loader benar-benar di tengah */
    border: 8px solid #f3f3f3;
    border-radius: 50%;
    border-top: 8px solid #1b4f80;
    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
  
