﻿/**
 * DRAVIO Chat Widget - Frontend Styles
 * Modern chat bubble interface
 */

/* Widget Container */
.dravio-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;

    /* Color theme — overridden by JS using the primary_color setting */
    --dravio-primary:      #4A90E2;
    --dravio-primary-dark: #357ABD;
}

/* Bottom-left position — flip horizontal anchor */
.dravio-widget.dravio-widget--bottom-left {
    right: auto;
    left: 20px;
}

/* Chat Bubble (Closed State) — v0.38.19: bigger default + size variants */
.dravio-bubble {
    /* Default (medium) — visitor size-picker in Settings can override */
    --dravio-bubble-size: 68px;
    width: var(--dravio-bubble-size);
    height: var(--dravio-bubble-size);
    border-radius: 50%;
    background: var(--dravio-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.dravio-bubble--size-sm { --dravio-bubble-size: 56px; }
.dravio-bubble--size-md { --dravio-bubble-size: 68px; }
.dravio-bubble--size-lg { --dravio-bubble-size: 80px; }
.dravio-bubble svg {
    width: calc(var(--dravio-bubble-size) * 0.38);
    height: calc(var(--dravio-bubble-size) * 0.38);
}

.dravio-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

/* Unread badge — v0.38.19. Shows a small red circle with a count on the
   top-right of the bubble on first visit. Vanishes once the bubble is
   opened (localStorage flag prevents it from reappearing). */
.dravio-bubble__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #EF4444;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    pointer-events: none;
    animation: dravio-badge-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
    animation-delay: 0.5s;
}
@keyframes dravio-badge-pop {
    from { opacity: 0; transform: scale(0.4); }
    to   { opacity: 1; transform: scale(1); }
}

/* Periodic attention bounce — v0.38.19. Fires every 30s until the visitor
   engages. Small vertical hop, keeps the bubble in peripheral vision without
   being loud. */
@keyframes dravio-bubble-bounce {
    0%, 100% { transform: translateY(0); }
    30%      { transform: translateY(-8px); }
    45%      { transform: translateY(0); }
    60%      { transform: translateY(-4px); }
    75%      { transform: translateY(0); }
}
.dravio-bubble--bounce {
    animation: dravio-bubble-bounce 0.9s ease-in-out;
}

/* Nudge animation — ripple ring + gentle pulse */
@keyframes dravio-nudge-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.08); }
}

@keyframes dravio-nudge-ripple {
    0%   { transform: scale(1);   opacity: 0.55; }
    100% { transform: scale(2.4); opacity: 0; }
}

.dravio-bubble--nudge {
    /* Delay matches the legacy JS timing so the bubble pulses 3s after load,
       giving the visitor a moment to read the page first. */
    animation: dravio-nudge-pulse 2.2s ease-in-out 3s infinite;
}

.dravio-bubble--nudge::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--dravio-primary);
    animation: dravio-nudge-ripple 2.2s ease-out 3s infinite;
    z-index: -1;
}

.dravio-bubble--nudge:hover {
    animation-play-state: paused;
}

.dravio-bubble--nudge:hover::before {
    animation-play-state: paused;
}

.dravio-bubble svg {
    width: 28px;
    height: 28px;
}

.dravio-bubble-text {
    display: none;
}

