*, ::before, ::after {
    --tw-border-spacing-x: 0;
    --tw-border-spacing-y: 0;
    --tw-translate-x: 0;
    --tw-translate-y: 0;
    --tw-rotate: 0;
    --tw-skew-x: 0;
    --tw-skew-y: 0;
    --tw-scale-x: 1;
    --tw-scale-y: 1;
    --tw-pan-x:  ;
    --tw-pan-y:  ;
    --tw-pinch-zoom:  ;
    --tw-scroll-snap-strictness: proximity;
    --tw-gradient-from-position:  ;
    --tw-gradient-via-position:  ;
    --tw-gradient-to-position:  ;
    --tw-ordinal:  ;
    --tw-slashed-zero:  ;
    --tw-numeric-figure:  ;
    --tw-numeric-spacing:  ;
    --tw-numeric-fraction:  ;
    --tw-ring-inset:  ;
    --tw-ring-offset-width: 0px;
    --tw-ring-offset-color: #fff;
    --tw-ring-color: rgba(59, 130, 246, 0.5);
    --tw-ring-offset-shadow: 0 0 rgba(0,0,0,0);
    --tw-ring-shadow: 0 0 rgba(0,0,0,0);
    --tw-shadow: 0 0 rgba(0,0,0,0);
    --tw-shadow-colored: 0 0 rgba(0,0,0,0);
    --tw-blur:  ;
    --tw-brightness:  ;
    --tw-contrast:  ;
    --tw-grayscale:  ;
    --tw-hue-rotate:  ;
    --tw-invert:  ;
    --tw-saturate:  ;
    --tw-sepia:  ;
    --tw-drop-shadow:  ;
    --tw-backdrop-blur:  ;
    --tw-backdrop-brightness:  ;
    --tw-backdrop-contrast:  ;
    --tw-backdrop-grayscale:  ;
    --tw-backdrop-hue-rotate:  ;
    --tw-backdrop-invert:  ;
    --tw-backdrop-opacity:  ;
    --tw-backdrop-saturate:  ;
    --tw-backdrop-sepia:  ;
    --tw-contain-size:  ;
    --tw-contain-layout:  ;
    --tw-contain-paint:  ;
    --tw-contain-style:  ;
}

::backdrop {
    --tw-border-spacing-x: 0;
    --tw-border-spacing-y: 0;
    --tw-translate-x: 0;
    --tw-translate-y: 0;
    --tw-rotate: 0;
    --tw-skew-x: 0;
    --tw-skew-y: 0;
    --tw-scale-x: 1;
    --tw-scale-y: 1;
    --tw-pan-x:  ;
    --tw-pan-y:  ;
    --tw-pinch-zoom:  ;
    --tw-scroll-snap-strictness: proximity;
    --tw-gradient-from-position:  ;
    --tw-gradient-via-position:  ;
    --tw-gradient-to-position:  ;
    --tw-ordinal:  ;
    --tw-slashed-zero:  ;
    --tw-numeric-figure:  ;
    --tw-numeric-spacing:  ;
    --tw-numeric-fraction:  ;
    --tw-ring-inset:  ;
    --tw-ring-offset-width: 0px;
    --tw-ring-offset-color: #fff;
    --tw-ring-color: rgba(59, 130, 246, 0.5);
    --tw-ring-offset-shadow: 0 0 rgba(0,0,0,0);
    --tw-ring-shadow: 0 0 rgba(0,0,0,0);
    --tw-shadow: 0 0 rgba(0,0,0,0);
    --tw-shadow-colored: 0 0 rgba(0,0,0,0);
    --tw-blur:  ;
    --tw-brightness:  ;
    --tw-contrast:  ;
    --tw-grayscale:  ;
    --tw-hue-rotate:  ;
    --tw-invert:  ;
    --tw-saturate:  ;
    --tw-sepia:  ;
    --tw-drop-shadow:  ;
    --tw-backdrop-blur:  ;
    --tw-backdrop-brightness:  ;
    --tw-backdrop-contrast:  ;
    --tw-backdrop-grayscale:  ;
    --tw-backdrop-hue-rotate:  ;
    --tw-backdrop-invert:  ;
    --tw-backdrop-opacity:  ;
    --tw-backdrop-saturate:  ;
    --tw-backdrop-sepia:  ;
    --tw-contain-size:  ;
    --tw-contain-layout:  ;
    --tw-contain-paint:  ;
    --tw-contain-style:  ;
}

