body.has-support-chat .dw-whatsapp-fab {
    bottom: 5.75rem;
}

.dw-support-chat {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1050;
    font-family: inherit;
}

.dw-support-chat-launcher {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.1rem;
    border: none;
    border-radius: 999px;
    background: var(--dw-brand, #1e3a8a);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dw-support-chat-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.4);
    color: #fff;
}

.dw-support-chat-launcher-icon-close {
    display: none;
    font-size: 1.1rem;
}

.dw-support-chat.is-open .dw-support-chat-launcher-icon-open {
    display: none;
}

.dw-support-chat.is-open .dw-support-chat-launcher-icon-close {
    display: inline;
}

.dw-support-chat.is-open .dw-support-chat-launcher-label {
    display: none;
}

.dw-support-chat-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    width: min(400px, calc(100vw - 2rem));
    max-height: min(640px, calc(100vh - 7rem));
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8e9eb;
    box-shadow: 0 20px 50px rgba(28, 29, 31, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
}

.dw-support-chat.is-open .dw-support-chat-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dw-support-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 0.85rem;
    background: var(--dw-brand, #1e3a8a);
    color: #fff;
}

.dw-support-chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.dw-support-chat-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.dw-support-chat-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.dw-support-chat-status {
    margin: 0;
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dw-support-chat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5ce883;
    box-shadow: 0 0 0 2px rgba(92, 232, 131, 0.35);
}

.dw-support-chat-close {
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dw-support-chat-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.dw-support-chat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #e8e9eb;
    background: #f7f9fa;
}

.dw-support-chat-chip {
    border: 1px solid #d1d7dc;
    background: #fff;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dw-purple);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.dw-support-chat-chip:hover {
    border-color: var(--dw-purple);
    background: #f7f4ff;
}

.dw-support-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 220px;
    background: #fafbfc;
}

.dw-support-chat-bubble {
    max-width: 92%;
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    font-size: 0.875rem;
    line-height: 1.45;
    word-break: break-word;
}

.dw-support-chat-bubble--bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e8e9eb;
    border-bottom-left-radius: 4px;
    color: #1c1d1f;
}

.dw-support-chat-bubble--user {
    align-self: flex-end;
    background: var(--dw-purple);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.dw-support-chat-bubble a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

.dw-support-chat-bubble--bot a {
    color: var(--dw-purple);
}

.dw-support-chat-bubble--typing {
    opacity: 0.7;
    font-style: italic;
}

.dw-support-chat-card {
    background: #fff;
    border: 1px solid #e8e9eb;
    border-radius: 12px;
    padding: 0.75rem;
    margin-top: 0.35rem;
}

.dw-support-chat-card h3 {
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--dw-purple);
}

.dw-support-chat-contact-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-bottom: 0.45rem;
    align-items: flex-start;
}

.dw-support-chat-contact-row i {
    color: var(--dw-purple);
    margin-top: 0.1rem;
}

.dw-support-chat-course-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

.dw-support-chat-course-list li {
    margin-bottom: 0.35rem;
}

.dw-support-chat-course-list a {
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--dw-purple);
}

.dw-support-chat-course-list a:hover {
    text-decoration: underline;
}

.dw-support-chat-course-search {
    margin-bottom: 0.5rem;
}

.dw-support-chat-form-panel {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.dw-support-chat-form-panel label {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.dw-support-chat-form-panel .form-control,
.dw-support-chat-form-panel .form-select {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
}

.dw-support-chat-compose {
    padding: 0.65rem 0.75rem;
    border-top: 1px solid #e8e9eb;
    background: #fff;
}

.dw-support-chat-form {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    position: relative;
}

.dw-support-chat-emoji-btn {
    flex-shrink: 0;
}

.dw-support-chat-emoji-picker {
    left: 0;
    bottom: calc(100% + 0.35rem);
}

.dw-chat-emoji-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: #fff;
    color: var(--dw-brand, #1e3a8a);
    font-size: 1.15rem;
    cursor: pointer;
    flex-shrink: 0;
}

.dw-chat-emoji-btn:hover {
    background: #f3f4f6;
}

.dw-chat-emoji-picker {
    position: absolute;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.15rem;
    padding: 0.5rem;
    width: min(18rem, calc(100vw - 2rem));
    max-height: 10rem;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.dw-chat-emoji-item {
    border: 0;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1.2;
    padding: 0.2rem;
    border-radius: 8px;
    cursor: pointer;
}

.dw-chat-emoji-item:hover {
    background: #f0f2f5;
}

.dw-support-chat-form .form-control {
    font-size: 0.875rem;
    border-radius: 999px;
    padding-left: 1rem;
}

.dw-support-chat-send {
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (max-width: 575.98px) {
    .dw-support-chat-launcher-label {
        display: none;
    }

    .dw-support-chat-launcher {
        width: 3.35rem;
        height: 3.35rem;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .dw-support-chat-panel {
        width: calc(100vw - 1.5rem);
        right: -0.25rem;
        max-height: calc(100vh - 6rem);
    }
}
