.wazen-floating-button[data-state="open"] .wazen-button-label {
    display: none;
}
/* Wazen chat widget styles */
.wazen-widget-root {
    position: fixed;
    inset: auto 44px 44px auto;
    z-index: 1055;
    font-family: "Poppins", "Segoe UI", Tahoma, sans-serif;
    color: #1c1c1c;
}

@media (max-width: 767px) {
    .wazen-widget-root {
        inset: auto 36px 36px auto;
    }
}

.wazen-floating-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    padding: 0;
    border: none;
    cursor: pointer;
    background: transparent;
    color: inherit;
    box-shadow: none;
    transition: transform 0.2s ease;
    position: relative;
    border-radius: 50%;
}

.wazen-floating-button .wazen-button-icon,
.wazen-floating-button .wazen-button-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
}

.wazen-floating-button .wazen-button-emoji {
    font-size: 1.5rem;
}

.wazen-floating-button .wazen-button-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

.wazen-floating-button .wazen-button-icon {
    /*width: 52px;
    height: 52px;*/
}

.wazen-floating-button .wazen-button-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0b3042, #0b7db6);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(11, 59, 89, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wazen-floating-button[data-state="open"] .wazen-button-close-inner {
    font-size: 1.75rem;
    line-height: 1;
    transform: translateY(2px);
}

.wazen-floating-button[data-state="open"]::after {
    content: none;
}

.wazen-floating-button[data-state="open"] .wazen-button-close:hover,
.wazen-floating-button[data-state="open"] .wazen-button-close:focus {
    transform: scale(1.03);
    box-shadow: 0 10px 22px rgba(11, 59, 89, 0.35);
}

.wazen-floating-button[data-state="open"] {
    background: transparent;
}

.wazen-floating-button[data-state="open"] .wazen-button-label {
    display: none;
}

.wazen-floating-button .wazen-button-label {
    position: absolute;
    bottom: calc(100% + 8px);
    background: #0b3042;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    white-space: nowrap;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.wazen-floating-button:hover .wazen-button-label,
.wazen-floating-button:focus .wazen-button-label,
.wazen-floating-button:active .wazen-button-label {
    opacity: 1;
    transform: translateY(0);
}

.wazen-floating-button:hover,
.wazen-floating-button:focus {
    transform: translateY(-2px) scale(1.02);
    outline: none;
}

.wazen-floating-button::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(19, 176, 165, 0.2);
    animation: wazen-pulse 2.4s infinite;
    pointer-events: none;
}

@keyframes wazen-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    60% {
        transform: scale(1.25);
        opacity: 0;
    }
    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

.wazen-chat-panel {
    position: absolute;
    bottom: 88px;
    right: 0;
    width: 560px;
    height: calc(100vh - 340px);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(11, 59, 89, 0.25);
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.24s ease;
    display: flex;
    flex-direction: column;
}

.wazen-chat-panel[data-open="true"] {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 767px) {
    .wazen-chat-panel {
        width: 100%;
        bottom: 80px;
        right: 0;
        max-height: calc(100vh - 110px);
    }
}

.wazen-chat-header {
    background: linear-gradient(135deg, #0b3042, #0b7db6);
    color: #ffffff;
    padding: 18px 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wazen-chat-header .wazen-title {
    flex: 1;
}

.wazen-chat-header .wazen-title h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color:#fff;
}

.wazen-chat-header .wazen-title span {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 2px;
}

.wazen-chat-header button {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.wazen-chat-header button:hover,
.wazen-chat-header button:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

.wazen-language-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
}

.wazen-close-button {
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    padding: 4px 6px;
}

.wazen-chat-body {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f3f7f9 0%, #ffffff 45%);
}

.wazen-message {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
}

.wazen-message .wazen-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #13b0a5, #0b7db6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.wazen-message.user .wazen-avatar {
    background: #0b3042;
}

.wazen-bubble {
    background: #ffffff;
    border-radius: 18px;
    padding: 12px 16px;
    box-shadow: 0 8px 18px rgba(10, 64, 92, 0.08);
    max-width: 100%;
}

.wazen-message.user {
    flex-direction: row-reverse;
}

.wazen-message.user .wazen-bubble {
    background: #0b3042;
    color: #ffffff;
}

.wazen-bubble h5 {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color:#fff;
    text-transform: none;
}

.wazen-bubble p {
    margin: 0 0 6px 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.wazen-body-html {
    font-size: 0.85rem;
    line-height: 1.5;
}

.wazen-body-html p {
    margin: 0 0 6px 0;
}

.wazen-body-html ul,
.wazen-body-html ol {
    margin: 0 0 6px 1rem;
    padding-left: 1.2rem;
}

.wazen-body-html p:last-child,
.wazen-body-html ul:last-child,
.wazen-body-html ol:last-child {
    margin-bottom: 0;
}

.wazen-bubble a.wazen-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: 14px;
    text-decoration: none;
    background: #0b7db6;
    color: #ffffff;
    transition: background 0.2s ease;
    margin-right:5px;
}

.wazen-bubble a.wazen-cta:hover,
.wazen-bubble a.wazen-cta:focus {
    background: #085f8b;
}

.wazen-quick-actions {
    padding: 12px 18px;
    border-top: 1px solid rgba(11, 48, 66, 0.08);
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wazen-secondary-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wazen-secondary-actions button {
    flex: 1 1 auto;
    min-width: 120px;
    padding: 8px 12px;
    border-radius: 18px;
    border: 1px solid rgba(13, 113, 168, 0.2);
    background: rgba(11, 125, 182, 0.08);
    color: #0b3042;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.wazen-secondary-actions button:hover,
.wazen-secondary-actions button:focus {
    background: rgba(11, 125, 182, 0.16);
    transform: translateY(-1px);
    outline: none;
}

.wazen-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wazen-quick-replies button {
    border-radius: 18px;
    border: 1px solid rgba(11, 48, 66, 0.12);
    background: #ffffff;
    padding: 8px 14px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.wazen-quick-replies button:hover,
.wazen-quick-replies button:focus {
    background: rgba(11, 125, 182, 0.12);
    border-color: rgba(11, 125, 182, 0.4);
    outline: none;
}

.wazen-loading-state,
.wazen-error-state {
    padding: 16px;
    text-align: center;
    font-size: 0.85rem;
}

.wazen-error-state {
    color: #b00020;
}

.wazen-message time {
    display: block;
    font-size: 0.7rem;
    opacity: 0.55;
    margin-top: 4px;
}

/* RTL adjustments */
.wazen-chat-panel[dir="rtl"] .wazen-message {
    flex-direction: row-reverse;
}

.wazen-chat-panel[dir="rtl"] .wazen-message.user {
    flex-direction: row;
}

.wazen-chat-panel[dir="rtl"] .wazen-bubble {
    text-align: right;
}

.wazen-chat-panel[dir="rtl"] .wazen-quick-replies button {
    direction: rtl;
}

/* Accessibility helpers */
.wazen-floating-button:focus-visible,
.wazen-chat-header button:focus-visible,
.wazen-secondary-actions button:focus-visible,
.wazen-quick-replies button:focus-visible {
    outline: 2px solid #0b7db6;
    outline-offset: 2px;
}

.wazen-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    background: rgba(11, 125, 182, 0.1);
    color: #0b3042;
    margin-bottom: 6px;
}
