:root {
    --plc-navy: #001a36;
    --plc-navy-soft: #0f2238;
    --plc-green: #00d177;
    --plc-green-dark: #00b765;
    --plc-mint: #e9fff5;
    --plc-ink: #172535;
    --plc-muted: #647184;
    --plc-border: #dce3ea;
    --plc-surface: #ffffff;
    --plc-background: #f4f7f9;
    --plc-danger: #b42318;
    --plc-focus: #007a4d;
    --plc-shadow: 0 24px 70px rgba(0, 26, 54, 0.24), 0 4px 16px rgba(0, 26, 54, 0.12);
}

.planreal-planesta-credit,
.planreal-planesta-credit * {
    box-sizing: border-box;
}

.planreal-planesta-credit {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    margin: 0;
    padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.72);
    background: var(--plc-navy);
    font-family: Roboto, Arial, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.planreal-planesta-credit a,
.planreal-planesta-credit a:visited,
.planreal-planesta-credit a:focus {
    color: var(--plc-green);
    font-weight: 700;
    text-decoration: none;
}

.planreal-planesta-credit a:hover,
.planreal-planesta-credit a:focus-visible,
.planreal-planesta-credit a:active {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.planreal-planesta-credit a:focus-visible {
    outline: 3px solid var(--plc-focus);
    outline-offset: 2px;
    border-radius: 2px;
}

#planreal-lead-chatbot-root,
#planreal-lead-chatbot-root * {
    box-sizing: border-box;
}

#planreal-lead-chatbot-root {
    position: relative;
    z-index: 2147482000;
    font-family: Roboto, Arial, sans-serif;
    color: var(--plc-ink);
    line-height: 1.45;
}

#planreal-lead-chatbot-root button,
#planreal-lead-chatbot-root input,
#planreal-lead-chatbot-root textarea {
    font: inherit;
}

#planreal-lead-chatbot-root button,
#planreal-lead-chatbot-root a {
    -webkit-tap-highlight-color: transparent;
}

#planreal-lead-chatbot-root [hidden] {
    display: none !important;
}

.plc {
    position: fixed;
    left: max(18px, env(safe-area-inset-left));
    bottom: max(18px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: none;
}

.plc__launcher,
.plc__panel,
.plc__teaser {
    pointer-events: auto;
}

.plc__launcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    margin: 0;
    padding: 8px 18px 8px 9px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--plc-navy);
    box-shadow: 0 12px 32px rgba(0, 26, 54, 0.3);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.plc__launcher:hover {
    background: var(--plc-navy-soft);
    box-shadow: 0 15px 36px rgba(0, 26, 54, 0.36);
    transform: translateY(-2px);
}

#planreal-lead-chatbot-root .plc__launcher:focus {
    color: #ffffff;
    background: var(--plc-navy);
}

#planreal-lead-chatbot-root .plc__launcher:focus-visible,
#planreal-lead-chatbot-root .plc__launcher:active {
    color: #ffffff;
    background: var(--plc-navy-soft);
}

.plc__launcher:focus-visible,
.plc__panel button:focus-visible,
.plc__panel input:focus-visible,
.plc__panel textarea:focus-visible,
.plc__panel a:focus-visible,
.plc__teaser button:focus-visible {
    outline: 3px solid var(--plc-focus);
    outline-offset: 2px;
}

.plc__launcher-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 50%;
    color: var(--plc-navy);
    background: var(--plc-green);
}

.plc__launcher-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.plc__launcher-label {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.plc__launcher-dot {
    position: absolute;
    top: 2px;
    left: 42px;
    width: 11px;
    height: 11px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: var(--plc-green);
}

.plc[data-open="true"] .plc__launcher-dot {
    display: none;
}

.plc__panel {
    display: flex;
    width: min(390px, calc(100vw - 36px));
    height: min(680px, calc(100vh - 98px));
    height: min(680px, calc(100dvh - 98px));
    min-height: 470px;
    margin-bottom: 12px;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid rgba(0, 26, 54, 0.08);
    border-radius: 22px;
    background: var(--plc-surface);
    box-shadow: var(--plc-shadow);
    transform-origin: bottom left;
    animation: plc-panel-in 180ms ease-out both;
}

.plc__header {
    display: flex;
    min-height: 74px;
    padding: 13px 14px;
    align-items: center;
    gap: 11px;
    color: #ffffff;
    background: var(--plc-navy);
}

.plc__avatar {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    overflow: hidden;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: var(--plc-mint);
}

.plc__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.plc__heading {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.plc__heading strong {
    color: #ffffff;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.25;
}

.plc__heading small {
    display: flex;
    margin-top: 2px;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
}

.plc__heading small::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--plc-green);
    content: '';
}