/* Chat Window (Expanded State) */
.dravio-window {
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 100px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.dravio-header {
    background: var(--dravio-primary);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dravio-header-title strong {
    font-size: 16px;
    display: block;
}

.dravio-header-status {
    font-size: 12px;
    opacity: 0.9;
    display: block;
    margin-top: 2px;
}

.dravio-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.dravio-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Preview message bubble (v0.38.10) — server-rendered, CSS-animation revealed
   after a configurable delay (animation-delay set inline). Works even when
   page-speed plugins defer JS, because no JS is required to show it. */
.dravio-preview-message {
    position: absolute;
    bottom: 78px;
    right: 0;
    max-width: 320px;
    min-width: 220px;
    white-space: normal;
    background: #fff;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.4;
    padding: 12px 32px 12px 14px;
    border-radius: 12px 12px 4px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    z-index: 999998;

    /* Hidden until the keyframe runs */
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;

    animation: dravio-preview-reveal 0.45s cubic-bezier(.2,.9,.3,1.2) forwards;
    /* animation-delay is set inline per the Settings → Engagement → "Show after" value */
}
@keyframes dravio-preview-reveal {
    0%   { opacity: 0; transform: translateY(8px) scale(0.96); pointer-events: none; }
    99%  { pointer-events: none; }
    100% { opacity: 1; transform: translateY(0)   scale(1);    pointer-events: auto; }
}
.dravio-widget.dravio-widget--bottom-left .dravio-preview-message {
    right: auto;
    left: 0;
    border-radius: 12px 12px 12px 4px;
}
.dravio-preview-text {
    pointer-events: none;
}
.dravio-preview-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}
.dravio-preview-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Header action group + icon buttons (v0.38.7+) — bulletproof against
   site themes AND wp-admin-bar styles that bleed into the front-end when
   an admin is logged in. Uses #dravio-widget for max specificity + redeclares
   every property an admin-side stylesheet might override. */
#dravio-widget .dravio-window .dravio-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
    flex-wrap: nowrap !important;
}
#dravio-widget .dravio-window button.dravio-header-icon-btn,
#dravio-widget .dravio-window button.dravio-close-btn {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: #fff !important;
    border: 0 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    padding: 6px !important;
    margin: 0 !important;
    width: 32px !important;
    max-width: 32px !important;
    min-width: 0 !important;
    height: 32px !important;
    max-height: 32px !important;
    min-height: 0 !important;
    line-height: 1 !important;
    font-size: 0 !important;
    font-weight: 400 !important;
    text-transform: none !important;
    text-indent: 0 !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    transition: background 0.2s ease, transform 0.3s ease, opacity 0.2s ease !important;
}
#dravio-widget .dravio-window button.dravio-header-icon-btn {
    opacity: 0.85 !important;
}
#dravio-widget .dravio-window button.dravio-header-icon-btn:hover,
#dravio-widget .dravio-window button.dravio-header-icon-btn:focus,
#dravio-widget .dravio-window button.dravio-close-btn:hover,
#dravio-widget .dravio-window button.dravio-close-btn:focus {
    background: rgba(255, 255, 255, 0.18) !important;
    opacity: 1 !important;
    outline: none !important;
}
#dravio-widget .dravio-window button.dravio-header-icon-btn:hover {
    transform: rotate(-90deg) !important;
}
#dravio-widget .dravio-window button.dravio-header-icon-btn svg,
#dravio-widget .dravio-window button.dravio-close-btn svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    pointer-events: none !important;
}

/* Messages Container */
.dravio-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f7fa;
}

/* Message Bubbles */
.dravio-message {
    margin-bottom: 16px;
    display: flex;
}

.dravio-bot-message {
    justify-content: flex-start;
}

.dravio-user-message {
    justify-content: flex-end;
}

.dravio-message-content {
    max-width: 75%;
}

