/* ==================================================
    Estilos formulario
    ================================================== */

.input-group>.form-control {
    width: 100%;
    border-radius: 10px !important;
}

.inputs-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
}

.form-control {
    height: 48px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.25s ease-in-out;
    background: #ffffff;
    width: 100%;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(0, 152, 75, 0.1);
    outline: none;
}

.search-form {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}


/* Estilos específicos para o dropdown */

.dropdown-menu {
    padding: 0.5rem 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-item:hover {
    background-color: rgba(0, 152, 75, 0.1);
}

.btn.dropdown {
    padding: 0 !important;
}


/* Estilo para textos truncados */

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.min-w-200 {
    min-width: 100%;
}

.min-w-250 {
    min-width: 250px;
}


/* CSS construido no modo mobile first */

@media (min-width: 768px) {
    .inputs-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .search-form {
        padding: 1.5rem;
    }
    .btn.dropdown {
        padding: 0 !important;
    }
}

@media (min-width: 1200px) {
    .min-w-200 {
        min-width: 200px;
    }
    .inputs-container {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Estilo para o wrapper do input */

.input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}


/* Estilo para o botão de limpar */

.btn-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #6c757d;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    visibility: hidden;
    /* Inicialmente oculto até que haja texto */
}

.btn-clear:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-clear:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 152, 75, 0.25);
}


/* Adapta o padding do input para acomodar o botão */

.input-wrapper .form-control {
    padding-right: 40px;
}


/* Estilo para o modo escuro */

.dark-mode .btn-clear {
    color: #adb5bd;
}

.dark-mode .btn-clear:hover {
    background-color: rgba(255, 255, 255, 0.1);
}