/**
 * Assistente virtual Sofia.
 */

.tjba-sofia {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 99990;
}

.tjba-sofia__botao {
    display: grid;
    width: 96px;
    height: 96px;
    padding: 0;
    overflow: hidden;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28));
}

.tjba-sofia__botao:focus-visible,
.tjba-sofia__fechar:focus-visible {
    outline: 3px solid #f7ba50;
    outline-offset: 4px;
}

.tjba-sofia__imagem {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tjba-sofia__painel {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(430px, calc(100vw - 2rem));
    height: min(740px, calc(100vh - 2rem));
    overflow: hidden;
    border: 1px solid rgba(0, 38, 84, 0.18);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
}

.tjba-sofia__painel[hidden] {
    display: none;
}

.tjba-sofia__fechar {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #002654;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.tjba-sofia__iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.tjba-sofia.is-open .tjba-sofia__botao {
    visibility: hidden;
}

@media (max-width: 575px) {
    .tjba-sofia {
        right: 0.5rem;
        bottom: 0.5rem;
    }

    .tjba-sofia__botao {
        width: 78px;
        height: 78px;
    }

    .tjba-sofia__painel {
        position: fixed;
        inset: 0.5rem;
        width: auto;
        height: auto;
        max-height: none;
    }
}