.plc__header-close,
.plc__teaser-close {
    display: grid;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    font-size: 27px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

#planreal-lead-chatbot-root .plc__header-close:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

#planreal-lead-chatbot-root .plc__header-close:hover,
#planreal-lead-chatbot-root .plc__header-close:focus-visible,
#planreal-lead-chatbot-root .plc__header-close:active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.plc__progress {
    width: 100%;
    height: 4px;
    overflow: hidden;
    background: #dfe7ec;
}

.plc__progress span {
    display: block;
    width: 12.5%;
    height: 100%;
    border-radius: 0 999px 999px 0;
    background: var(--plc-green);
    transition: width 220ms ease;
}

.plc__messages {
    display: flex;
    min-height: 0;
    padding: 18px 16px 8px;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 9px;
    background: var(--plc-background);
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #bac7d1 transparent;
}

.plc__message {
    display: flex;
    width: 100%;
    animation: plc-message-in 150ms ease-out both;
}

.plc__message p {
    width: auto;
    max-width: 86%;
    margin: 0;
    padding: 10px 13px;
    border-radius: 16px;
    color: var(--plc-ink);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 26, 54, 0.08);
    font-size: 14px;
    line-height: 1.48;
    overflow-wrap: anywhere;
}

.plc__message--bot {
    justify-content: flex-start;
}

.plc__message--bot p {
    border-bottom-left-radius: 5px;
}

.plc__message--user {
    justify-content: flex-end;
}

.plc__message--user p {
    border-bottom-right-radius: 5px;
    color: #ffffff;
    background: var(--plc-navy);
}

.plc__composer {
    flex: 0 0 auto;
    max-height: 52%;
    padding: 12px 14px 14px;
    overflow-y: auto;
    border-top: 1px solid #e7ebef;
    background: #ffffff;
}

.plc__composer.plc__composer--contact {
    display: flex;
    height: 72%;
    max-height: 72%;
    overflow: hidden;
    flex: 0 0 72%;
}

.plc__contact-form {
    width: 100%;
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
}

.plc__contact-fields {
    display: grid;
    min-height: 0;
    padding: 0 3px 10px 0;
    overflow-x: hidden;
    overflow-y: auto;
    align-content: start;
    gap: 7px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #bac7d1 transparent;
}

.plc__contact-actions {
    position: relative;
    z-index: 2;
    display: grid;
    padding-top: 9px;
    border-top: 1px solid #edf0f2;
    background: #ffffff;
    box-shadow: 0 -8px 16px rgba(0, 26, 54, 0.035);
    gap: 4px;
}

.plc__contact-actions .plc__primary {
    margin-top: 0;
}

.plc__choices {
    display: grid;
    gap: 8px;
}

.plc__choice {
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #bfcbd5;
    border-radius: 11px;
    color: var(--plc-navy);
    background: #ffffff;
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.plc__choice::after {
    display: inline-block;
    float: right;
    width: 7px;
    height: 7px;
    margin-top: 4px;
    margin-left: 8px;
    border-top: 2px solid var(--plc-green-dark);
    border-right: 2px solid var(--plc-green-dark);
    content: '';
    transform: rotate(45deg);
}

#planreal-lead-chatbot-root .plc__choice:focus {
    border-color: #bfcbd5;
    color: var(--plc-navy);
    background: #ffffff;
    transform: none;
}