:root {
    --br-color-primary: #22c55e;
    --br-color-primary-dark: #16a34a;
    --br-color-label: #ffffff;
    --br-color-container-bg: #1a1a2e;
    --br-color-chat-bg: #ffffff;
    --br-color-text-container: #ffffff;
    --br-color-button-text: #0C2340;
    --br-color-text-chat: #1e293b;
    --br-color-user-bubble-bg: #EFFEFF;
    --br-color-user-bubble-border: #5CC2F0;
    --br-color-ai-bubble-bg: #DAF8E1;
    --br-color-ai-bubble-border: #45DC6B;
    --br-button-radius: 8px;
    --br-bubble-radius: 5px;
}

/* ---- Main Layout ---- */

.br-budget-recommendation {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.br-budget-chat {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: #1a1a2e;
    background: var(--br-color-container-bg);
}

.br-budget-chat__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}

.br-budget-chat__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 32px;
    gap: 32px;
    border-radius: 5px;
    border-radius: var(--br-bubble-radius);
    overflow: hidden;
}

@media (max-width: 768px) {
    .br-budget-chat__container {
        grid-template-columns: 1fr;
    }
}

.br-budget-chat__form-column {
    padding: 24px 0;
    display: flex;
}

.br-budget-chat__chat-column {
    padding: 24px 0;
}

.br-budget-chat__privacy {
    margin-top: 12px;
    padding-bottom: 12px;
    font-size: 12px;
    color: #ffffff;
    text-align: center;
}

.br-budget-chat__privacy a {
    color: #ffffff !important;
    -webkit-text-decoration: none !important;
    text-decoration: none !important;
}

.br-budget-chat__privacy a:hover {
    -webkit-text-decoration: underline !important;
    text-decoration: underline !important;
}

/* ---- Input Form ---- */

.br-input-form {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.br-budget-chat .br-input-form__headline {
    color: #22c55e;
    color: var(--br-color-primary);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 32px 0;
}

.br-input-form__field {
    margin-bottom: 16px;
}

.br-budget-chat .br-input-form__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    margin-top: 32px;
    background: #22c55e !important;
    background: var(--br-color-primary) !important;
    color: #0C2340 !important;
    color: var(--br-color-button-text) !important;
    font-size: 16px;
    font-weight: 600;
    border: none !important;
    border-radius: 8px;
    border-radius: var(--br-button-radius);
    cursor: pointer;
    transition: opacity 0.2s;
}

.br-input-form__cta-icon {
    flex-shrink: 0;
}

.br-input-form__cta-icon-img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    -o-object-fit: cover;
       object-fit: cover;
    flex-shrink: 0;
}

.br-budget-chat .br-input-form__cta:hover:not(:disabled),
.br-budget-chat .br-input-form__cta:focus:not(:disabled),
.br-budget-chat .br-input-form__cta:active:not(:disabled),
.br-budget-chat button.br-input-form__cta:hover,
.br-budget-chat button.br-input-form__cta:focus,
.br-budget-chat button.br-input-form__cta:active {
    opacity: 0.85;
    background: #22c55e !important;
    background: var(--br-color-primary) !important;
    color: #0C2340 !important;
    color: var(--br-color-button-text) !important;
    border-color: transparent !important;
    border-radius: 8px !important;
    border-radius: var(--br-button-radius) !important;
    box-shadow: none !important;
}

.br-budget-chat .br-input-form__cta:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- Autocomplete ---- */

.br-autocomplete {
    position: relative;
}

.br-autocomplete__label {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff !important;
    color: var(--br-color-label) !important;
    margin-bottom: 6px;
}

