/* =====================================================================
   WebWerk Contact Chat Widget - frontend
   ===================================================================== */

.wwccw-widget,
.wwccw-inline {
    --wwccw-widget-bg: var(--wwccw-widget-bg-user, #ffffff);
    --wwccw-message-bg: var(--wwccw-message-bg-user, #f1f5f9);
    --wwccw-message-text: var(--wwccw-message-text-user, #334155);
    --wwccw-border: rgba(15, 23, 42, 0.12);
    --wwccw-muted: #64748b;
    --wwccw-secondary-bg: #ffffff;
    --wwccw-secondary-text: #0f172a;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.wwccw-widget *,
.wwccw-inline * {
    box-sizing: border-box;
}

/* ---- Dark mode --------------------------------------------------- */

.wwccw-scheme-dark {
    --wwccw-widget-bg: #1f2430;
    --wwccw-message-bg: #2a303c;
    --wwccw-message-text: #e6e9ef;
    --wwccw-border: rgba(255, 255, 255, 0.14);
    --wwccw-muted: #9aa4b2;
    --wwccw-secondary-bg: #262c38;
    --wwccw-secondary-text: #e6e9ef;
}

@media (prefers-color-scheme: dark) {
    .wwccw-scheme-auto {
        --wwccw-widget-bg: #1f2430;
        --wwccw-message-bg: #2a303c;
        --wwccw-message-text: #e6e9ef;
        --wwccw-border: rgba(255, 255, 255, 0.14);
        --wwccw-muted: #9aa4b2;
        --wwccw-secondary-bg: #262c38;
        --wwccw-secondary-text: #e6e9ef;
    }
}

/* =====================================================================
   FLOATING WIDGET
   ===================================================================== */

.wwccw-widget {
    position: fixed;
    bottom: var(--wwccw-offset-y, 20px);
    z-index: 999999;

    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wwccw-widget.wwccw-visible {
    opacity: 1;
    transform: translateY(0);
}

.wwccw-pos-right {
    right: var(--wwccw-offset-x, 20px);
}

.wwccw-pos-left {
    left: var(--wwccw-offset-x, 20px);
}

/* ---- Float button --------------------------------------------------- */

.wwccw-float-btn {
    width: var(--wwccw-btn-size, 60px);
    height: var(--wwccw-btn-size, 60px);
    padding: 0;
    border: none;

    background: var(--wwccw-button-bg, #25D366);
    color: var(--wwccw-button-text, #ffffff);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    overflow: hidden;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wwccw-float-btn:focus-visible {
    outline: 3px solid var(--wwccw-button-bg, #25D366);
    outline-offset: 3px;
}

/* ---- Hover effects ---- */

.wwccw-hover-grow .wwccw-float-btn:hover {
    transform: scale(1.08);
}

.wwccw-hover-lift .wwccw-float-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.wwccw-hover-rotate .wwccw-float-btn:hover {
    transform: rotate(8deg) scale(1.05);
}

/* ---- Button shape ---- */

.wwccw-shape-circle .wwccw-float-btn {
    border-radius: 50%;
}

.wwccw-shape-rounded .wwccw-float-btn {
    border-radius: 20px;
}

.wwccw-shape-square .wwccw-float-btn {
    border-radius: 8px;
}

.wwccw-shape-bubble .wwccw-float-btn {
    border-radius: 50% 50% 50% 8px;
}

.wwccw-pos-left.wwccw-shape-bubble .wwccw-float-btn {
    border-radius: 50% 50% 8px 50%;
}

/* ---- Button content ---- */

.wwccw-float-avatar,
.wwccw-float-img,
.wwccw-avatar-media {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

/* Default inline-SVG avatar (used when no avatar image is set) */
.wwccw-default-avatar .wwccw-da-bg {
    fill: #ffffff;
}

.wwccw-default-avatar .wwccw-da-fg {
    fill: #64748b;
}

.wwccw-scheme-dark .wwccw-default-avatar .wwccw-da-bg {
    fill: #2a303c;
}

.wwccw-scheme-dark .wwccw-default-avatar .wwccw-da-fg {
    fill: #9aa4b2;
}

@media (prefers-color-scheme: dark) {
    .wwccw-scheme-auto .wwccw-default-avatar .wwccw-da-bg {
        fill: #2a303c;
    }

    .wwccw-scheme-auto .wwccw-default-avatar .wwccw-da-fg {
        fill: #9aa4b2;
    }
}

.wwccw-float-icon {
    width: 54%;
    height: 54%;
    flex: 0 0 auto;
    background-color: var(--wwccw-button-text, #ffffff);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* Label style: pill with icon + text, width follows the text */
.wwccw-widget .wwccw-float-btn.wwccw-btn-label {
    width: auto;
    min-width: 0;
    height: var(--wwccw-btn-size, 60px);
    padding: 0 22px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
}

.wwccw-float-btn.wwccw-btn-label .wwccw-float-icon {
    width: 20px;
    height: 20px;
}

.wwccw-float-label {
    white-space: nowrap;
}

/* ---- Attention animations ---- */

.wwccw-anim-pulse:not(.wwccw-anim-interval) .wwccw-float-btn {
    animation: wwccw-pulse 2.4s ease-in-out infinite;
}

.wwccw-anim-glow:not(.wwccw-anim-interval) .wwccw-float-btn {
    animation: wwccw-glow 2s ease-in-out infinite;
}

.wwccw-anim-bounce:not(.wwccw-anim-interval) .wwccw-float-btn {
    animation: wwccw-bounce 2.8s ease-in-out infinite;
}

.wwccw-anim-shake:not(.wwccw-anim-interval) .wwccw-float-btn {
    animation: wwccw-shake 3s ease-in-out infinite;
}

.wwccw-anim-swing:not(.wwccw-anim-interval) .wwccw-float-btn {
    animation: wwccw-swing 3s ease-in-out infinite;
    transform-origin: top center;
}

.wwccw-anim-heartbeat:not(.wwccw-anim-interval) .wwccw-float-btn {
    animation: wwccw-heartbeat 2.4s ease-in-out infinite;
}

.wwccw-anim-wobble:not(.wwccw-anim-interval) .wwccw-float-btn {
    animation: wwccw-wobble 3s ease-in-out infinite;
}

/* Interval mode: idle until JS adds .wwccw-animate-now, then one burst */
.wwccw-anim-interval .wwccw-float-btn {
    animation: none;
}

.wwccw-anim-interval.wwccw-anim-pulse .wwccw-float-btn.wwccw-animate-now {
    animation: wwccw-pulse 1.6s ease-in-out 1;
}

.wwccw-anim-interval.wwccw-anim-glow .wwccw-float-btn.wwccw-animate-now {
    animation: wwccw-glow 1.6s ease-in-out 1;
}

.wwccw-anim-interval.wwccw-anim-bounce .wwccw-float-btn.wwccw-animate-now {
    animation: wwccw-bounce 1.4s ease-in-out 1;
}

.wwccw-anim-interval.wwccw-anim-shake .wwccw-float-btn.wwccw-animate-now {
    animation: wwccw-shake 1.2s ease-in-out 1;
}

.wwccw-anim-interval.wwccw-anim-swing .wwccw-float-btn.wwccw-animate-now {
    animation: wwccw-swing 1.4s ease-in-out 1;
    transform-origin: top center;
}

.wwccw-anim-interval.wwccw-anim-heartbeat .wwccw-float-btn.wwccw-animate-now {
    animation: wwccw-heartbeat 1.4s ease-in-out 1;
}

.wwccw-anim-interval.wwccw-anim-wobble .wwccw-float-btn.wwccw-animate-now {
    animation: wwccw-wobble 1.4s ease-in-out 1;
}

/* Opening the panel always stops the button animation */
.wwccw-widget.wwccw-is-open .wwccw-float-btn {
    animation: none !important;
}

/* ---- Panel open animation ---- */

.wwccw-panelanim-slide.wwccw-is-open .wwccw-chat-box {
    animation: wwccw-panel-slide 0.28s ease;
}

.wwccw-panelanim-fade.wwccw-is-open .wwccw-chat-box {
    animation: wwccw-panel-fade 0.28s ease;
}

.wwccw-panelanim-scale.wwccw-is-open .wwccw-chat-box {
    animation: wwccw-panel-scale 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: bottom right;
}

.wwccw-pos-left.wwccw-panelanim-scale.wwccw-is-open .wwccw-chat-box {
    transform-origin: bottom left;
}

/* ---- Chat box --------------------------------------------------- */

.wwccw-chat-box {
    width: 320px;
    max-width: calc(100vw - 30px);
    margin-bottom: 12px;

    background: var(--wwccw-widget-bg, #ffffff);
    border: 1px solid var(--wwccw-border);
    border-radius: 16px;
    overflow: hidden;

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);

    display: none;
}

.wwccw-widget.wwccw-is-open .wwccw-chat-box {
    display: block;
}

.wwccw-widget.wwccw-hide-bubble:not(.wwccw-is-open) .wwccw-chat-box {
    display: none;
}

/* ---- Header --------------------------------------------------- */

.wwccw-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;

    background: var(--wwccw-header-bg, #25D366);
    color: var(--wwccw-header-text, #ffffff);
}

.wwccw-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    overflow: hidden;
    background: #ffffff;
    border: 2px solid var(--wwccw-avatar-border, #ffffff);
    border-radius: 50%;
}

.wwccw-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wwccw-chat-headmeta {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.3;
}

.wwccw-chat-headmeta strong {
    display: block;
    font-size: 14px;
}

.wwccw-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.9;
}

.wwccw-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 rgba(22, 163, 74, 0.5);
    animation: wwccw-blip 2s infinite;
}

.wwccw-status.is-offline .wwccw-status-dot {
    background: #9ca3af;
    animation: none;
}

.wwccw-close-btn {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.wwccw-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.wwccw-close-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ---- Body --------------------------------------------------- */

.wwccw-chat-body {
    padding: 15px 15px 6px;
}

.wwccw-message {
    padding: 10px 12px;
    background: var(--wwccw-message-bg, #f1f5f9);
    color: var(--wwccw-message-text, #334155);
    border-radius: 12px;
    white-space: pre-line;
    line-height: 1.55;
    font-size: 14px;
}

/* ---- Footer / channel list --------------------------------------------------- */

.wwccw-chat-footer {
    padding: 12px 15px 16px;
}

.wwccw-setup-hint {
    margin: 0;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--wwccw-muted);
    background: var(--wwccw-message-bg);
    border-radius: 10px;
}

.wwccw-channel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wwccw-channel-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 14px;

    text-decoration: none;
    font-size: 14px;
    font-weight: 600;

    border-radius: 999px;
    border: 1px solid var(--wwccw-border);
    background: var(--wwccw-secondary-bg);
    color: var(--wwccw-secondary-text);

    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.wwccw-channel-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.wwccw-channel-btn:focus-visible {
    outline: 3px solid var(--wwccw-button-bg, #25D366);
    outline-offset: 2px;
}

.wwccw-channel-btn.is-primary {
    background: var(--wwccw-button-bg, #25D366);
    color: var(--wwccw-button-text, #ffffff);
    border-color: transparent;
}

.wwccw-ch-icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.wwccw-ch-label {
    flex: 1 1 auto;
    min-width: 0;
}

/* Channel glyphs (monochrome, tinted via mask + currentColor) */
.wwccw-icon-whatsapp,
.wwccw-icon-messenger {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3C6.5 3 2 6.9 2 11.7c0 2.7 1.4 5.1 3.7 6.7L5 22l4-2.1c1 .2 2 .4 3 .4 5.5 0 10-3.9 10-8.7S17.5 3 12 3z' fill='%23000'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3C6.5 3 2 6.9 2 11.7c0 2.7 1.4 5.1 3.7 6.7L5 22l4-2.1c1 .2 2 .4 3 .4 5.5 0 10-3.9 10-8.7S17.5 3 12 3z' fill='%23000'/%3E%3C/svg%3E");
}

.wwccw-icon-phone {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.2 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.6c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.4 0 .8-.3 1z' fill='%23000'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.2 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.6c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.4 0 .8-.3 1z' fill='%23000'/%3E%3C/svg%3E");
}

.wwccw-icon-sms {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9l-5 4V6a2 2 0 0 1 2-2z' fill='%23000'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9l-5 4V6a2 2 0 0 1 2-2z' fill='%23000'/%3E%3C/svg%3E");
}

.wwccw-icon-email {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 6l10 7L22 6v13H2z' fill='%23000'/%3E%3Cpath d='M2 5h20l-10 7z' fill='%23000'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 6l10 7L22 6v13H2z' fill='%23000'/%3E%3Cpath d='M2 5h20l-10 7z' fill='%23000'/%3E%3C/svg%3E");
}

.wwccw-icon-telegram {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.5 4.3L2.5 11.6c-.9.3-.9 1.5 0 1.8l4.7 1.5 1.8 5.6c.2.7 1.1.9 1.6.3l2.6-2.7 4.8 3.5c.6.4 1.4.1 1.6-.6l3.3-16c.2-.9-.7-1.6-1.5-1.2z' fill='%23000'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.5 4.3L2.5 11.6c-.9.3-.9 1.5 0 1.8l4.7 1.5 1.8 5.6c.2.7 1.1.9 1.6.3l2.6-2.7 4.8 3.5c.6.4 1.4.1 1.6-.6l3.3-16c.2-.9-.7-1.6-1.5-1.2z' fill='%23000'/%3E%3C/svg%3E");
}

.wwccw-icon-custom {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 13.5a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7L11 6.6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M13.5 10.5a4 4 0 0 0-5.7 0l-3 3a4 4 0 1 0 5.7 5.7L13 17.4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 13.5a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7L11 6.6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M13.5 10.5a4 4 0 0 0-5.7 0l-3 3a4 4 0 1 0 5.7 5.7L13 17.4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.wwccw-icon-chat {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9l-5 4V6a2 2 0 0 1 2-2z' fill='%23000'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9l-5 4V6a2 2 0 0 1 2-2z' fill='%23000'/%3E%3C/svg%3E");
}

.wwccw-icon-dots {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='5' cy='12' r='2.2' fill='%23000'/%3E%3Ccircle cx='12' cy='12' r='2.2' fill='%23000'/%3E%3Ccircle cx='19' cy='12' r='2.2' fill='%23000'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='5' cy='12' r='2.2' fill='%23000'/%3E%3Ccircle cx='12' cy='12' r='2.2' fill='%23000'/%3E%3Ccircle cx='19' cy='12' r='2.2' fill='%23000'/%3E%3C/svg%3E");
}

.wwccw-icon-headset {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13v-1a7 7 0 0 1 14 0v1' fill='none' stroke='%23000' stroke-width='2'/%3E%3Crect x='3' y='12.5' width='5' height='7' rx='1.6' fill='%23000'/%3E%3Crect x='16' y='12.5' width='5' height='7' rx='1.6' fill='%23000'/%3E%3Cpath d='M19 19a4 4 0 0 1-4 3h-2' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13v-1a7 7 0 0 1 14 0v1' fill='none' stroke='%23000' stroke-width='2'/%3E%3Crect x='3' y='12.5' width='5' height='7' rx='1.6' fill='%23000'/%3E%3Crect x='16' y='12.5' width='5' height='7' rx='1.6' fill='%23000'/%3E%3Cpath d='M19 19a4 4 0 0 1-4 3h-2' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
}

.wwccw-icon-question {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 9a3 3 0 1 1 4 2.8c-1 .5-1.5 1.2-1.5 2.2v.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='18' r='1.3' fill='%23000'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 9a3 3 0 1 1 4 2.8c-1 .5-1.5 1.2-1.5 2.2v.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='18' r='1.3' fill='%23000'/%3E%3C/svg%3E");
}

/* =====================================================================
   INLINE LIST (shortcode / block)
   ===================================================================== */

.wwccw-inline {
    display: block;
    max-width: 420px;
    padding: 16px;
    background: var(--wwccw-widget-bg, #ffffff);
    border: 1px solid var(--wwccw-border);
    border-radius: 16px;
}

.wwccw-inline-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--wwccw-secondary-text);
}

/* =====================================================================
   WHATSAPP CONSENT DIALOG
   ===================================================================== */

.wwccw-consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
}

.wwccw-consent-box {
    width: 100%;
    max-width: 380px;
    padding: 22px;
    background: #ffffff;
    color: #0f172a;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wwccw-consent-text {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
}

.wwccw-consent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wwccw-consent-accept,
.wwccw-consent-cancel {
    flex: 1 1 auto;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    border: 1px solid transparent;
}

.wwccw-consent-accept {
    background: #25D366;
    color: #ffffff;
}

.wwccw-consent-cancel {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.2);
}

.wwccw-consent-accept:focus-visible,
.wwccw-consent-cancel:focus-visible {
    outline: 3px solid #0f172a;
    outline-offset: 2px;
}

/* =====================================================================
   ANIMATION
   ===================================================================== */

@keyframes wwccw-pulse {
    0% {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 211, 102, 0.45);
    }
    70% {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 14px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes wwccw-blip {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
    }
}

@keyframes wwccw-glow {
    0%, 100% {
        filter: drop-shadow(0 0 0 transparent);
    }
    50% {
        filter: drop-shadow(0 0 12px var(--wwccw-button-bg, #25D366));
    }
}

@keyframes wwccw-bounce {
    0% { transform: translateY(0); }
    12% { transform: translateY(-11px); }
    24% { transform: translateY(0); }
    36% { transform: translateY(-5px); }
    48%, 100% { transform: translateY(0); }
}

@keyframes wwccw-shake {
    0% { transform: translateX(0); }
    6% { transform: translateX(-4px); }
    12% { transform: translateX(4px); }
    18% { transform: translateX(-4px); }
    24% { transform: translateX(3px); }
    30% { transform: translateX(0); }
    100% { transform: translateX(0); }
}

@keyframes wwccw-swing {
    0% { transform: rotate(0); }
    12% { transform: rotate(13deg); }
    24% { transform: rotate(-9deg); }
    36% { transform: rotate(6deg); }
    48% { transform: rotate(-3deg); }
    60%, 100% { transform: rotate(0); }
}

@keyframes wwccw-heartbeat {
    0% { transform: scale(1); }
    10% { transform: scale(1.14); }
    20% { transform: scale(1); }
    30% { transform: scale(1.14); }
    42%, 100% { transform: scale(1); }
}

@keyframes wwccw-wobble {
    0% { transform: translateX(0) rotate(0); }
    12% { transform: translateX(-7px) rotate(-5deg); }
    24% { transform: translateX(6px) rotate(4deg); }
    36% { transform: translateX(-4px) rotate(-3deg); }
    48% { transform: translateX(2px) rotate(1deg); }
    60%, 100% { transform: translateX(0) rotate(0); }
}

@keyframes wwccw-panel-slide {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes wwccw-panel-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wwccw-panel-scale {
    from { opacity: 0; transform: scale(0.88); }
    to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {

    .wwccw-widget,
    .wwccw-widget *,
    .wwccw-float-btn,
    .wwccw-status-dot,
    .wwccw-channel-btn,
    .wwccw-chat-box {
        animation: none !important;
        transition: none !important;
    }
}

/* =====================================================================
   MOBILE
   ===================================================================== */

@media (max-width: 480px) {

    .wwccw-widget {
        bottom: max(12px, calc(var(--wwccw-offset-y, 20px) - 6px));
    }

    .wwccw-pos-right {
        right: max(12px, calc(var(--wwccw-offset-x, 20px) - 6px));
    }

    .wwccw-pos-left {
        left: max(12px, calc(var(--wwccw-offset-x, 20px) - 6px));
    }

    .wwccw-chat-box {
        width: calc(100vw - 24px);
    }

    .wwccw-float-btn {
        width: 56px;
        height: 56px;
    }
}