#planreal-lead-chatbot-root .plc__choice:hover,
#planreal-lead-chatbot-root .plc__choice:focus-visible,
#planreal-lead-chatbot-root .plc__choice:active {
    border-color: var(--plc-green-dark);
    color: var(--plc-navy);
    background: var(--plc-mint);
    transform: translateX(2px);
}

.plc__form {
    display: grid;
    gap: 7px;
    margin: 0;
}

.plc__form label:not(.plc__privacy-check) {
    color: var(--plc-navy);
    font-size: 12.5px;
    font-weight: 700;
}

.plc__form input[type="text"],
.plc__form input[type="tel"],
.plc__form input[type="email"],
.plc__form textarea {
    width: 100%;
    margin: 0;
    padding: 10px 11px;
    border: 1px solid #b9c6d0;
    border-radius: 9px;
    color: var(--plc-ink);
    background: #ffffff;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: none;
    resize: vertical;
}

.plc__form input::placeholder,
.plc__form textarea::placeholder {
    color: #84909d;
    opacity: 1;
}

.plc__form input:hover,
.plc__form textarea:hover {
    border-color: #8295a4;
}

.plc__form input:focus,
.plc__form textarea:focus {
    border-color: var(--plc-green-dark);
}

.plc__inline-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
}

.plc__inline-field button,
.plc__primary {
    min-height: 42px;
    margin: 0;
    padding: 9px 15px;
    border: 0;
    border-radius: 9px;
    color: var(--plc-navy);
    background: var(--plc-green);
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    transition: background 140ms ease, transform 140ms ease;
}

#planreal-lead-chatbot-root .plc__inline-field button:focus,
#planreal-lead-chatbot-root .plc__primary:focus {
    color: var(--plc-navy);
    background: var(--plc-green);
}

#planreal-lead-chatbot-root .plc__inline-field button:hover,
#planreal-lead-chatbot-root .plc__inline-field button:focus-visible,
#planreal-lead-chatbot-root .plc__inline-field button:active,
#planreal-lead-chatbot-root .plc__primary:hover,
#planreal-lead-chatbot-root .plc__primary:focus-visible,
#planreal-lead-chatbot-root .plc__primary:active {
    color: var(--plc-navy);
    background: var(--plc-green-dark);
    transform: translateY(-1px);
}

.plc__primary {
    width: 100%;
    margin-top: 4px;
}

.plc__primary:disabled {
    color: #53616e;
    background: #cfdae1;
    cursor: wait;
    transform: none;
}

.plc__form-error,
.plc__submit-note {
    min-height: 0;
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
}

.plc__form-error:not(:empty) {
    padding: 7px 9px;
    border-radius: 7px;
    color: var(--plc-danger);
    background: #fff1f0;
}

.plc__submit-note {
    color: var(--plc-muted);
    text-align: center;
}

.plc__privacy-check {
    display: grid;
    margin: 3px 0;
    align-items: start;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    color: #526171;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.42;
    cursor: pointer;
}

.plc__privacy-check input {
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--plc-green-dark);
}

.plc__privacy-check a,
#planreal-lead-chatbot-root .plc__footer > a,
#planreal-lead-chatbot-root .plc__footer > a:visited,
#planreal-lead-chatbot-root .plc__footer > a:focus {
    color: var(--plc-navy) !important;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#planreal-lead-chatbot-root .plc__footer > a:hover,
#planreal-lead-chatbot-root .plc__footer > a:focus-visible,
#planreal-lead-chatbot-root .plc__footer > a:active {
    color: var(--plc-navy) !important;
}

.plc__honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.plc__footer {
    display: flex;
    padding: 8px 14px 10px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 7px;
    border-top: 1px solid #edf0f2;
    color: #74808d;
    background: #ffffff;
    font-size: 10px;
    line-height: 1.35;
    text-align: center;
}

#planreal-lead-chatbot-root .plc__safety-note {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    font-size: 9px;
    line-height: 1.3;
    text-align: center;
}

.plc__credit {
    flex: 1 0 100%;
    margin-top: 3px;
    color: #8a95a1;
    font-size: 9.5px;
}

#planreal-lead-chatbot-root .plc__credit a,
#planreal-lead-chatbot-root .plc__credit a:focus {
    color: #617080;
    font-weight: 700;
    text-decoration: none;
}

