/* Local Inter Font Definitions */
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Regular.woff') format('woff'),
         url('fonts/Inter-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-SemiBold.woff') format('woff'),
         url('fonts/Inter-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* doubleSlash Chat Widget - Corporate Design */
:root {
    /* doubleSlash Brand Colors - Corporate Design */
    --ds-primary: #00759e;           /* ds-clickable */
    --ds-primary-hover: #0083b2;      /* ds-cyan-visited */
    --ds-primary-light: #eef8fe;     /* ds-drag */
    --ds-cyan: #00a5e1;               /* ds-cyan */
    --ds-cyan-visited: #0083b2;      /* ds-cyan-visited */
    --ds-secondary: #6d6d6d;          /* tertiary-tint */
    --ds-accent: #00759e;            /* ds-clickable */
    --ds-accent-hover: #0083b2;      /* ds-cyan-visited */
    
    /* UI Colors */
    --ds-white: #ffffff;              /* ds-base-background */
    --ds-gray-50: #f9f9f9;           /* ds-bright-background */
    --ds-gray-100: #f3f4f6;          /* gray-100 */
    --ds-gray-200: #e5e7eb;          /* gray-200 */
    --ds-gray-300: #d1d5db;          /* gray-300 */
    --ds-gray-400: #9ca3af;          /* gray-400 */
    --ds-gray-500: #6b7280;          /* gray-500 */
    --ds-gray-600: #4b5563;          /* gray-600 */
    --ds-gray-700: #374151;          /* gray-700 */
    --ds-gray-800: #1f2937;          /* gray-800 */
    --ds-gray-900: #111827;          /* gray-900 */
    
    /* Semantic Colors */
    --ds-success: #6b9714;          /* ds-green */
    --ds-warning: #db6a00;           /* ds-orange */
    --ds-error: #c63329;             /* ds-red */
    --ds-info: #00a5e1;              /* ds-cyan */
    --ds-bright-coral: #f36295;      /* ds-bright-coral */
    
    /* Text Colors */
    --ds-text-black: #000000;        /* text-black */
    --ds-text-white: #ffffff;        /* text-white */
    --ds-text-dark: #1f2937;         /* text-dark - same as gray-800 */
    --ds-text-disabled: #484848;     /* text-disabled */
    --ds-text-placeholder: #6d6d6d; /* text-placeholder */
    --ds-text-muted: #6d6d6d;        /* text-muted */
    
    /* Background Colors */
    --ds-bg-light: #f9f9f9;          /* ds-bright-background */
    --ds-bg-medium: #efefef;         /* ds-medium-background */
    --ds-bg-gradient: linear-gradient(to right, #efefef, #ffffff);
    --ds-label-bg-gradient: linear-gradient(to bottom, transparent 45%, white 45%);
    
    /* Border Colors */
    --ds-border-grey: #6d6d6d;       /* border-grey */
    --ds-border-light: #c6c6c6;     /* disabled-grey */
    
    /* Disabled Colors */
    --ds-disabled-grey: #c6c6c6;     /* disabled-grey */
    --ds-disabled-accessible: #6d6d6d; /* disabled-grey-accessible */
    
    /* Typography */
    --ds-font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --ds-font-size-xs: 0.75em;      /* 12px */
    --ds-font-size-sm: 0.875em;     /* 14px */
    --ds-font-size-base: 0.938em;   /* 15px - font-standard */
    --ds-font-size-lg: 1.125em;     /* 18px */
    --ds-font-size-xl: 1.25em;      /* 20px */
    
    /* Font Weights */
    --ds-font-standard: normal normal normal 0.938em/1.5em Inter;
    --ds-font-bold: normal normal 600 0.938em/1.5em Inter;
    --ds-font-button: normal normal 600 0.938em/1.5em Inter;
    --ds-font-info: normal normal normal 0.688em/0.813em Inter;
    
    /* Spacing - Corporate Design */
    --ds-spacing-xxs: 0.0625em;     /* 1px */
    --ds-spacing-xs: 0.25em;        /* 4px */
    --ds-spacing-sm: 0.375em;       /* 6px */
    --ds-spacing-md: 0.5em;         /* 8px */
    --ds-spacing-lg: 0.75em;        /* 12px */
    --ds-spacing-xl: 1em;          /* 16px */
    
    /* Component Sizes */
    --ds-component-height: 2.688em; /* component-height */
    
    /* Border Radius */
    --ds-radius-sm: 0.25em;         /* 4px */
    --ds-radius-md: 0.375em;       /* 6px - border-radius */
    --ds-radius-lg: 0.5em;         /* 8px */
    --ds-radius-xl: 1em;          /* 16px */
    --ds-radius-full: 50em;       /* pill */
    
    /* Shadows */
    --ds-shadow: 0 0 0.625em #0000001a;
    --ds-shadow-hover: 0 0 1.25em #0000001a;
    --ds-shadow-sm: 0 0.125em 0.25em rgba(0, 0, 0, 0.075);
    --ds-shadow-lg: 0 1em 3em rgba(0, 0, 0, 0.175);
    --ds-shadow-xl: 0 1.25em 3.5em rgba(0, 0, 0, 0.2);

    /* Transitions */
    --ds-transition-all: 0.3s ease all;
    --ds-transition-fast: 150ms ease-in-out;
    --ds-transition-normal: 300ms ease-in-out;
    --ds-transition-slow: 500ms ease-in-out;
    --ds-hover-delay: 0.5s;
    
    /* Label Animation */
    --ds-initial-label-position: translateY(2.175em);
    --ds-label-position-focus: translate(0.2813em, 0.75em) scale(0.7);
}

/* Reset and Base Styles for Widget */
.ds-widget-container,
.ds-widget-container * {
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

.ds-widget-container {
    position: fixed;
    bottom: 20px;
    right: 40px;
    z-index: 999990;
    font-family: var(--ds-font-family);
    font-size: 1.6rem; /* Base font-size for em calculations - isolates widget from host page */
    line-height: 1.5;
    color: var(--ds-gray-900);
    direction: ltr;
    max-width: 100vw;
    /* Ignore browser theme completely */
    color-scheme: light !important;
    forced-color-adjust: none !important;
}

/* Teaser Widget */
.ds-teaser-widget {
    position: absolute;
    bottom: 1rem;
    right: 6.5rem;
    white-space: nowrap;
    background: var(--ds-white);
    border: 0.0625em solid var(--ds-cyan);
    border-radius: 0.625em 0.625em 0;
    padding: 1em 2.5em 1em 1em;
    box-shadow: var(--ds-shadow-lg);
    min-width: 20rem;
    max-width: 30rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--ds-transition-normal);
    pointer-events: none;
    z-index: 6;
    cursor: pointer;
}

.ds-teaser-widget.ds-teaser-visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

/* Tooltip arrow pointing to toggle button */
.ds-teaser-widget::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    background-color: var(--ds-white);
    border: solid var(--ds-cyan);
    border-width: 0 0.0625em 0.0625em 0;
    display: inline-block;
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    padding: 0.3em;
    top: 93%;
    margin-top: -0.5em;
    right: -0.37em;
}

.ds-teaser-text {
    margin: 0;
    font-size: var(--ds-font-size-base);
    font-weight: 400;
    color: var(--ds-gray-900);
    line-height: 1.5;
}

.ds-teaser-close {
    position: absolute;
    top: 0.5em;
    right: 0.5em;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    color: var(--ds-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--ds-transition-fast);
    z-index: 10;
}

.ds-teaser-close:hover {
    color: var(--ds-primary-hover);
    transform: scale(1.1);
}

.ds-teaser-close svg {
    width: 16px;
    height: 16px;
}

/* Widget Toggle Button */
.ds-widget-toggle {
    position: relative;
    width: 5.3rem;
    height: 5.3rem;
    background: var(--ds-primary);
    border-radius: var(--ds-radius-full);
    box-shadow: var(--ds-shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ds-transition-normal);
    border: none;
    outline: none;
    z-index: 5;
}

.ds-widget-toggle:hover {
    background: var(--ds-primary-hover);
    transform: scale(1.05);
    box-shadow: var(--ds-shadow-xl);
}

.ds-widget-toggle:active {
    transform: scale(0.95);
}

.ds-toggle-icon {
    width: 3rem;
    height: 3rem;
    color: var(--ds-white);
    transition: all var(--ds-transition-fast);
}

/* Toggle icon always visible (no rotation animation) */

/* Notification Badge */
.ds-notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--ds-error);
    color: var(--ds-white);
    font-size: var(--ds-font-size-xs);
    font-weight: 600;
    width: 24px;
    height: 24px;
    border-radius: var(--ds-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Main Chat Window */
.ds-widget-window {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 380px;
    height: 600px;
    max-width: 100dvw;
    max-height: calc(100dvh); /* Adapts to available screen height */
    background: var(--ds-white);
    border-radius: var(--ds-radius-xl);
    box-shadow: 0 0 0.625em #0000001a;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all var(--ds-transition-normal);
    pointer-events: none;
    overflow: hidden;
    overflow-x: hidden;
    border: 1px solid var(--ds-gray-200);
    z-index: 10;
}

.ds-widget-open .ds-widget-window {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Hide toggle button when widget is open */
.ds-widget-open .ds-widget-toggle {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: opacity 200ms ease-out, visibility 200ms ease-out, transform 200ms ease-out;
}

/* Show toggle button when widget is closed */
.ds-widget-closed .ds-widget-toggle {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition: opacity 200ms ease-in, visibility 200ms ease-in, transform 200ms ease-in;
}

/* Chat Header */
.ds-chat-header {
    background: white;
    padding: var(--ds-spacing-lg) 0.25em;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-radius: var(--ds-radius-xl) var(--ds-radius-xl) 0 0;
}

.ds-header-content {
    display: flex;
    align-items: center;
    gap: 0.1em;
}

.ds-header-avatar {
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--ds-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ds-header-avatar svg {
    width: 2.4rem;
    height: 2.4rem;
    color: var(--ds-cyan);
}

.ds-header-info {
    flex: 1;
    min-width: 0;
}

.ds-header-title {
    font-size: var(--ds-font-size-lg);
    font-weight: 600;
    margin: 0 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ds-header-subtitle {
    font-size: var(--ds-font-size-sm);
    margin: 0;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ds-header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: var(--ds-spacing-xxs);
}

.ds-header-chat-reset {
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--ds-radius-md);
    color: var(--ds-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--ds-transition-all);
    pointer-events: all !important;
}

.ds-header-chat-reset:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

.ds-header-chat-reset svg {
    width: 1.8rem;
    height: 1.8rem;
}

.ds-header-close {
    width: 3.2rem;
    height: 3.2rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--ds-radius-md);
    color: var(--ds-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--ds-transition-all);
}

.ds-header-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ds-header-close svg {
    width: 2.4rem;
    height: 2.4rem;
}

/* Chat Messages */
.ds-chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--ds-spacing-md);
    padding-right: calc(var(--ds-spacing-xl) + 0.5rem);
    display: flex;
    flex-direction: column;
    gap: var(--ds-spacing-md);
    scroll-behavior: smooth;
}

