#ask-notif-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ask-notif-fab-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ask-notif-fab-tooltip {
    position: absolute;
    right: 75px;
    background-color: #ffffff;
    color: #333333;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    white-space: nowrap;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s;
    animation: askNotifBounce 2s infinite;
}

.ask-notif-fab-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

@keyframes askNotifBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

#ask-notif-chat-box:not(.ask-notif-hidden) ~ .ask-notif-fab-wrapper .ask-notif-fab-tooltip {
    display: none !important;
}

#ask-notif-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--an-primary-color);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 10;
}

#ask-notif-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

#ask-notif-fab svg {
    width: 30px;
    height: 30px;
}

#ask-notif-fab img.ask-notif-custom-icon {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

#ask-notif-chat-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s, transform 0.3s;
    transform-origin: bottom right;
}

#ask-notif-chat-box.ask-notif-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8) translateY(20px);
}

.ask-notif-chat-header {
    background-color: var(--an-primary-color);
    color: #ffffff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#ask-notif-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

#ask-notif-chat-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f0f2f5;
}

#ask-notif-prechat {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

#ask-notif-prechat p {
    margin-bottom: 15px;
    color: #444;
    font-size: 14px;
}

#ask-notif-visitor-name {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
}

#ask-notif-visitor-name:focus,
#ask-notif-visitor-email:focus {
    border-color: var(--an-primary-color);
    outline: none;
}

#ask-notif-visitor-email {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
}

#ask-notif-start-chat {
    padding: 12px 20px;
    background-color: var(--an-primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    transition: opacity 0.2s;
}

#ask-notif-start-chat:hover {
    opacity: 0.9;
}

.ask-notif-chat-input-area {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: center;
}

.ask-notif-chat-input-area.ask-notif-hidden {
    display: none;
}

#ask-notif-message-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

#ask-notif-message-input:focus {
    border-color: var(--an-primary-color);
}

#ask-notif-send-btn {
    background-color: var(--an-primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    min-width: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
    overflow: visible;
    padding: 0;
}

#ask-notif-send-btn svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff !important;
    fill: none !important;
    flex-shrink: 0;
}

/* Fallback: jika SVG tidak terlihat, tampilkan ikon via CSS */
#ask-notif-send-btn:empty,
#ask-notif-send-btn:not(:has(svg)) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'/%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
}

#ask-notif-send-btn:active {
    transform: scale(0.95);
}

#ask-notif-chat-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#ask-notif-chat-history.ask-notif-hidden {
    display: none;
}

.ask-notif-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.ask-notif-bubble-user {
    background-color: var(--an-primary-color);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ask-notif-bubble-admin {
    background-color: #ffffff;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Responsiveness on mobile */
@media screen and (max-width: 480px) {
    #ask-notif-chat-box {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}