.br-autocomplete__input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.br-autocomplete__icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.br-budget-chat .br-autocomplete__input {
    width: 100%;
    max-height: 48px;
    padding: 12px 12px 12px 42px !important;
    font-size: 15px;
    font-weight: 400 !important;
    border: 2px solid #e2e8f0;
    border-radius: calc(8px + 4px);
    border-radius: calc(var(--br-button-radius) + 4px);
    background: #ffffff;
    background: var(--br-color-chat-bg);
    color: #1e293b;
    color: var(--br-color-text-chat);
    outline: none;
    transition: border-color 0.2s;
}

.br-budget-chat .br-autocomplete__input::-moz-placeholder {
    color: #94a3b8;
}

.br-budget-chat .br-autocomplete__input::placeholder {
    color: #94a3b8;
}

.br-budget-chat .br-autocomplete__input:focus {
    border-color: #22c55e;
    border-color: var(--br-color-primary);
}

.br-autocomplete__spinner {
    position: absolute;
    right: 12px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #22c55e;
    border-top-color: var(--br-color-primary);
    border-radius: 50%;
    animation: br-spin 0.6s linear infinite;
}

@keyframes br-spin {
    to { transform: rotate(360deg); }
}

.br-budget-chat .br-autocomplete__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin: 4px 0 0 0;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 4px 0;
}

.br-autocomplete__dropdown li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.br-budget-chat .br-autocomplete__option {
    display: block;
    width: 100%;
    padding: 10px 14px;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
    color: #1e293b;
    color: var(--br-color-text-chat);
    background: transparent;
    border: none;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    -webkit-text-decoration: none;
    text-decoration: none;
}

.br-budget-chat .br-autocomplete__option:hover,
.br-budget-chat .br-autocomplete__option:focus {
    background: #f1f5f9;
    color: #1e293b;
    color: var(--br-color-text-chat);
    -webkit-text-decoration: none;
    text-decoration: none;
    outline: none;
    box-shadow: none;
}

/* ---- Chat Window ---- */

.br-budget-chat .br-chat-window {
    background: #ffffff;
    background: var(--br-color-chat-bg);
    border-radius: 5px;
    border-radius: var(--br-bubble-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 520px;
}

.br-chat-window__header {
    padding: 16px 20px;
    background: #D4D5D8;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.br-chat-window__header-text {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    color: var(--br-color-text-chat);
}


.br-chat-window__messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
}

.br-chat-window__input-area {
    padding: 12px 16px;
    background: #D4D5D8;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0;
    border-radius: 8px;
    border-radius: var(--br-button-radius);
    margin: 12px 16px;
    padding: 6px 6px 6px 12px;
    background: #e5e5ea;
    border-top: none;
}

.br-budget-chat .br-chat-window__input {
    flex: 1;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 400 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #8e8e93;
    outline: none !important;
    box-shadow: none !important;
}

.br-chat-window__input:disabled {
    cursor: not-allowed;
    opacity: 1;
}

.br-budget-chat .br-chat-window__send-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #8C8C8C !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: visible;
    padding: 0 !important;
}

.br-budget-chat .br-chat-window__send-btn svg {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px;
    min-height: 17px;
}

.br-budget-chat .br-chat-window__send-btn:disabled {
    opacity: 1;
    cursor: not-allowed;
}

.br-budget-chat .br-chat-window__send-btn:hover {
    border-radius: 50% !important;
}

/* ---- Chat Bubbles ---- */

