﻿/* Estilização do search para nova versão c/componente text type e consolidação do CSS de filtro e refresh pra cá */

:root {
    --bth-ctrl-h: 36px;
    --bth-ctrl-radius: 4px;
    --bth-ctrl-font: 'Open Sans', Arial, sans-serif;
    --bth-ctrl-text: #333;
    --bth-ctrl-muted: #999;
    --bth-ctrl-border: #d6d6d6;
    --bth-ctrl-border-hover: #bfbfc0;
    --bth-ctrl-bg-hover: #ededee;
    --bth-ctrl-focus: #90caf9;
    --bth-ctrl-focus-ring: rgba(144, 202, 249, .35);
    --bth-ctrl-accent: #1565c0;
}

/* Botão "Filtrar" */
.filtro-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: var(--bth-ctrl-h);
    padding: 0 14px;
    background: #fff;
    border: 1px solid var(--bth-ctrl-border);
    color: var(--bth-ctrl-text);
    font-family: var(--bth-ctrl-font);
    font-size: 13px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s, color .15s;
    z-index: 2;
}

    .filtro-btn:hover {
        border-color: var(--bth-ctrl-border-hover);
    }

    .filtro-btn i {
        font-size: 13px;
    }

    .filtro-btn.ativo {
        border-color: var(--bth-ctrl-focus);
        color: var(--bth-ctrl-accent);
    }

/* Botão de refresh */

.bth-btn-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--bth-ctrl-h);
    margin-bottom: 0;
    padding: 0 12px;
    vertical-align: middle;
    cursor: pointer;
    background-image: none;
    white-space: nowrap;
    font-family: var(--bth-ctrl-font);
    font-size: 14px !important;
    font-weight: 400;
    line-height: 1;
    color: var(--bth-ctrl-text);
    border-radius: var(--bth-ctrl-radius) !important;
    background-color: #fff !important;
    border: 1px solid var(--bth-ctrl-border) !important;
    user-select: none;
    transition: background-color .15s, border-color .15s, transform .1s;
}

    .bth-btn-refresh:hover {
        background-color: var(--bth-ctrl-bg-hover) !important;
        border-color: var(--bth-ctrl-border-hover) !important;
    }

    .bth-btn-refresh:active {
        transform: scale(.94);
    }

    .bth-btn-refresh i.fa-arrows-rotate {
        display: inline-block;
        transform: rotate(360deg);
        transition: transform .6s cubic-bezier(.4, 0, .2, 1);
    }

    .bth-btn-refresh:active i.fa-arrows-rotate {
        transform: rotate(0deg);
        transition: none;
    }

.bth-icon-refresh {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-rendering: auto;
}

    .bth-icon-refresh::before {
        content: "\f021";
    }

/* Campo de pesquisa */
.bth-search {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.bth-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--bth-ctrl-muted);
    pointer-events: none;
    transition: color .15s;
    z-index: 1;
}

.bth-search:focus-within .bth-search-icon {
    color: var(--bth-ctrl-accent);
}

.bth-search .form-control.bth-input-search {
    width: 100%;
    height: var(--bth-ctrl-h);
    padding: 0 12px 0 36px;
    font-family: var(--bth-ctrl-font) !important;
    font-size: 13px !important;
    color: var(--bth-ctrl-text) !important;
    background: #fff !important;
    border: 1px solid var(--bth-ctrl-border) !important;
    border-radius: var(--bth-ctrl-radius) !important;
    box-shadow: none !important;
    transition: border-color .15s, box-shadow .15s;
}

    .bth-search .form-control.bth-input-search::placeholder {
        color: var(--bth-ctrl-muted);
    }

    .bth-search .form-control.bth-input-search:hover {
        border-color: var(--bth-ctrl-border-hover);
    }

    .bth-search .form-control.bth-input-search:focus {
        outline: 0;
        border-color: var(--bth-ctrl-focus);
        box-shadow: 0 0 0 3px var(--bth-ctrl-focus-ring);
    }

.bth-search .bth-input-search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 2l8 8M10 2l-8 8' stroke='%23999' stroke-width='1.4' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat center / 9px;
    opacity: .55;
    transition: opacity .15s;
}

    .bth-search .bth-input-search::-webkit-search-cancel-button:hover {
        opacity: .95;
    }

.bth-search-dica {
    position: absolute;
    left: 36px;
    right: 12px;
    top: 0;
    bottom: 0;
    display: block;
    line-height: var(--bth-ctrl-h);
    direction: rtl;
    text-align: left;
    white-space: pre;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--bth-ctrl-font);
    font-size: 13px;
    color: var(--bth-ctrl-muted);
    pointer-events: none;
    transition: opacity .15s;
}

    .bth-search-dica .text-type {
        display: inline;
        direction: ltr;
        unicode-bidi: isolate;
        white-space: pre;
    }

        .bth-search-dica .text-type::after {
            content: "";
            display: inline-block;
            width: 0;
            height: 0;
        }

.bth-search.com-dica .bth-input-search:focus ~ .bth-search-dica,
.bth-search.com-dica .bth-input-search:not(:placeholder-shown) ~ .bth-search-dica {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .filtro-btn,
    .bth-btn-refresh,
    .bth-btn-refresh i,
    .bth-search-icon,
    .bth-search .form-control.bth-input-search,
    .bth-search-dica {
        transition: none;
    }
}