:root {
    --abr-brand: #823000;
    --abr-dark: #1b1b1b;
    --abr-text: #242424;
    --abr-muted: #6b6b6b;
    --abr-border: #dedede;
    --abr-bg: #ffffff;
}

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

.abr-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999999;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--abr-text);
}

.abr-launcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 18px 8px 8px;
    border: 0;
    border-radius: 999px;
    background: var(--abr-dark);
    color: #fff;
    box-shadow: 0 12px 34px rgba(0,0,0,.28);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.abr-launcher:hover,
.abr-launcher:focus {
    background: var(--abr-brand);
    color: #fff;
}

.abr-launcher img,
.abr-roof-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--abr-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.abr-panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(390px, calc(100vw - 28px));
    max-height: min(670px, calc(100vh - 110px));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--abr-bg);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0,0,0,.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.abr-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.abr-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px 16px;
    background: var(--abr-dark);
    color: #fff;
}

.abr-header strong,
.abr-header small {
    display: block;
}

.abr-header strong {
    font-size: 16px;
}

.abr-header small {
    margin-top: 2px;
    color: rgba(255,255,255,.72);
    font-size: 12px;
}

.abr-avatar,
.abr-avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.abr-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    background: var(--abr-brand);
    font-size: 24px;
    overflow: hidden;
}

.abr-avatar img {
    object-fit: cover;
}

.abr-close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 29px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
}

.abr-progress {
    height: 4px;
    background: #e9e9e9;
}

.abr-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--abr-brand);
    transition: width .2s ease;
}

.abr-form {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.abr-body {
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
}

.abr-intro {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-left: 4px solid var(--abr-brand);
    background: #fbf4f0;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.abr-step {
    display: none;
}

.abr-step.is-active {
    display: block;
}

.abr-step label,
.abr-step legend {
    display: block;
    margin-bottom: 9px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.abr-step fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

.abr-help {
    margin: -2px 0 12px;
    color: var(--abr-muted);
    font-size: 13px;
}

.abr-step input[type="text"],
.abr-step textarea {
    width: 100%;
    border: 1px solid var(--abr-border);
    border-radius: 8px;
    padding: 12px 13px;
    background: #fff;
    color: var(--abr-text);
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
}

.abr-step input:focus,
.abr-step textarea:focus {
    outline: 3px solid rgba(130,48,0,.16);
    border-color: var(--abr-brand);
}

.abr-check {
    display: flex !important;
    align-items: center;
    gap: 11px;
    margin: 8px 0 !important;
    padding: 12px;
    border: 1px solid var(--abr-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px !important;
    font-weight: 600 !important;
}

.abr-check:hover {
    border-color: var(--abr-brand);
    background: #fcf7f4;
}

.abr-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--abr-brand);
}

.abr-error {
    min-height: 20px;
    margin: 8px 0 0;
    color: #b42318;
    font-size: 13px;
}

.abr-summary {
    border: 1px solid var(--abr-border);
    border-radius: 8px;
    overflow: hidden;
}

.abr-summary > div {
    display: grid;
    grid-template-columns: 95px 1fr;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--abr-border);
    font-size: 13px;
    line-height: 1.4;
}

.abr-summary > div:last-child {
    border-bottom: 0;
}

.abr-summary strong {
    color: var(--abr-muted);
}

.abr-consent {
    display: flex !important;
    align-items: flex-start;
    gap: 9px;
    margin-top: 14px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

.abr-consent input {
    margin-top: 3px;
    accent-color: var(--abr-brand);
}

.abr-footer {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--abr-border);
    background: #fafafa;
}

.abr-footer button {
    min-height: 43px;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
}

.abr-back {
    border: 1px solid var(--abr-border);
    background: #fff;
    color: var(--abr-text);
}

.abr-next,
.abr-submit {
    margin-left: auto;
    border: 0;
    background: var(--abr-brand);
    color: #fff;
}

.abr-submit {
    display: none;
}

.abr-footer button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.abr-success {
    text-align: center;
    padding: 18px 6px 8px;
}

.abr-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--abr-brand);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
}

.abr-honeypot {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (max-width: 600px) {
    .abr-widget {
        right: 12px;
        bottom: 12px;
    }

    .abr-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 82px;
        width: auto;
        max-height: calc(100vh - 100px);
        border-radius: 14px;
    }

    .abr-launcher-text {
        display: none;
    }

    .abr-launcher {
        padding-right: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .abr-panel,
    .abr-progress span {
        transition: none;
    }
}