.br-chat-bubble {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.br-chat-bubble--user {
    justify-content: flex-end;
}

.br-chat-bubble--ai {
    justify-content: flex-start;
}

.br-chat-bubble__avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.br-chat-bubble__avatar-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #22c55e;
    border: 2px solid var(--br-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0C2340;
    color: var(--br-color-button-text, #0C2340);
}

.br-chat-bubble__avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    -o-object-fit: cover;
       object-fit: cover;
}

.br-chat-bubble__avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1e293b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.br-chat-bubble--user .br-chat-bubble__avatar-ring {
    border-color: #5CC2F0;
    border-color: var(--br-color-user-bubble-border, #5CC2F0);
    background: #EFFEFF;
    background: var(--br-color-user-bubble-bg, #EFFEFF);
}

.br-budget-chat .br-chat-bubble__content {
    max-width: 60%;
    padding: 12px 16px;
    border-radius: 5px;
    border-radius: var(--br-bubble-radius);
    font-size: 14px;
    line-height: 1.5;
}

.br-budget-chat .br-chat-bubble--user .br-chat-bubble__content {
    position: relative;
    background: #EFFEFF;
    background: var(--br-color-user-bubble-bg, #EFFEFF);
    color: #1e293b;
    color: var(--br-color-text-chat);
    border: 1px solid #5CC2F0;
    border: 1px solid var(--br-color-user-bubble-border, #5CC2F0);
}

.br-budget-chat .br-chat-bubble--user .br-chat-bubble__content::before {
    content: '';
    position: absolute;
    top: 14px;
    right: -9px;
    border: 8px solid transparent;
    border-left-color: #5CC2F0;
    border-left-color: var(--br-color-user-bubble-border, #5CC2F0);
    border-right: 0;
}

.br-budget-chat .br-chat-bubble--user .br-chat-bubble__content::after {
    content: '';
    position: absolute;
    top: 15px;
    right: -7px;
    border: 7px solid transparent;
    border-left-color: #5CC2F0;
    border-left-color: var(--br-color-user-bubble-border, #5CC2F0);
    border-right: 0;
}

.br-budget-chat .br-chat-bubble--ai .br-chat-bubble__content {
    position: relative;
    background: #DAF8E1;
    background: var(--br-color-ai-bubble-bg, #DAF8E1);
    color: #1e293b;
    color: var(--br-color-text-chat);
    border: 1px solid #45DC6B;
    border: 1px solid var(--br-color-ai-bubble-border, #45DC6B);
}

.br-budget-chat .br-chat-bubble--ai .br-chat-bubble__content::before {
    content: '';
    position: absolute;
    top: 14px;
    left: -9px;
    border: 8px solid transparent;
    border-right-color: #45DC6B;
    border-right-color: var(--br-color-ai-bubble-border, #45DC6B);
    border-left: 0;
}

.br-budget-chat .br-chat-bubble--ai .br-chat-bubble__content::after {
    content: '';
    position: absolute;
    top: 15px;
    left: -7px;
    border: 7px solid transparent;
    border-right-color: #45DC6B;
    border-right-color: var(--br-color-ai-bubble-border, #45DC6B);
    border-left: 0;
}

.br-chat-bubble__content--error {
    background: #fef2f2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca;
}

.br-chat-bubble__text {
    margin: 0;
    white-space: pre-wrap;
}

/* ---- Action Buttons ---- */

.br-budget-chat__actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    margin-left: 58px;
}

.br-budget-chat .br-budget-chat__action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #0C2340 !important;
    color: var(--br-color-button-text) !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px;
    border-radius: var(--br-button-radius);
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    line-height: 1.4;
}

.br-budget-chat .br-budget-chat__action-btn svg {
    flex-shrink: 0;
    fill: currentColor;
}

.br-budget-chat .br-budget-chat__action-btn:hover {
    background: #f3f4f6 !important;
}

/* ---- Loading ---- */

.br-chat-bubble__avatar-ring--loading {
    position: relative;
    border-color: transparent;
}

.br-chat-bubble__avatar-ring--loading::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #22c55e;
    border-top-color: var(--br-color-primary);
    animation: br-ring-spin 1s linear infinite;
}

@keyframes br-ring-spin {
    to { transform: rotate(360deg); }
}

.br-chat-bubble__loading-text {
    font-size: 14px;
    color: #64748b;
    align-self: center;
    font-style: italic;
}

/* ---- Suggest Labels ---- */

.br-suggest-label {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

.br-suggest-label--region { background: #dbeafe; color: #1e40af; }
.br-suggest-label--landkreis { background: #fce7f3; color: #9d174d; }
.br-suggest-label--bezirk { background: #fef3c7; color: #92400e; }
.br-suggest-label--bundesland { background: #d1fae5; color: #065f46; }
.br-suggest-label--land { background: #e0e7ff; color: #3730a3; }

.br-suggest-separator {
    border-top: 1px solid #e2e8f0;
    margin: 4px 0;
}