#planreal-lead-chatbot-root .plc__credit a:hover,
#planreal-lead-chatbot-root .plc__credit a:focus-visible,
#planreal-lead-chatbot-root .plc__credit a:active {
    color: var(--plc-navy);
    text-decoration: underline;
}

.plc__success-actions {
    display: grid;
    gap: 8px;
}

.plc__call-link {
    display: block;
    padding: 11px 12px;
    border-radius: 10px;
    color: var(--plc-navy);
    background: var(--plc-mint);
    font-size: 13px;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
}

.plc__restart {
    margin: 0;
    padding: 7px;
    border: 0;
    color: var(--plc-muted);
    background: transparent;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

#planreal-lead-chatbot-root .plc__restart:hover,
#planreal-lead-chatbot-root .plc__restart:focus,
#planreal-lead-chatbot-root .plc__restart:active {
    color: var(--plc-navy);
    background: transparent;
}

.plc__teaser {
    position: relative;
    width: min(310px, calc(100vw - 36px));
    margin-bottom: 10px;
    border: 1px solid rgba(0, 26, 54, 0.08);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(0, 26, 54, 0.22);
    animation: plc-teaser-in 180ms ease-out both;
}

.plc__teaser-open {
    width: 100%;
    margin: 0;
    padding: 14px 42px 14px 15px;
    border: 0;
    border-radius: inherit;
    color: var(--plc-navy);
    background: transparent;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.plc__teaser-open::before {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--plc-green-dark);
    content: '';
}

#planreal-lead-chatbot-root .plc__teaser-open:hover,
#planreal-lead-chatbot-root .plc__teaser-open:focus,
#planreal-lead-chatbot-root .plc__teaser-open:active {
    color: var(--plc-navy);
    background: transparent;
}

.plc__teaser-close {
    position: absolute;
    z-index: 1;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    color: #617080;
    background: transparent;
    font-size: 22px;
}

#planreal-lead-chatbot-root .plc__teaser-close:focus {
    color: #617080;
    background: transparent;
}

#planreal-lead-chatbot-root .plc__teaser-close:hover,
#planreal-lead-chatbot-root .plc__teaser-close:focus-visible,
#planreal-lead-chatbot-root .plc__teaser-close:active {
    color: var(--plc-navy);
    background: #eef2f5;
}

@keyframes plc-panel-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes plc-message-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes plc-teaser-in {
    from {
        opacity: 0;
        transform: translateY(7px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .planreal-planesta-credit {
        padding-right: 12px;
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
        padding-left: 12px;
    }

    .plc {
        left: max(12px, env(safe-area-inset-left));
        bottom: max(12px, env(safe-area-inset-bottom));
    }

    .plc__panel {
        width: calc(100vw - 24px);
        height: min(700px, calc(100vh - 82px));
        height: min(700px, calc(100dvh - 82px));
        min-height: min(470px, calc(100vh - 82px));
        min-height: min(470px, calc(100dvh - 82px));
        margin-bottom: 8px;
        border-radius: 18px;
    }

    .plc__launcher {
        min-height: 54px;
        padding: 6px 14px 6px 7px;
    }

    .plc__launcher-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .plc__launcher-dot {
        left: 38px;
    }

    .plc__header {
        min-height: 66px;
        padding: 10px 12px;
    }

    .plc__composer {
        max-height: 54%;
        padding: 10px 12px 12px;
    }

    .plc__messages {
        padding: 14px 12px 7px;
    }

    .plc__message p {
        max-width: 90%;
    }
}

@media (max-width: 380px) {
    .plc__launcher-label {
        display: none;
    }

    .plc__launcher {
        width: 54px;
        padding: 7px;
    }

    .plc__inline-field {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .plc__panel,
    .plc__message,
    .plc__teaser {
        animation: none;
    }

    .plc__launcher,
    .plc__choice,
    .plc__progress span,
    .plc__inline-field button,
    .plc__primary {
        transition: none;
    }
}

@media print {
    #planreal-lead-chatbot-root {
        display: none !important;
    }
}