.ds-chat-messages::-webkit-scrollbar {
    width: 0.4rem;
}

.ds-chat-messages.ds-scrollbar-expanded {
    padding-right: var(--ds-spacing-xl);
    transition: none;
    cursor: default;
}

.ds-chat-messages.ds-scrollbar-expanded::-webkit-scrollbar {
    width: 0.9rem;
}

.ds-chat-messages::-webkit-scrollbar-track {
    background: var(--ds-gray-100);
    border-radius: var(--ds-radius-sm);
}

.ds-chat-messages::-webkit-scrollbar-thumb {
    background: var(--ds-primary);
    border-radius: var(--ds-radius-sm);
}

.ds-chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--ds-primary-hover);
}

/* Input Scrollbar */
.ds-chat-input::-webkit-scrollbar {
    width: 0.3rem;
}

.ds-chat-input.ds-scrollbar-expanded {
    padding-right: calc(var(--ds-spacing-md) - 0.4rem);
    transition: none;
    cursor: default;
}

.ds-chat-input.ds-scrollbar-expanded::-webkit-scrollbar {
    width: 0.7rem;;
}

.ds-chat-input::-webkit-scrollbar-track {
    background: var(--ds-gray-100);
    border-radius: var(--ds-radius-sm);
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.ds-chat-input::-webkit-scrollbar-thumb {
    background: var(--ds-primary);
    border-radius: var(--ds-radius-sm);
}

.ds-chat-input::-webkit-scrollbar-thumb:hover {
    background: var(--ds-primary-hover);
}

/* Message Styles */
.ds-message {
    display: flex;
    gap: var(--ds-spacing-sm);
    align-items: flex-start;
}

.ds-message-user {
    flex-direction: row-reverse;
}

.ds-message-avatar {
    width: 32px;
    height: 32px;
    background: var(--ds-gray-200);
    border-radius: var(--ds-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ds-message-bot {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.ds-message-bot .ds-message-avatar {
    background: transparent;
    color: var(--ds-cyan);
}

.ds-message-user .ds-message-avatar {
    display: none;
}

.ds-message-avatar svg {
    width: 24px;
    height: 24px;
}

.ds-message-content {
    flex: 1;
    min-width: 0;
    max-width: 80%;
}

.ds-message-bubble {
    background: var(--ds-gray-100);
    border-radius: var(--ds-radius-lg);
    padding: var(--ds-spacing-md);
    position: relative;
    word-wrap: break-word;
}

.ds-message-bot .ds-message-bubble {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    color: var(--ds-text-dark);
}

.ds-message-bot .ds-message-bubble::after {
    display: none;
}

.ds-message-user .ds-message-bubble {
    background: var(--ds-bg-medium);
    color: var(--ds-text-black);
    border-radius: 0.625em;
}

.ds-message-user .ds-message-bubble::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    background-color: var(--ds-bg-medium);
    border: solid var(--ds-bg-medium);
    border-width: 0 0.0625em 0.0625em 0;
    display: inline-block;
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    padding: 0.1812em;
    bottom: 0.5em;
    right: -0.2294em;
}

.ds-message-bubble p {
    margin: 0 0 var(--ds-spacing-sm) 0;
}

.ds-message-bubble p:last-child {
    margin-bottom: 0;
}

.ds-message-time {
    font-size: var(--ds-font-size-xs);
    color: var(--ds-gray-500);
    margin-top: var(--ds-spacing-xs);
    padding: 0 var(--ds-spacing-sm);
}

.ds-message-user .ds-message-time {
    text-align: right;
}

/* Typing Indicator */
.ds-typing-indicator {
    animation: fadeIn var(--ds-transition-normal);
    padding: var(--ds-spacing-md);
}

.ds-typing-dots {
    display: flex;
    align-items: center;
    gap: var(--ds-spacing-xs);
    padding: var(--ds-spacing-md);
    background: var(--ds-white);
}

.ds-typing-dot {
    width: 8px;
    height: 8px;
    background: var(--ds-gray-400);
    border-radius: var(--ds-radius-full);
    animation: typingDot 1.4s infinite ease-in-out;
}

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

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

@keyframes typingDot {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    30% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Quick Actions */
.ds-quick-actions {
    padding: 1em;
    display: flex;
    flex-direction: column;
    gap: var(--ds-spacing-sm);
    border-top: 1px solid var(--ds-gray-200);
    background: var(--ds-gray-50);
}

.ds-quick-action-btn {
    /* Secondary Button Base Styles */
    background: transparent;
    border: none;
    border-radius: 2em;
    padding: 0 2.5em;
    height: 37px;
    min-width: 6.5em;
    max-width: 100%;
    width: fit-content;
    text-wrap: nowrap;
    overflow: hidden;
    font-family: Inter;
    font-size: 0.938em;
    font-weight: 600;
    line-height: 1.5em;
    color: var(--ds-accent);
    box-shadow: inset var(--ds-accent) 0 0 0 0.125em;
    cursor: pointer;
    transition: var(--ds-transition-all);
    text-align: left;
    box-sizing: border-box;
}

.ds-quick-action-btn:hover:not(:disabled):not(.disabled) {
    transform: translateY(-1%) scale(1.04);
}

.ds-quick-action-btn:active:not(:disabled):not(.disabled) {
    transform: translateY(1%) scale(1);
}

.ds-quick-action-btn:focus-visible {
    box-shadow: inset var(--ds-accent) 0 0 0 0.16em;
}

.ds-quick-action-btn:disabled,
.ds-quick-action-btn.disabled {
    color: var(--ds-text-disabled);
    box-shadow: inset var(--ds-disabled-grey) 0 0 0 0.125em;
    pointer-events: none;
}

.ds-quick-action-btn svg {
    width: 16px;
    height: 16px;
    margin-right: 0.5em;
    flex-shrink: 0;
}

/* Action Buttons in Chat Messages */
.ds-action-button {
    /* Secondary Button Base Styles */
    background: transparent;
    border: none;
    border-radius: 2em;
    padding: 0 2.5em;
    height: 37px;
    min-width: 6.5em;
    max-width: 100%;
    width: fit-content;
    text-wrap: nowrap;
    overflow: hidden;
    font-family: Inter;
    font-size: 0.938em;
    font-weight: 600;
    line-height: 1.5em;
    color: var(--ds-accent);
    box-shadow: inset var(--ds-accent) 0 0 0 0.125em;
    cursor: pointer;
    transition: var(--ds-transition-all);
    text-align: left;
    box-sizing: border-box;
    margin: var(--ds-spacing-sm) var(--ds-spacing-sm) var(--ds-spacing-sm) 0;
    display: inline-flex;
    align-items: center;
}

.ds-action-button:hover:not(:disabled):not(.disabled) {
    transform: translateY(-1%) scale(1.04);
}

.ds-action-button:active:not(:disabled):not(.disabled) {
    transform: translateY(1%) scale(1);
}

.ds-action-button:focus-visible {
    box-shadow: inset var(--ds-accent) 0 0 0 0.16em;
}

.ds-action-button:disabled,
.ds-action-button.disabled {
    color: var(--ds-text-disabled);
    box-shadow: inset var(--ds-disabled-grey) 0 0 0 0.125em;
    pointer-events: none;
}

.ds-action-button svg {
    width: 16px;
    height: 16px;
    margin-right: 0.5em;
    flex-shrink: 0;
}

/* Primary Links in Chat Messages */
.ds-message-bubble a {
    text-decoration: none;
    color: var(--ds-accent);
    font: var(--ds-font-bold);
    border: none !important;
    background-image: none;
    background-repeat: no-repeat;
    background-position: 50% 100%;
    padding-bottom: 0;
    position: relative;
    white-space: normal;
    background-size: 0;
    display: inline;
    transition: 200ms;
    align-items: flex-start;
    word-break: break-word;
    overflow-wrap: break-word;
    font-size: inherit;
}

.ds-message-bubble a:hover {
    background-size: 0;
    text-decoration: none;
}

.ds-message-bubble a:focus-visible {
    outline: 0.125em solid var(--ds-border-grey);
    outline-offset: 0.25em;
    border-radius: 0.01em;
    text-decoration: none;
}

.ds-message-bubble a:focus:not(:focus-visible) {
    outline: none;
}

.ds-message-bubble a:active {
    text-decoration: none;
}

.ds-message-bubble a img,
.ds-message-bubble a svg {
    margin-right: 0.5em;
    transition: transform 300ms ease-in-out;
    position: relative;
    top: 4px;
}

.ds-message-bubble a:hover img,
.ds-message-bubble a:hover svg {
    transform: translate(0.3125em);
}

.ds-message-bubble a .bi {
    font-size: 0.688em;
    color: var(--ds-accent);
    -webkit-text-stroke: 0.0313em;
}

.ds-message-bubble a .bi::before {
    height: 0.688em;
    vertical-align: baseline;
    padding-right: 0.3125em;
}

a.ds-phone-link {
    display: inline-flex;
}

/* Chat Input Area */
.ds-chat-input-area {
    background: var(--ds-white);
    border-radius: 0 0 var(--ds-radius-xl) var(--ds-radius-xl);
    max-width: 100%;
}

.ds-input-container {
    padding: 1em 1em 0.5em 1em;
    display: flex;
    align-items: flex-end;
    max-width: 100%;
}

/* Form Group for Floating Label */
.ds-form-group {
    flex: 1;
    position: relative;
    display: flex;
    flex-flow: column-reverse;
    background: var(--ds-white);
    border-radius: 0.625em;
    width: 100%;
}

.ds-chat-input {
    border: 0.0625em solid var(--ds-primary);
    border-radius: 0.625em;
    height: 37px;
    padding-left: var(--ds-spacing-xl);
    padding-right: 3em;
    padding-top: 0.5em;
    box-sizing: border-box;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.938em;
    font-weight: normal;
    line-height: 1.5;
    color: var(--ds-text-black);
    background: var(--ds-white);
    resize: none;
    outline: none;
    transition: var(--ds-transition-all);
    min-height: var(--ds-component-height);
    max-height: 120px;
    width: 100%;
    overflow-x: hidden;
}

.ds-chat-input:active,
.ds-chat-input:focus {
    box-shadow: none;
    border-color: var(--ds-primary);
}

/* Floating Label Styles */
.ds-input-label {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: inline-block;
    margin-bottom: 0;
    transition: var(--ds-transition-all);
    touch-action: manipulation;
    width: fit-content;
    pointer-events: none;
    padding-left: var(--ds-spacing-xl);
    padding-right: 1.875em;
    color: var(--ds-text-placeholder);
    font: var(--ds-font-standard);
    max-width: calc(100% - 2em);
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    cursor: text;
}

.ds-chat-input:placeholder-shown + .ds-input-label {
    cursor: text;
    max-width: 66.66%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translateY(-50%);
    color: var(--ds-text-placeholder);
}

.ds-chat-input:not(:placeholder-shown) + .ds-input-label,
.ds-chat-input:-webkit-autofill + .ds-input-label,
.ds-chat-input:focus + .ds-input-label,
.ds-input-label.ds-label-floating {
    color: var(--ds-primary);
    transform: translateY(-0.75em) scale(0.85);
    background: var(--ds-white);
    padding: 0 var(--ds-spacing-md);
    left: var(--ds-spacing-md);
    font-weight: 400;
    z-index: 10;
    border-radius: var(--ds-radius-sm);
    box-shadow: 0 0 0 2px var(--ds-white);
    position: absolute;
    top: 0;
}

.ds-send-button {
    position: absolute;
    bottom: calc(0.5em - 3px);
    right: 0.5em;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--ds-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ds-transition-all);
    flex-shrink: 0;
    border-radius: var(--ds-radius-md);
}

.ds-send-button:hover:not(:disabled) svg {
    transform: rotate(15deg);
}

.ds-send-button:active:not(:disabled) svg {
    transform: rotate(35deg) scale(0.9);
}

.ds-send-button:disabled {
    color: var(--ds-disabled-grey);
    cursor: not-allowed;
}

.ds-send-button svg {
    width: 20px;
    height: 20px;
    transition: transform 200ms ease-in-out;
}

.ds-input-footer {
    padding: 0 1em var(--ds-spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.ds-powered-by {
    font: var(--ds-font-info);
    color: var(--ds-text-muted);
}

.ds-char-counter {
    font: var(--ds-font-info);
    color: var(--ds-text-muted);
}

.ds-char-counter.ds-char-limit-warning {
    color: var(--ds-warning);
}

.ds-char-counter.ds-char-limit-error {
    color: var(--ds-error);
}

/* Disclaimer Dropdown */
.ds-disclaimer-wrapper {
    position: relative;
}

.ds-disclaimer-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    font: var(--ds-font-info);
    color: var(--ds-text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ds-disclaimer-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--ds-text-primary);
}

.ds-disclaimer-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.ds-disclaimer-toggle[aria-expanded="true"] .ds-disclaimer-icon {
    transform: rotate(180deg);
}

.ds-disclaimer-dropdown {
    max-height: 0;
    overflow: hidden;
    border-top: 1px solid transparent;
    transition: max-height 0.4s ease-in-out, border-color 0.3s ease;
    width: 100%;
}

.ds-disclaimer-dropdown.ds-show {
    max-height: 30rem;
    overflow: hidden;
    border-top-color: var(--ds-gray-200);
    scroll-behavior: smooth;
    background: var(--ds-gray-50);
}

.ds-disclaimer-dropdown.ds-scrollable {
    overflow-y: auto;
    overflow-x: hidden;
}

/* Disclaimer Scrollbar */
.ds-disclaimer-dropdown.ds-scrollable::-webkit-scrollbar {
    width: 0.4rem;
}

.ds-disclaimer-dropdown.ds-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.ds-disclaimer-dropdown.ds-scrollable::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: var(--ds-radius-sm);
    transition: background 0.3s ease 0.4s;
}

.ds-disclaimer-dropdown.ds-scrollable:hover::-webkit-scrollbar-thumb {
    background: var(--ds-primary);
    transition-delay: 0.4s;
}

.ds-disclaimer-dropdown.ds-scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--ds-primary-hover);
}

.ds-disclaimer-content {
    padding: 1.25rem 2rem;
    font: var(--ds-font-info);
    color: var(--ds-text-primary);
    background: var(--ds-gray-50);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
    max-height: none;
}

.ds-disclaimer-dropdown.ds-show .ds-disclaimer-content {
    opacity: 1;
    transform: translateY(0);
}

.ds-disclaimer-content a {
    color: var(--ds-primary);
    text-decoration: none;
}

.ds-disclaimer-content a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Mobile Responsive - Small width */
@media (max-width: 480px) {
    .ds-widget-container {
        bottom: 20px;
        right: 15px;
        width: fit-content;
        height: auto;
        left: auto;
        top: auto;
    }

    /* Expand container when teaser is visible */
    .ds-widget-container:has(.ds-teaser-visible) {
        width: calc(100dvw - 30px);
    }

    /* Full screen only when widget is open */
    .ds-widget-container.ds-widget-open {
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        width: 100dvw;
        max-height: calc(100vh - 4rem);
        border-radius: 0;
    }
    
    .ds-widget-window {
        width: 100dvw;
        height: 100dvh;
        border-radius: 0;
        box-shadow: none;
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
    }

    .ds-teaser-widget {
        bottom: 3rem;
        right: 8.5rem;
    }
    
    .ds-widget-toggle {
        position: absolute;
        right: 15px;
        bottom: 20px;
    }
    
    .ds-chat-header {
        padding: var(--ds-spacing-md);
        border-radius: 0;
    }
    
    .ds-header-title {
        font-size: var(--ds-font-size-base);
    }
    
    .ds-header-subtitle {
        font-size: var(--ds-font-size-xs);
    }
    
    .ds-chat-messages {
        height: calc(100dvh - 140px); /* Adjust for header and input area */
    }
}

/* Mobile Responsive - Small height (landscape mode) */
@media (max-height: 479px) {
    .ds-widget-container {
        bottom: 20px;
        right: 15px;
        width: auto;
        height: auto;
        left: auto;
        top: auto;
    }

    /* Expand container when teaser is visible */
    .ds-widget-container:has(.ds-teaser-visible) {
        width: calc(100dvw - 30px);
        max-width: 100dvw;
    }

    /* Full screen only when widget is open */
    .ds-widget-container.ds-widget-open {
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        width: 100dvw;
        height: 100dvh;
        border-radius: 0;
    }
    
    .ds-widget-window {
        width: 100dvw;
        height: 100dvh;
        border-radius: 0;
        box-shadow: none;
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
    }
    
    .ds-widget-toggle {
        position: absolute;
        right: 15px;
        bottom: 20px;
    }

    .ds-teaser-widget {
        bottom: 3rem;
        right: 8.5rem;
    }
    
    .ds-chat-header {
        padding: var(--ds-spacing-md);
        border-radius: 0;
    }
    
    .ds-header-title {
        font-size: var(--ds-font-size-base);
    }
    
    .ds-header-subtitle {
        font-size: var(--ds-font-size-xs);
    }
    
    .ds-chat-messages {
        height: calc(100dvh - 140px); /* Adjust for header and input area */
    }
}

@media (max-width: 360px) {
    .ds-widget-window {
        height: 100dvh;
    }
    
    .ds-message-content {
        max-width: 85%;
    }
}

/* Fallback for browsers that don't support dvh units (older Android browsers) */
@supports not (height: 100dvh) {
    /* Base widget window styles */
    .ds-widget-window {
        max-width: 100vw;
        max-height: calc(100vh);
    }

    /* Mobile Responsive - matches the main mobile breakpoint */
    @media (max-width: 480px) {
        .ds-widget-container:has(.ds-teaser-visible) {
            width: calc(100vw - 30px);
        }

        .ds-widget-container.ds-widget-open {
            width: 100vw;
            height: 100vh;
        }

        .ds-widget-window {
            width: 100vw;
            height: 100vh;
        }

        .ds-chat-messages {
            height: calc(100vh - 140px);
        }
    }

    /* Small height (landscape mode) - for Android phones in landscape */
    @media (max-height: 479px) {
        .ds-widget-container:has(.ds-teaser-visible) {
            width: calc(100vw - 30px);
            max-width: 100vw;
        }

        .ds-widget-container.ds-widget-open {
            width: 100vw;
            height: 100vh;
        }

        .ds-widget-window {
            width: 100vw;
            height: 100vh;
        }

        .ds-chat-messages {
            height: calc(100vh - 140px);
        }
    }

    /* Very small devices */
    @media (max-width: 360px) {
        .ds-widget-window {
            height: 100vh;
        }
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --ds-gray-300: #999999;
        --ds-gray-400: #777777;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Force Inter font for all widget elements */
.ds-widget-container,
.ds-widget-container *,
.ds-widget-container input,
.ds-widget-container textarea,
.ds-widget-container button,
.ds-widget-container p,
.ds-widget-container div,
.ds-widget-container span,
.ds-widget-container a,
.ds-widget-container strong,
.ds-widget-container em {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Specific font weights for different elements */
.ds-header-title,
.ds-quick-action-btn,
.ds-action-button,
.ds-send-button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 600 !important;
}

.ds-message-bubble,
.ds-chat-input,
.ds-input-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 400 !important;
}

.ds-message-bubble strong {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 600 !important;
}

.ds-message-bubble em {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 400 !important;
    font-style: italic !important;
}

/* Theme is completely ignored by the widget */