.dravio-message-text {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.dravio-bot-message .dravio-message-text {
    background: #fff;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.dravio-user-message .dravio-message-text {
    background: var(--dravio-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.dravio-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 8px;
}

/* Typing Indicator */
.dravio-typing {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    max-width: 60px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.dravio-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 2px;
    animation: dravio-typing-bounce 1.4s infinite;
}

.dravio-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.dravio-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dravio-typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Input Area */
.dravio-input-area {
    padding: 16px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

/* v0.42.0 — pill-style option buttons. Wraps horizontally (multiple pills
   per row) instead of a vertical list, matching modern chatbot UX
   patterns (CAASI/WellnessLiving reference design). Pills are outlined
   in the brand color with a light hover fill instead of the earlier
   inverted-color fill. */
.dravio-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.dravio-button {
    padding: 8px 18px;
    background: #fff;
    border: 1.5px solid var(--dravio-primary);
    color: var(--dravio-primary);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dravio-button:hover {
    background: color-mix(in srgb, var(--dravio-primary) 8%, #fff);
    color: var(--dravio-primary);
    border-color: var(--dravio-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.dravio-button:active {
    transform: translateY(0);
    background: color-mix(in srgb, var(--dravio-primary) 15%, #fff);
}

/* Text Input */
.dravio-text-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dravio-text-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.dravio-text-input:focus {
    border-color: var(--dravio-primary);
}

.dravio-send-btn {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px;
    border-radius: 50% !important;
    background: var(--dravio-primary) !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    transition: all 0.2s;
    overflow: visible;
}

.dravio-send-btn svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
}

.dravio-send-btn svg path {
    fill: currentColor !important;
}

.dravio-send-btn:hover {
    background: var(--dravio-primary-dark) !important;
    transform: scale(1.05);
}

.dravio-send-btn:active {
    transform: scale(0.95);
}

.dravio-multi-select {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
}

.dravio-multi-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #1f2937;
    transition: all 0.15s ease;
    user-select: none;
}

.dravio-multi-option:hover {
    border-color: var(--dravio-primary);
    background: #fafbff;
}

.dravio-multi-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--dravio-primary);
    cursor: pointer;
    margin: 0;
}

.dravio-multi-continue {
    margin-top: 8px;
    align-self: stretch;
}

.dravio-multi-continue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dravio-restart-btn {
    width: 100%;
    padding: 12px 16px;
    background: var(--dravio-primary);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.dravio-restart-btn:hover {
    background: var(--dravio-primary-dark);
    transform: translateY(-1px);
}

.dravio-restart-btn:active {
    transform: translateY(0);
}

/* Mobile Responsive — bottom-sheet pattern */
@media (max-width: 480px) {
    .dravio-widget {
        bottom: 0;
        right: 0;
        left: 0;
    }

    .dravio-bubble {
        bottom: 20px;
        right: 20px;
        position: fixed;
    }

    .dravio-widget.dravio-widget--bottom-left .dravio-bubble {
        right: auto;
        left: 20px;
    }

    /* Bottom-sheet: 85% of *dynamic* viewport so mobile browser toolbars don't
       crop the top of the window. Falls back to vh on browsers that ignore dvh. */
    .dravio-window {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 85vh;
        height: 85dvh;
        max-height: 85vh;
        max-height: 85dvh;
        border-radius: 16px 16px 0 0;
        /* Respect iOS home-indicator safe area so the input + branding don't
           hide behind the bottom bar */
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    /* Ensure the message scroll container actually grows + scrolls inside the sheet */
    .dravio-messages {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Input area: keep visible even when empty so the user always knows where
       input would appear; ensure it doesn't shrink when messages overflow */
    .dravio-input-area {
        flex-shrink: 0;
    }
    .dravio-branding {
        flex-shrink: 0;
    }
}

/* Scrollbar Styling */
.dravio-messages::-webkit-scrollbar {
    width: 6px;
}

.dravio-messages::-webkit-scrollbar-track {
    background: transparent;
}

.dravio-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.dravio-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* ============================================
   ACTION NODE STYLES (v0.29.0)
   ============================================ */

/* Lead Capture Form */
.dravio-lead-form {
    padding: 10px 0;
}

.dravio-form-field {
    margin-bottom: 15px;
}

.dravio-form-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.dravio-required {
    color: #d32f2f;
    margin-left: 2px;
}

.dravio-form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.dravio-form-input:focus {
    outline: none;
    border-color: var(--dravio-primary, #4A90E2);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.dravio-form-input.dravio-input-error {
    border-color: #d32f2f;
    background-color: #ffebee;
}

.dravio-form-input.dravio-input-error:focus {
    border-color: #d32f2f;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.1);
}

.dravio-submit-lead-btn {
    width: 100%;
    padding: 12px 20px;
    background-color: var(--dravio-primary, #4A90E2);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    margin-top: 5px;
}

.dravio-submit-lead-btn:hover {
    background-color: var(--dravio-primary-dark, #357ABD);
}

.dravio-submit-lead-btn:active {
    transform: translateY(1px);
}

.dravio-submit-lead-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* v0.39.4 — Link Button (renderLinkButton). Rendered in the input area so it
   feels like a prominent CTA at the end of a flow. Anchor tag, opens in target. */
.dravio-link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background-color: var(--dravio-primary, #4A90E2);
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: 0;
    text-align: center;
    line-height: 1.25;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    cursor: pointer;
}
.dravio-link-button:hover {
    background-color: var(--dravio-primary-dark, #357ABD);
    box-shadow: 0 4px 12px rgba(0,0,0,0.14);
    transform: translateY(-1px);
    color: #ffffff !important;
    text-decoration: none !important;
}
.dravio-link-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.10);
}
.dravio-link-button__arrow {
    display: inline-block;
    transition: transform 0.15s;
    font-weight: 700;
}
.dravio-link-button:hover .dravio-link-button__arrow {
    transform: translateX(3px);
}

/* Redirect Messages */
.dravio-redirect-message {
    padding: 15px;
    text-align: center;
}

.dravio-redirect-message p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
}

.dravio-redirect-message p:last-child {
    margin-bottom: 0;
}

/* Countdown without message (v0.29.1) */
.dravio-redirect-countdown {
    padding: 15px;
    text-align: center;
}

.dravio-countdown {
    font-weight: 600;
    color: var(--dravio-primary, #4A90E2);
    font-size: 16px;
}

.dravio-countdown span {
    font-size: 20px;
    font-weight: 700;
}

/* Animation for countdown */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.dravio-countdown span {
    display: inline-block;
    animation: pulse 1s infinite;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .dravio-form-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .dravio-submit-lead-btn {
        padding: 14px 20px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Accessibility improvements */
.dravio-form-input:focus,
.dravio-submit-lead-btn:focus {
    outline: 2px solid var(--dravio-primary, #4A90E2);
    outline-offset: 2px;
}

/* Loading state for submit button */
.dravio-submit-lead-btn:disabled::after {
    content: '...';
    animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

/* v0.42.0 — Unified footer bar: Reset (left) + Powered by (right),
   sitting BELOW the message input as a single horizontal bar. Replaces
   the earlier stand-alone `.dravio-branding` div + the header-mounted
   restart button. Matches the CAASI/WellnessLiving reference layout
   admins consistently expect from a modern chatbot. */
.dravio-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    line-height: 1;
    min-height: 44px;
    flex-shrink: 0;
}

.dravio-footer-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 6px 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    text-transform: uppercase;
    line-height: 1;
}

.dravio-footer-reset:hover {
    color: #1e293b;
    background: #f1f5f9;
}

.dravio-footer-reset svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    pointer-events: none;
}

/* Branding footer link (right side of the bar). Free shows "powered by
   Dravio" with a small logo; Pro can override text + URL via a filter
   for white-label agencies. See DRAVIO_PRO_Widget_Branding for the Pro
   extension. */
.dravio-branding {
    line-height: 1;
    text-align: right;
    display: inline-flex;
    align-items: center;
}

.dravio-branding a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.2s;
    text-transform: lowercase;
    font-weight: 500;
}

.dravio-branding a:hover {
    color: #475569;
}

.dravio-branding-logo {
    /* v0.42.3 — height-only sizing so the logo's natural aspect ratio is
       preserved (the Dravio wordmark is wider than tall — forcing it into
       a square was letterboxing it). max-width is a defensive guard for
       Pro users who upload custom logos with unusual aspect ratios. */
    height: 24px;
    width: auto;
    max-width: 90px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* AI Chat — Connect with our team button */
.dravio-connect-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 2px solid var(--dravio-primary, #4A90E2);
    color: var(--dravio-primary, #4A90E2);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.dravio-connect-btn:hover {
    background: var(--dravio-primary, #4A90E2);
    color: #fff;
}

/* ==========================================================================
   Survey Form
   ========================================================================== */

.dravio-survey-form {
    padding: 4px 0;
}

.dravio-survey-question {
    margin-bottom: 16px;
}

.dravio-survey-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 8px;
}

/* Rating stars */
.dravio-survey-rating {
    display: flex;
    gap: 4px;
}

.dravio-survey-star {
    width: 36px;
    height: 36px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #fff;
    font-size: 18px;
    color: #CBD5E1;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}

.dravio-survey-star:hover,
.dravio-survey-star.selected {
    color: #F59E0B;
    border-color: #F59E0B;
    background: #FFFBEB;
}

/* NPS scale */
.dravio-survey-nps {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.dravio-survey-nps-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #E2E8F0;
    border-radius: 4px;
    background: #fff;
    font-size: 11px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}

.dravio-survey-nps-btn:hover,
.dravio-survey-nps-btn.selected {
    background: var(--dravio-primary, #4A90E2);
    color: #fff;
    border-color: var(--dravio-primary, #4A90E2);
}

.dravio-survey-nps-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 10px;
    color: #94A3B8;
    margin-top: 4px;
}

/* Choice buttons */
.dravio-survey-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dravio-survey-choice-btn {
    padding: 6px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    background: #fff;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
}

.dravio-survey-choice-btn:hover,
.dravio-survey-choice-btn.selected {
    background: var(--dravio-primary, #4A90E2);
    color: #fff;
    border-color: var(--dravio-primary, #4A90E2);
}

/* Text input */
.dravio-survey-text {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}

.dravio-survey-text:focus {
    border-color: var(--dravio-primary, #4A90E2);
}

/* Submit button */
.dravio-survey-submit {
    margin-top: 8px;
    width: 100%;
}
